Monday, October 1, 2012

processOrder Pipeline Chain : ATG


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 list describes each processor in the pipeline chain:

1.PipelineLink Name: 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: In ATG Consumer Commerce, return value of 1 executes checkForExpiredPromotions next. In ATG Business Commerce, return value of 1 executes executeApproveOrderChain next.

2.PipelineLink Name: 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: In ATG Consumer Commerce, return value of 1 executes checkForExpiredPromotions next. In ATG Business Commerce, return value of 1 executes executeApproveOrderChain next.

3.(ATG Business Commerce only)
PipelineLink Name: 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.

4.(ATG Business Commerce only)
Pipeline Link Name: 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.

5.(ATG Business Commerce only)
Pipeline Link Name: 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.

6.PipelineLink Name: 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

7.PipelineLink Name: 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

8.PipelineLink Name: 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

9.PipelineLink Name: 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

10.PipelineLink Name: 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

11.PipelineLink Name: 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 authorizePayment next

12.PipelineLink Name: 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

13.PipelineLink Name: 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

14.PipelineLink Name: 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 addOrderToRepository next

15.PipelineLink Name: 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

16.PipelineLink Name: 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

17.PipelineLink Name: 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.

No comments:

Popular Posts