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

/atg/commerce/order/processor/ExecuteValidateForCheckoutChain

Object

atg.commerce.order.processor.ProcExecuteChain

Transitions

Return value of 1 executes setStimulusMarkers next.

setStimulusMarkers

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/approval/processor/SetStimulusMarkers

Object

atg.commerce.order.processor.SetStimulusMarkers

Transitions

Return value of 1 executes setSalesChannel processor.

setSalesChannel

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/approval/processor/SetSalesChannel

Object

atg.commerce.order.processor.ProcSetSalesChannel

Transitions

Return value of 1 executes setSubmittedSite processor.

setSubmittedSite

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/approval/processor/SetSubmittedSite

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

Component

/atg/commerce/approval/processor/ExecuteApproveOrderChain

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 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

/atg/commerce/approval/processor/StopChainIfOrderRequiresApproval

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

Component

atg/commerce/order/processor/ExecuteValidatePostApprovalChain

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

Component

atg/commerce/order/processor/ExecuteValidateNoApprovalChain

Object

atg.commerce.order.processor.ProcExecuteChain

Transitions

Return value of 1 executes checkForExpiredPromotions next.

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

/atg/commerce/order/processor/CheckForExpiredPromotions

Object

atg.commerce.order.processor.ProcCheckForExpiredPromotions

Transitions

Return value of 1 executes 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

Component

/atg/commerce/order/processor/RemoveEmptyShippingGroups

Object

atg.commerce.order.processor.ProcRemoveEmptyShippingGroups

Transitions

Return value of 1 executes 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

Component

/atg/commerce/order/processor/RemoveEmptyPaymentGroups

Object

atg.commerce.order.processor.ProcRemoveEmptyPaymentGroups

Transitions

Return value of 1 executes 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

Component

/atg/commerce/order/processor/CreateImplicitRelationships

Object

atg.commerce.order.processor.ProcCreateImplicitRelationships

Transitions

Return value of 1 executes 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

Component

/atg/commerce/order/processor/SetPaymentGroupAmount

Object

atg.commerce.order.processor.ProcSetPaymentGroupAmount

Transitions

Return value of 1 executes moveUsedPromotions next.

moveUsedPromotions

This processor updates the promotion use information in the Profile repository for the user.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/MoveUsedPromotions

Object

atg.commerce.order.processor.ProcMoveUsedPromotions

Transitions

Return value of 1 executes removeUnusedPromotions next.

removeUnusedPromotions

This processor removes unused promotions if configured.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/RemoveUnusedPromotions

Object

atg.commerce.order.processor.ProcRemoveUnusedPromotions

Transitions

Return value of 1 executes 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

Component

/atg/commerce/order/processor/AuthorizePayment

Object

atg.commerce.order.processor.ProcAuthorizePayment

Transitions

Return value of 1 executes updateGiftRepository next.

updateGiftRepository

This processor updates the gift list repository information for the user.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/UpdateGiftRepository

Object

atg.commerce.order.processor.ProcUpdateGiftRepository

Transitions

Return value of 1 executes sendGiftPurchasedMessage next.

sendGiftPurchasedMessage

This processor sends a gift purchased message to the messaging system.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/SendGiftPurchasedMessage

Object

atg.commerce.order.processor.ProcSendGiftPurchasedMessage

Transitions

Return value of 1 executes 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

Component

/atg/commerce/order/processor/SetSubmittedSite

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

Component

/atg/commerce/order/processor/AddOrderToRepository

Object

atg.commerce.order.processor.ProcAddOrderToRepository

Transitions

Return value of 1 executes 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

Component

/atg/commerce/order/processor/SendPromotionUsedMessage

Object

atg.commerce.order.processor.ProcSendPromotionUsedMessage

Transitions

Return value of 1 executes sendFulfillmentMessage next.

sendFulfillmentMessage

This processor sends a message to the fulfillment engine signifying that it should begin processing the Order.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/SendFulfillmentMessage

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.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices