Monday, October 1, 2012

validateForCheckout Pipeline Chain : ATG




The validateForCheckout pipeline chain verifies that the Order is ready for checkout. The validateForCheckout pipeline chain is executed by the validateOrder() method in the OrderManager and the processOrder pipeline chain. The validateOrder() method adds the given Order, 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: validateOrderForCheckout 
This processor validates that there is at least one ShippingGroup, one PaymentGroup, and one CommerceItem in the Order before checking out.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/ValidateOrderForCheckout 
PipelineProcessor object: atg.commerce.order.processor.ProcValidateOrderForCheckout 
Transitions: return value of 1 will execute verifyOrderAddresses next

2.PipelineLink Name: verifyOrderAddresses 
This processor verifies the given addresses in the HardgoodShippingGroup and CreditCard objects. It does this by calling the verifyAddress() method in the AddressVerificationProcessor, which is configured in the bprocessor. Note: The AddressVerificationProcessor is not a pipeline processor.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/VerifyOrderAddresses 
PipelineProcessor object: atg.commerce.order.processor.ProcVerifyOrderAddresses 
Transitions: return value of 1 will execute validateShippingGroupsForCheckout next

3.PipelineLink Name: validateShippingGroupsForCheckout 
This processor validates ShippingGroups before checking an Order out. It checks that all CommerceItems in the Order are assigned to ShippingGroups and that all the required fields in all the ShippingGroups, regardless of type, are not null or empty String.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/ValidateShippingGroupsForCheckout 
PipelineProcessor object: atg.commerce.order.processor.ProcValidateShippingGroupsForCheckout
Transitions: return value of 1 will execute creditCardModCheck next

4.PipelineLink Name: creditCardModCheck 
This processor does a mod check on credit card numbers to see if they are valid. The verifyCreditCard method of the atg.payment.creditcard.CreditCardTools class is called on each credit card number in the Order.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/CreditCardModCheck 
PipelineProcessor object: atg.commerce.order.processor.ProcCreditCardModCheck 
Transitions: return value of 1 will execute validatePaymentGroupsForCheckout next

5.PipelineLink Name: validatePaymentGroupsForCheckout 
This processor validates PaymentGroups before checking an Order out. It checks that all CommerceItems, shipping costs, and tax in the Order are assigned to PaymentGroups. It also checks that all the required fields in all the PaymentGroups, regardless of type, are not null or an empty String.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/ValidatePaymentGroupsForCheckout 
PipelineProcessor object: atg.commerce.order.processor.ProcValidatePaymentGroupsForCheckout 
Transitions: return value of 1 will execute validateShippingCostsForCheckout next

6.PipelineLink Name: validateShippingCostsForCheckout 
This processor validates that all shipping costs are accounted for by a PaymentGroup. Shipping costs are accounted for if there is only one PaymentGroup and it has no Relationships, if the ShippingGroup has been assigned to a PaymentGroup, or if an order level Relationship exists in the Order that covers the entire amount of the Order.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/ValidateShippingCostsForCheckout 
PipelineProcessor object: atg.commerce.order.processor.ProcValidateShippingCostsForCheckout 
Transitions: return value of 1 will execute validateOrderCostsForCheckout next.

7.PipelineLink Name: validateOrderCostsForCheckout 
This processor validates that all order costs are accounted for by a PaymentGroup. Order costs are accounted for if there is only one PaymentGroup and it has no Relationships or if order level Relationships exist in the Order that cover the entire amount of the Order.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/ValidateOrderCostsForCheckout 
PipelineProcessor object: atg.commerce.order.processor.ProcValidateOrderCostsForCheckout 
Transitions: return value of 1 will execute validateHandlingInstructionsForCheckout next

8.PipelineLink Name: validateHandlingInstructionsForCheckout 
This processor validates that the total quantities in the HandlingInstructions do not exceed the amount assigned to the ShippingGroup. It does this by iterating over all the HandlingInstructions in the ShippingGroups and validating that the sum of the quantities in the HandlingInstructions do not exceed that which is assigned to the ShippingGroup. It will also catch errors if HandlingInstructions contain errors such as invalid ShippingGroup and CommerceItem IDs or CommerceItems that are not assigned to the ShippingGroup that contains the HandlingInstruction.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/ValidateHandlingInstructionsForCheckout
PipelineProcessor object: atg.commerce.order.processor.ProcValidateHandlingInstructionsForCheckout
Transitions: return value of 1 will execute validateCurrencyCodes next

9.PipelineLink Name: validateCurrencyCodes 
Verifies that all the PriceInfo objects in the Order have been priced using the same currency code. The currency code in the OrderPriceInfo object is the one that must be matched. The code checks the TaxPriceInfo object’s currency code in the Order and all the ShippingPriceInfo and ItemPriceInfo currency codes in all the ShippingGroups and CommerceItems, respectively.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/ValidateCurrencyCodes 
PipelineProcessor object: atg.commerce.order.processor.ProcValidateCurrencyCodes 
Transitions: Return value of 1 executes checkForDiscontinuedProducts next.

10.PipelineLink Name: checkForDiscontinuedProducts 
Ensures that the order does not contain any products that are no longer available
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/order/processor/CheckForDiscontinuedProducts 
PipelineProcessor object: atg.commerce.order.processor.ProcCheckForDiscontinuedProducts 
Transitions: None, this is the last link in the chain and will cause the PipelineManager to return to the caller.

No comments:

Popular Posts