The checkApprovalComplete pipeline determines whether the approval process for the given order is complete. The checkApprovalComplete pipeline chain is executed by ApprovalCompleteService when the service receives an ApprovalUpdate message from the /Approval/ApprovalUpdate JMS message queue. The checkApprovalComplete() method adds the given Order and the ApprovalPipelineManager 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:
PipelineLink name:
getApprovalCompleteParamsThis processor takes properties from the
ApprovalUpdatemessage and adds them to the Map object that is passed to theApprovalPipelineManagerfor execution of thecheckApprovalCompletechain. You define the properties to take from theApprovalUpdatemessage in the.propertiesfile of this processor.Transactional mode: TX_MANDATORY
Nucleus component:
/atg/commerce/approval/processor/GetApprovalCompleteParamsPipelineProcessor object:
atg.b2bcommerce.approval.processor.ProcPopulatePipelineParamsTransitions: Return value of 1 executes
approvalCompleteAnalyzernext.PipelineLink name:
approvalCompleteAnalyzerThis processor determines whether the approval process for the given order is complete. By default,
approvalCompleteAnalyzerchecks whether at least one person has approved or rejected the order. If so, then the approval process for the order is considered to be complete.Note: You can change the implementation of
approvalCompleteAnalyzerin order to change the requirements for completion of the approval process.Transactional mode: TX_MANDATORY
Nucleus component:
/atg/commerce/approval/processor/ApprovalCompleteAnalyzerPipelineProcessor object:
atg.b2bcommerce.approval.processor.ProcApprovalCompleteAnalyzerTransitions: Returns a value of 0 if the approval process for the order isn’t complete (that is, the order requires further approvals); this stops execution of the chain, and the transaction commits. Returns a value of 1 if the order has been approved; this executes
changeOrderToApprovednext. Returns a value of 2 if the order has been rejected; this executeschangeOrderToFailedApprovalnext.PipelineLink name:
changeOrderToFailedApprovalThis processor sets the order’s state to FAILED_APPROVAL, as specified in the
newOrderStateproperty of the/atg/commerce/approval/processor/ChangeOrderToFailedApprovalcomponent.Transactional mode: TX_MANDATORY
Nucleus component:
/atg/commerce/approval/processor/ChangeOrderToFailedApprovalPipelineProcessor object:
atg.commerce.order.processor.ProcChangeOrderStateTransitions: Return value of 1 executes
sendApprovalCompleteMessagenext.PipelineLink name:
changeOrderToApprovedThis processor sets the order’s state to APPROVED, as specified in the
newOrderStateproperty of the/atg/commerce/approval/processor/ChangeOrderToApprovedcomponent.Transactional mode: TX_MANDATORY
Nucleus component:
/atg/commerce/approval/processor/ChangeOrderToApprovedPipelineProcessor object:
atg.commerce.order.processor.ProcChangeOrderStateTransitions: Return value of 1 executes
completeProcessingOrdernext.PipelineLink name:
completeProcessingOrderThis processor executes the
processOrderchain, passing the given order toprocessOrderas one of its parameters. The properties file for the/atg/commerce/approval/processor/CompleteProcessingOrdercomponent specifiesprocessOrderin thechainToRunproperty.Transactional mode: TX_MANDATORY
Nucleus component:
/atg/commerce/approval/processor/CompleteProcessingOrderPipelineProcessor object:
atg.commerce.order.processor.ProcExecuteChainTransitions: Return value of 1 executes
sendApprovalCompleteMessagenext.PipelineLink name:
sendApprovalCompleteMessageThis processor sends a message to the
/Approval/ScenariosJMS message topic that includes the order requiring approval and the profile repository item for the customer associated with the order. TheapprovalStatusproperty of the message is set to eitherapproval_passedorapproval_failed, depending on the state of the order. The message can then be used to execute scenarios.Transactional mode: TX_MANDATORY
Nucleus component:
/atg/commerce/approval/processor/SendApprovalCompleteMessagePipelineProcessor object:
atg.b2bcommerce.approval.processor.ProcSendApprovalCompleteMessageTransitions: None. This is the last processor in the pipeline, which causes the
ApprovalPipelineManagerto return to the caller.

