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 sections describe each processor in the pipeline chain.
getApprovalCompleteParams
This processor takes properties from the ApprovalUpdate message and adds them to the Map object that is passed to the ApprovalPipelineManager for execution of the checkApprovalComplete chain. You define the properties to take from the ApprovalUpdate message in the .properties file of this processor.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
approvalCompleteAnalyzer
This processor determines whether the approval process for the given order is complete. By default, approvalCompleteAnalyzer checks 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 approvalCompleteAnalyzer in order to change the requirements for completion of the approval process.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Returns a value of 0 if the approval process for the order is not 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 |
changeOrderToFailedApproval
This processor sets the order’s state to FAILED_APPROVAL, as specified in the newOrderState property of the /atg/commerce/approval/processor/ChangeOrderToFailedApproval component.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
changeOrderToApproved
This processor sets the order’s state to APPROVED, as specified in the newOrderState property of the /atg/commerce/approval/processor/ChangeOrderToApproved component.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
completeProcessingOrder
This processor executes the processOrder chain, passing the given order to processOrder as one of its parameters. The properties file for the /atg/commerce/approval/processor/CompleteProcessingOrder component specifies processOrder in the chainToRun property.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
sendApprovalCompleteMessage
This processor sends a message to the /Approval/Scenarios JMS message topic that includes the order requiring approval and the profile repository item for the customer associated with the order. The approvalStatus property of the message is set to either approval_passed or approval_failed, depending on the state of the order. The message can then be used to execute scenarios.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | None. This is the last processor in the pipeline, which causes the |

