Controlling Process Flow—Sequence Flows

Task # 4 is performed at the Contracts swimlane by the Contracts role. You will merge the outcome of the Approval Deal and Approval Terms User tasks. Data objects that have already been created (approveDealOutcome and approveTermsOutcome) will contain the values of outcome from the Approve Deal and Approve Terms User tasks, respectively.

How to do it...

  1. Merge Outcome: Merge the outcome of Approve Deal and Approve Term User tasks:
    • Go to Component Palette | BPM | Gateways
    • Click on Parallel Gateway
    • Click on the Contracts swimlane, where you want to place the Parallel Gateway
    • Name the Parallel Gateway Merge Approvals
    • Create an unconditional, unnamed sequence flow from the Approve Deal and Approve Terms User tasks to the gateway Merge Approvals.
    • When you have finished the preceding steps, click Save
  2. Create a Finalize User task:
    • Go to Component Palette | BPM | Activities
    • Select a User task from the interactive section
    • Click on the Contracts swimlane and position User task before theEnd event
    • In the User task Properties window, enter the following:
    • In the Basic tab, enter Name = Contract Finalize
    • Leave the implementation tab as default
    • When you have finished the preceding steps, click Save
    • Create an unconditional sequence flow from the gateway Approvals Outcome to the Contract Finalize User task.
    • Name the sequence flow as Approved
    • When you have finished the preceding steps, click Save
  3. Switch on Approve Deal and Approve Terms outcome:

    Post merger, you have to switch on the outcome of Approve Deal and Approve Terms User tasks. Create Exclusive Gateway to implement conditional switch on outcomes.

    • Go to Component Pallet | BPM | Gateway and select Exclusive Gateway
    • Click on the Contracts swimlane, where you want to place the Exclusive Gateway
    • Name the gateway Approvals Outcome
    • When you have finished the preceding steps, click Save
  4. Create sequence flows:

    To implement the outcome scenario

    If the outcome of Approve Deal OR Approve Terms User tasks is REJECT, then send the quote back to the Sales Representative

    Else: Send it to Finalize Contract User task

  5. When REJECT:
    • Click on the sequence flow icon on top of the process editor to create a sequence flow
    • Create a conditional sequence flow from the gateway Approvals Outcome to the Enter Quote User task.
    • Enter the following information in the properties of the sequence flow:
    • In the Description tab, enter Name = Deal or Terms Rejected
    • In the Properties tab, Type = Condition
    • In the Expression section, choose Simple Expression
    • Select Expression Builder
    • You can find the approveDealOutcome and approveTermsOutcome process Data objects. They hold the outcome values from User tasks:
    • approveDealOutcome == REJECT or approveTermsOutcome == REJECT
    • When you have finished, click Save
  6. When APPROVE:
    • Create an unconditional sequence flow from the Gateway Approvals Outcome to the Contract Finalize User task.
    • Name the sequence flow Approved
    • When you have finished the preceding steps, click Save
      How to do it...

How it works...

As per Process Flow:

If: the outcomes for the Approve Deal or the Approve Terms User tasks' is REJECT,

Else: The contract will be finalized.

You can also use the parallel gateway to merge process paths split by the parallel gateway. The merge of the parallel gateway waits for a token to arrive from each of the incoming sequence flows. After all tokens arrive, only one token is passed to the outgoing sequence flow.

In addition, you should design your process so that a token arrives for each incoming sequence flow, for the merging parallel gateway. If you do not, your process can freeze if the merger is expecting tokens that do not arrive.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.218.226