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
Nucleus component: /atg/commerce/order/processor/ExecuteValidateForCheckoutChain
PipelineProcessor object: atg.commerce.order.processor.ProcExecuteChain
Transitions: Return value of 1 executes setStimulusMarkers
next.
setStimulusMarkers
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/approval/processor/SetStimulusMarkers
PipelineProcessor object: atg.commerce.order.processor.SetStimulusMarkers
Transitions: Return value of 1 executes setSalesChannel
processor.
setSalesChannel
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/approval/processor/SetSalesChannel
PipelineProcessor object: atg.commerce.order.processor.ProcSetSalesChannel
Transitions: Return value of 1 executes setSubmittedSite
processor.
setSubmittedSite
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/approval/processor/SetSubmittedSite
PipelineProcessor object: atg.commerce.order.processor.ProcSetSubmitedSite
Transitions: Return value of 1 executes executeApproveOrderChain
next.
executeApproveOrderChain
This processor executes the approveOrder
pipeline chain, which begins the order approval process.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/approval/processor/ExecuteApproveOrderChain
PipelineProcessor object: atg.commerce.order.processor.ProcExecuteChain
Transitions: Return value of 1 executes stopChainIfOrderRequiresApproval
next. Return value of -1 (STOP_CHAIN_EXECUTION_AND_ROLLBACK) stops the execution of the processOrder
chain; this means that an error occurred.
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 isn’t, the order moves to the next processor in processOrder
. If it is, execution of the processOrder
chain stops.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/approval/processor/StopChainIfOrderRequiresApproval
PipelineProcessor object: atg.commerce.order.processor.ProcCheckOrderState
Transitions: Return value of 1 executes executeValidatePostApprovalChain
next. Return value of 2 executes executeValidateNoApprovalChain
.
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
Nucleus component: atg/commerce/order/processor/ExecuteValidatePostApprovalChain
PipelineProcessor object: atg.commerce.order.processor.ProcExecuteChain
Transitions: Return value of 1 executes checkForExpiredPromotions
next.
executeValidateNoApprovalChain
If the order does not require approval, finish validation.
Transactional mode: TX_MANDATORY
Nucleus component: atg/commerce/order/processor/ExecuteValidateNoApprovalChain
PipelineProcessor object: atg.commerce.order.processor.ProcExecuteChain
Transitions: Return value of 1 executes checkForExpiredPromotions
.
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
Nucleus component: /atg/commerce/order/processor/CheckForExpiredPromotions
PipelineProcessor object: atg.commerce.order.processor.ProcCheckForExpiredPromotions
Transitions: return value of 1 will execute removeEmptyShippingGroups
next
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
Nucleus component: /atg/commerce/order/processor/RemoveEmptyShippingGroups
PipelineProcessor object: atg.commerce.order.processor.ProcRemoveEmptyShippingGroups
Transitions: return value of 1 will execute removeEmptyPaymentGroups
next
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
Nucleus component: /atg/commerce/order/processor/RemoveEmptyPaymentGroups
PipelineProcessor object: atg.commerce.order.processor.ProcRemoveEmptyPaymentGroups
Transitions: return value of 1 will execute createImplicitRelationships
next
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
Nucleus component: /atg/commerce/order/processor/CreateImplicitRelationships
PipelineProcessor object: atg.commerce.order.processor.ProcCreateImplicitRelationships
Transitions: return value of 1 will execute setPaymentGroupAmount
next
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
Nucleus component: /atg/commerce/order/processor/SetPaymentGroupAmount
PipelineProcessor object: atg.commerce.order.processor.ProcSetPaymentGroupAmount
Transitions: return value of 1 will execute moveUsedPromotions
next
moveUsedPromotions
This processor updates the promotion use information in the Profile repository for the user.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/MoveUsedPromotions
PipelineProcessor object: atg.commerce.order.processor.ProcMoveUsedPromotions
Transitions: return value of 1 will execute removeUnusedPromotions
next
removeUnusedPromotions
This processor removes unused promotions if configured as explained in (xref).
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/RemoveUnusedPromotions
PipelineProcessor object: atg.commerce.order.processor.ProcRemoveUnusedPromotions
Transitions: return value of 1 will execute authorizePayment
next
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
Nucleus component: /atg/commerce/order/processor/AuthorizePayment
PipelineProcessor object: atg.commerce.order.processor.ProcAuthorizePayment
Transitions: return value of 1 will execute updateGiftRepository
next
updateGiftRepository
This processor updates the gift list repository information for the user.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/UpdateGiftRepository
PipelineProcessor object: atg.commerce.order.processor.ProcUpdateGiftRepository
Transitions: return value of 1 will execute sendGiftPurchasedMessage
next
sendGiftPurchasedMessage
This processor sends a gift purchased message to the messaging system.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/SendGiftPurchasedMessage
PipelineProcessor object: atg.commerce.order.processor.ProcSendGiftPurchasedMessage
Transitions: return value of 1 will execute setSubmittedSiteId
next
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
Nucleus component: /atg/commerce/order/processing/SetSumittedSite
PipelineProcessor object: atg.commerce.order.processor.SetSubmittedSite
Transitions: return value of 1 executes addOrderToRepository
next.
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
Nucleus component: /atg/commerce/order/processor/AddOrderToRepository
PipelineProcessor object: atg.commerce.order.processor.ProcAddOrderToRepository
Transitions: return value of 1 will execute sendPromotionUsedMessage
next
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
Nucleus component: /atg/commerce/order/processor/SendPromotionUsedMessage
PipelineProcessor object: atg.commerce.order.processor.ProcSendPromotionUsedMessage
Transitions: return value of 1 will execute sendFulfillmentMessage
next
sendFulfillmentMessage
This processor sends a message to the fulfillment engine signifying that it should begin processing the Order.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/SendFulfillmentMessage
PipelineProcessor object: atg.commerce.order.processor.ProcSendFulfillmentMessage
Transitions: None, this is the last link in the chain and will cause the PipelineManager
to return to the caller.