Adding Gateways - AND, XOR and OR

While creating a worklfow process of an organization, you need to take into account that workflow or activities are not necessarily sequential. At some step, decisions taken would direct the workflow and hence the workflow becomes linear. To create such workflows, you need to add gateways of different types.

As 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 activity. The organization wants to differentiate between two paths in the process definition:

Which path the process goes 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 is realized. If the same variable has been set to "R", standing for REJECTED, the activity Notify Customer follows. This means that processing of the support case needs to be split into two branches at activity Analyze To Solve. Our process diagram should reflect this.

Adding a Join Gateway

To add a Join gateway, perform the following steps:

  1. Hover the mouse over Enter Data activity and click the Gateway icon


    Figure: Enter Data - Click Gateway Icon

  2. Drop the gateway in proximity of the Analyze to Solve activity and inside the Analyze Issues lane.


    Figure: Join Gateway

  3. Open the properties of the newly added gateway.
  4. In the Name field, specify name as Join.
  5. Ensure that Gateway Type is XOR.


    Figure: Gateway Properties

  6. Hover the mouse over the Join gateway and click the Sequence Flow icon


    Figure: Join Gateway - Click Sequence Flow Icon

  7. Connect the Analyze to Solve activity with Join Gateway


    Figure: Join Gateway - Analyze to Solve

Adding a Split Gateway

In case the Analyze to Solve activity decision states that you need to Notify Customer if the Product State is Rejected. If the Product State is Closed then the flow should go to Deliver Patch activity. To handle this flow, you need to add one more split gateway from Analyze to Solve activity.

To add split gateway, perform the following steps:

  1. Hover the mouse over the Analyze to Solve activity and click the Gateway icon


    Figure: Analyze to Solve - Click Sequence Flow Icon

  2. Drop the gateway in proximity of the Join gateway and in the Analyze Issues lane.


    Figure: Gateway

  3. Open the properties of the newly added gateway.
  4. In the Name field, specify name as Split.
  5. Ensure that Gateway Type is XOR.


    Figure: Gateway Properties

  6. Hover the mouse over the Split gateway and click the Sequence Flow icon.


    Figure: Split Gateway - Sequence

  7. Connect the Notify Customer activity with the split gateway.


    Figure: Connect Split Gateway with Notify Customer

  8. Hover the mouse over the Split gateway and click the Sequence Flow icon.


    Figure: Split Gateway - Sequence

  9. Connect the Deliver Patch activity with the split gateway.


    Figure: Connect Split Gateway with Deliver Patch

Adding Conditions

We need to add conditions based on the Product State. Perform the following steps:

  1. Select the sequence flow from the Split gateway to the Notify Customer activity. The Conditional Sequence Flow properties are displayed.


    Figure: Sequence Flow and Conditional Sequence Flow Properties

  2. In the Condition Expression editor, specify condition as SupportCaseData.Product.State=="R".


    Figure: Conditional Sequence Flow - Condition Expression

  3. Similarly, add condition SupportCaseData.Product.State=="C" for the sequence flow from the Split gateway to the Deliver Patch activity.


    Figure: Conditional Sequence Flow - Condition Expression

Adding Default Flow

If both the conditions added at split gateway are evaluated as false then the repeat loop needs to be added for the Analyze to Solve activity. This will cause the transition to only evaluate to true. To do that, you need to add transition from the Split gateway to the Join gateway as Default. Perform the following steps:

  1. Connect the Split gateway with the Join gateway


    Figure: Conditional Sequence Flow - Condition Expression

  2. Select the added sequence flow.
  3. In the Conditional Sequence Flow property panel, select the Default Flow check box.


    Figure: Select Default Flow

  4. Note that a slash through is added to the sequence flow.


    Figure: Default Flow - Slash through

The process flow diagram would look like as shown in the following screenshot:


Figure: Process Flow