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:

  1. PipelineLink name: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

    Nucleus component:/atg/commerce/approval/processor/AddApproverIdToOrder

    PipelineProcessor object:atg.b2bcommerce.approval.processor.ProcAddApproverIdToOrder

    Transitions: Return value of 1 executes addApproverMessagesToOrderForApproval next.

  2. 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 the orderApproved chain by the ApprovalFormHandler 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.

  3. 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. 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

    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.

loading table of contents...