1. What You Will Learn

After finishing this tutorial you will be able to use Exclusive Gateways correctly and to properly incorporate them into your PAK Workflows in the Editor. You can download the Editor here.

An exclusive gateway is a diversion point of a business process flow. For a given expression of the process, only one of the paths can be taken.
ExclusiveGateway
Figure 1. Exclusive Gateway

2. Prerequisites

To complete this guide you need:

  • Roughly 10 minutes

  • Installed PAK Editor

  • Installed PAK Workflow Executor

This HowTo does not contain a detailed introduction to the editor. Click here to learn everything about the PAK Workflow Editor.

3. Build the workflow

First you have to create a new BPMN

Editor NewBPMN
Figure 2. Editor New BPMN
With an Exclusive Gateway, the process flow is split into one of several flows depending on the conditions.
  1. Search for the Command “ChooseItem” under the “Commands” tab on the left side.

    Editor ChooseItem Command
    Figure 3. Editor ChooseItem Command
  2. Add the Command to your Workflow and configure its properties as shown in the picture.

    Inputs:

    • descriptiveText: “Choose your Task”

    • issueKeyList: “1,2,3”

Editor ChooseItem Exclusive
Figure 4. Editor ChooseItem Properties
  1. Then add the Exclusive Gateway from the controls to your Workflow.

    Editor Exclusive Gateway
    Figure 5. Editor Exclusive Gateway
    The gateway does not need any further editing. The label of the gateway can be removed by clicking on it and deleting it from the property on the right side
  2. Create three SimpleOK tasks, connect the Exclusive Gateway with edges to the three tasks and configure the properties of the tasks as shown in the picture.

    Editor SimpleOK Command
    Figure 6. Editor SimpleOK Command
    In this example we create three SimpleOK tasks and rename them to Task 1, Task 2, and Task 3
  3. Add the conditions to the paths.

    selectedItem == "1"
Editor Exlcusive Path 1
Figure 7. Editor Exclusive Path 1
selectedItem == "2"
Editor Exclusive Path 2
Figure 8. Editor Exclusive Path 2
selectedItem == "3"
Editor Exclusive Path 3
Figure 9. Editor Exclusive Path 3
  1. Then merge the paths through another Exclusive Gateway and add an end event to the BPMN

    Editor Exclusive Gateway Example
    Figure 10. Editor Exclusive Gateway Example

4. Test / Run the workflow

You can download the PAK Workflow Executor here.
You can download the Example Workflow here.
  1. Save your BPMN via the menu File → Save to your destination folder.

  2. Open the Workflow inside the Workflow Executor Application via the “Open new Workflow” Button.

  3. Start the workflow with the Play Button on the right side.

Executor Exclusive Start
Figure 11. Executor Exclusive Gateway Start
Executor Exclusive ChooseItem Task
Figure 12. Executor Exclusive Gateway ChooseItem
Executor Exclusive SimpleOK
Figure 13. Executor Exclusive Gateway SimpleOK
Executor Exclusive End
Figure 14. Executor Exclusive Gateway End

5. Summary

In this tutorial we have learned to use the Exclusive Gateway with a simple workflow, and to configure it so that it can determine the path.