The orderApproved pipeline chain processes an approval of a given order. When an approver submits her approval of an order via a form using the ApprovalFormHandler, the form handler’s handleApproveOrder() method executes the orderApproved pipeline chain. The pipeline chain’s transaction mode is TX_REQUIRED.

The following sections describe each processor in the pipeline chain.

addApproverIdToOrderForApproval

This processor adds the profile ID for the approver who approved the order to the order’s approverIds property. The approverIds property contains a list of approvers who have approved or rejected the order.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/approval/processor/AddApproverIdToOrder

Object

atg.commerce.approval.processor.ProcAddApproverIdToOrder

Transitions

Return value of 1 executes addApproverMessagesToOrderForApproval next.

addApproverMessagesToOrderForApproval

This processor adds the message that the approver attaches to the order to the list of messages in the order’s approverMessages property. The message typically indicates the reason for approval. It is passed to the orderApproved chain by the ApprovalFormHandler form handler, which is used to process the approval.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/approval/processor/AddApproverMessagesToOrder

Object

atg.commerce.approval.processor.ProcAddApproverMessagesToOrder

Transitions

Return value of 1 executes sendApprovalUpdateMessageForApproval next.

sendApprovalUpdateMessageForApproval

This processor sends an ApprovalUpdate message that includes the order requiring approval and the profile repository item for the customer associated with the order to both the /Approval/ApprovalUpdate JMS message queue and the /Approval/Scenarios JMS message topic. The approvalStatus property of the message is set to “approved”. The ApprovalCompleteService listens for the message sent to the /Approval/ApprovalUpdate JMS message queue. The message sent to /Approval/Scenarios can be used to execute scenarios.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/approval/processor/SendApprovalUpdateMessage

Object

atg.commerce.approval.processor.ProcSendApprovalMessage

Transitions

None. This is the last processor in the pipeline, which causes the ApprovalPipelineManager to return to the caller.


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