package com.mycompany.cartops;
public class MyCheckoutWorkflowActivity implements CheckoutWorkflowActivity {
@Override
public Cart execute(@lombok.NonNull Cart cart,
@lombok.NonNull String requestId,
@Nullable ContextInfo contextInfo) {
// Do your work here, throwing a CheckoutWorkflowActivityException to initiate a rollback if something went wrong
return cart;
}
@Override
public Cart rollback(@lombok.NonNull Cart cart,
@lombok.NonNull String requestId,
@Nullable ContextInfo contextInfo) {
return cart; // If nothing needs to be rolled back, simply return the cart
}
}