Control Flow - Join, Split and Loop

As we have already mentioned, our sequence of activities is not a linear structure. The activity Notify Customer has not yet been defined as a successor activity of any other one. ACME wants to differentiate between two paths in the process definition:

Which path the process will go depends on the state of the support case. If the activity Analyze To Solve set this variable to "C" which stands for the CLOSED state, the first option will be realized. If the same variable has been set to "R", standing for REJECTED, the activity Notify Customer will follow. This means that processing of the support case needs to be split into two branches at activity Analyze To Solve. Our diagram has to reflect this.

Setting the Control Flow

Before we can create a transition between the activities Analyze To Solve and Notify Customer, we have to redefine the properties of the activity Analyze To Solve to make it a node where the split occurs. Additionally, we will add a loop allowing to perform this activity as long as it does not reach one of the mentioned states: CLOSED or REJECTED.

To introduce these supplements to our activity graph, proceed as follows:

  1. Double-click the symbol Analyze To Solve to open its properties dialog.
  2. In the property dialog select Control Flow on the left side.
  3. Select the radio button XOR in the Split section.
  4. Select the radio button XOR in the Join section (needed later to create the loop transition).
  5. Now OK the properties dialog.

Control Flow
Figure: Defining Control Flow of an Activity

! Tip: You may need to adjust the placement of your activities to make the newly added split gateways clearly visible. Adjusting the diagram viewing percentage (zoom) on the Eclipse main toolbar can help you see the overall layout of your diagram.

Adding the Transition

Now you can add the missing transition between Analyze To Solve and the activity Notify Customer:

  1. In the diagram toolbar palette, select Connect.
  2. Click XOR split gateway (diamond) that has an arrow pointing into it coming from Analyze To Solve. In the suggested layout (see below) this is the lower diamond below Analyze To Solve.
  3. Then click activity Notify Customer.

An ACME Support Case needs to remain with the Analyze To Solve activity until it is either Closed or Rejected. Thus a loop is needed around Analyze To Solve.

To add the loop transition:

  1. In the diagram toolbar palette select Connect.
  2. Click the XOR split gateway of the Analyze To Solve activity.
  3. Click the XOR join gateway of the Analyze To Solve activity.

Now, the newly created loop is in the process definition. The process diagram should now be similar to this: 

Analyze loop
Figure: Activities Graph with a Join, a Split and a Loop

Now the question arises how to make  the successor activities of Analyze To Solve conditional depending on the state of the support case. Each transition between activities has a condition, which by default is set to TRUE; this condition can be redefined.

Defining Transition Conditions

We have defined a split in our process and need transition conditions between the activity Analyze To Solve and its successors. To define the transition condition between Analyze To Solve and Deliver Patch:

First Analyze loop transition
Figure: Setting the Transition Condition between Analyze To Solve and Deliver Patch

Likewise, define the transition condition between Analyze To Solve and Notify Customer:

First Analyze loop transition
Figure: Setting the Transition Condition between Analyze To Solve and Notify Customer

Likewise, define the transition condition between Analyze To Solve and its third successor Analyze To Solve:

Analyze loop transition
Figure: Setting a Transition Condition

! Tip: There is another option for implementing the Analyze To Solve repeat loop. You can choose the condition type OTHERWISE. This will cause the transition to only evaluate to true, when all the other conditions on the split have false values.

OTHERWISE Condition
Figure: OTHERWISE Condition

Please note that once you changed the Condition Type, the entry in the Condition Expression editor will be lost.

The diagram with the transition conditions will look like the following now:

Diagram with Transition Conditions
Figure: Diagram with Transition Conditions