The processOrder
pipeline chain submits the given Order for checkout. The processOrder
pipeline chain is executed by the processOrder()
method in the OrderManager
. The processOrder()
method adds the given Order, Profile, Request, Locale, and OrderManager
to its parameter list, which is supplied to the executing chain. The pipeline chain’s transaction mode is TX_REQUIRED.
The following sections describe each processor in the pipeline chain.
executeValidateForCheckoutChain
This processor causes the validateForCheckout
chain to be executed. If the execution of this chain causes any errors, then execution will be returned to the caller.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
setStimulusMarkers
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
setSalesChannel
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
setSubmittedSite
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
executeApproveOrderChain
This processor executes the approveOrder
pipeline chain, which begins the order approval process.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
stopChainIfOrderRequiresApproval
This processor checks whether the order has been determined to require approval. Specifically, it checks whether the state of the order is PENDING_APPROVAL. If it is not, the order moves to the next processor in processOrder
. If it is, execution of the processOrder
chain stops.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
executeValidatePostApprovalChain
If the order requires approval and has been approved, this processor revalidates order information in case the approver changed anything.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
executeValidateNoApprovalChain
If the order does not require approval, finish validation.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
checkForExpiredPromotions
This processor walks through all the promotions that are being applied to the Order and verifies that none of them have expired.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
removeEmptyShippingGroups
This processor checks to see if there are any empty ShippingGroups
in the Order. It removes any empty groups it finds. An empty ShippingGroup
contains no Relationships. If the Order contains only one ShippingGroup
then it will not be removed if it is empty.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
removeEmptyPaymentGroups
This processor checks to see if there are any empty PaymentGroups
in the Order. If so then it will remove them. An empty PaymentGroup
contains no Relationships. If the Order contains only one PaymentGroup
then it will not be removed if it is empty.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
createImplicitRelationships
This processor adds Relationships to the Order if there is only one ShippingGroup
or one PaymentGroup
. If either one of these or both have no Relationships, then relationships will automatically be created. For the ShippingGroup
, Relationships will be created between it and each CommerceItem
. For the PaymentGroup
, a Relationship will be created between itself and the Order with type OrderAmountRemaining
.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
setPaymentGroupAmount
This processor sets the amount property of each PaymentGroup
in the Order based on the Relationships in each PaymentGroup
. This amount is the amount that will ultimately be debited by the PaymentManager
.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
moveUsedPromotions
This processor updates the promotion use information in the Profile repository for the user.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
removeUnusedPromotions
This processor removes unused promotions if configured.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
authorizePayment
This processor authorizes all the payment information in the PaymentGroups
. It essentially calls the authorize()
method in the PaymentManager
for each PaymentGroup
.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
updateGiftRepository
This processor updates the gift list repository information for the user.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
sendGiftPurchasedMessage
This processor sends a gift purchased message to the messaging system.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
setSubmittedSiteId
If you are using multisite, this processor sets the ID of the site on which the user created the order.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
addOrderToRepository
This processor saves the Order to the Order Repository and if the user is not a registered user, adds the Order to the repository and then saves it.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
sendPromotionUsedMessage
This processor sends a message to the Scenario Server for each promotion that was used in the Order signifying that the given promotion was used by the user.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
sendFulfillmentMessage
This processor sends a message to the fulfillment engine signifying that it should begin processing the Order.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | None, this is the last link in the chain and will cause the |