Working with parallel processes

A parallel process (or flow) is a collection of other process activities that are all nested within a parallel activity. The nested activities execute sequentially in an order that is dictated by links and transition conditions. When activities are arranged on separate control paths, the paths will execute concurrently.

Parallel activities are very versatile, and can add a depth to a long-running business process. You can use them to execute a few simple activities at the same time, or nest entire sub-processes within them. The process is complete after each of the activities have either been executed, or skipped in cases where the enabling condition evaluates to false.

You can create a parallel process as follows:

  1. Drop a parallel activity onto the canvas.
  2. Populate the parallel activity with the activities required to create the parallel flow.
  3. Link them up as follows:
    1. Hover your mouse pointer over the source activity until a yellow "lollipop" appears below it as shown in the image The yellow lollipop appears below an activityClick the yellow circle, and drag the link to the source activity and release the mouse button.
    2. Create the necessary links between each of the nested activities. When you are done, there should be a clear control path through the activities.
  4. Create any necessary conditions as follows:
    1. Click the link to highlight it.
    2. In the Details page of the properties area, click Create a new condition.
    3. Configure the condition using the settings on this page. You can use a Simple expression language (True, False, or Otherwise) or program the condition using either Java or XPath. If you choose Java, you can use the snippet editor to visually compose the code, or enter it directly into the Java editor yourself.
Here is an example of a parallel activity that processes a request to open a bank account.

In this process, the request to open a bank account comes in through the receive activity, and is evaluated by a Java snippet (GetCreditRating) to determine the customer's credit score. It is the credit score that determines how the process will proceed from here on in. The transition on the first link evaluates the score. If the score is too low, then that path to SetAnswerReject is followed, and this Java snippet activity rejects the request. If however, the score is acceptable, then the process flows through both of the other links concurrently (they are both set to 'otherwise'). Each of the activities on each of these paths are executed at the same time, and then account status is confirmed in the SetAnswerConfirm activity. Note that the confirmation activity cannot complete until all activities on both paths have been executed.
Related tasks
Working with structured activities
Linking activities within a parallel activity

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.