public interface CheckoutWorkflowActivity
CheckoutWorkflow, implementations of this interface are
responsible for contributing an independent & isolated portion of the work required for a cart to
complete checkout.
If an unrecoverable error is encountered in the workflow, then the entire workflow must be rolled
back. Each activity is also responsible for providing a #rollback(Cart, String) method to
un-do any work or stored state from its #execute(Cart, String) method.
Coordinating the execution & rollback of the workflow is the responsibility of the
CheckoutWorkflow. Implementations of this interface should only be concerned about how it
contributes to the overall workflow & what it needs to do to roll back its own work.| Modifier and Type | Method and Description |
|---|---|
com.broadleafcommerce.cart.client.domain.Cart |
execute(com.broadleafcommerce.cart.client.domain.Cart cart,
String requestId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Method responsible for executing some work against the cart that is required for checkout.
|
com.broadleafcommerce.cart.client.domain.Cart |
rollback(com.broadleafcommerce.cart.client.domain.Cart cart,
String requestId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Method responsible for rolling back any work that was done during the execution of the
#execute(Cart, String) method. |
com.broadleafcommerce.cart.client.domain.Cart execute(com.broadleafcommerce.cart.client.domain.Cart cart,
String requestId,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
cart - The Cart that we're attempting to checkout with.requestId - The id used to identify changes tied to the specific execution requestcontextInfo - Context information around sandbox and multitenant state.CheckoutWorkflowActivityException - thrown if an unrecoverable error is encountered
during the execution of the activitycom.broadleafcommerce.cart.client.domain.Cart rollback(com.broadleafcommerce.cart.client.domain.Cart cart,
String requestId,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
#execute(Cart, String) method.cart - The Cart that we were attempting to checkout with, but ran into an
exception/error.requestId - The id used to identify changes tied to the specific execution requestcontextInfo - Context information around sandbox and multitenant state.CheckoutWorkflowRollbackException - If there was an exception thrown within the
rollback of the activity.Copyright © 2021. All rights reserved.