Interface CheckoutWorkflowActivity

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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.
    • Method Detail

      • execute

        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)
        Method responsible for executing some work against the cart that is required for checkout. This may include, but is not limited to, cart validation checks, inventory reservations, or payment authorizations.
        Parameters:
        cart - The Cart that we're attempting to checkout with.
        requestId - The id used to identify changes tied to the specific execution request
        contextInfo - Context information around sandbox and multitenant state.
        Returns:
        The final state of the cart following the execution of the activity.
        Throws:
        CheckoutWorkflowActivityException - thrown if an unrecoverable error is encountered during the execution of the activity
      • rollback

        com.broadleafcommerce.cart.client.domain.Cart rollback​(com.broadleafcommerce.cart.client.domain.Cart cart,
                                                               String requestId,
                                                               @Nullable
                                                               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.
        Parameters:
        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 request
        contextInfo - Context information around sandbox and multitenant state.
        Returns:
        The final state of the cart following the rollback of the activity.
        Throws:
        CheckoutWorkflowRollbackException - If there was an exception thrown within the rollback of the activity.