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 list describes each processor in the pipeline chain:
PipelineLink name:
addApproverIdToOrderForApproval
This processor adds the profile ID for the approver who approved the order to the order’s
approverIds
property. TheapproverIds
property contains a list of approvers who have approved or rejected the order.Transactional mode: TX_MANDATORY
Nucleus component:
/atg/commerce/approval/processor/AddApproverIdToOrder
PipelineProcessor object:
atg.b2bcommerce.approval.processor.ProcAddApproverIdToOrder
Transitions: Return value of 1 executes
addApproverMessagesToOrderForApproval
next.PipelineLink name:
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 theorderApproved
chain by theApprovalFormHandler
form handler, which is used to process the approval.Transactional mode: TX_MANDATORY
Nucleus component:
/atg/commerce/approval/processor/AddApproverMessagesToOrder
PipelineProcessor object:
atg.b2bcommerce.approval.processor.ProcAddApproverMessagesToOrder
Transitions: Return value of 1 executes
sendApprovalUpdateMessageForApproval
next.PipelineLink name:
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. TheapprovalStatus
property of the message is set to “approved”. TheApprovalCompleteService
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
Nucleus component:
/atg/commerce/approval/processor/SendApprovalUpdateMessage
PipelineProcessor object:
atg.b2bcommerce.approval.processor.ProcSendApprovalMessage
Transitions: None. This is the last processor in the pipeline, which causes the
ApprovalPipelineManager
to return to the caller.