The orderRejected
pipeline chain processes a rejection of a given order. When an approver submits her rejection of an order via a form using the ApprovalFormHandler
, the form handler’s handleRejectOrder()
method executes the orderRejected
pipeline chain. The pipeline chain’s transaction mode is TX_REQUIRED.
The following sections describe each processor in the pipeline chain.
addApproverIdToOderForRejection
This processor adds the profile ID for the approver who rejected 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
Nucleus component: /atg/commerce/approval/processor/AddApproverIdToOrder
PipelineProcessor object: atg.commerce.approval.processor.ProcAddApproverIdToOrder
Transitions: Return value of 1 executes addApproverMessagesToOrderForRejection
next.
addApproverMessagesToOrderForRejection
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 rejection. It is passed to the orderRejected
chain by the ApprovalFormHandler
form handler, which is used to process the rejection.
Transactional mode: TX_MANDATORY
Nucleus component: /atg/commerce/approval/processor/AddApproverMessagesToOrder
PipelineProcessor object: atg.commerce.approval.processor.ProcAddApproverMessagesToOrder
Transitions: Return value of 1 executes sendApprovalUpdateMessageForRejection
next.
sendApprovalUpdateMessageForRejection
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 “rejected”. 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
Nucleus component: /atg/commerce/approval/processor/SendApprovalUpdateMessage
PipelineProcessor 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.