How to use an Exclusive Gateway
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. |
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
With an Exclusive Gateway, the process flow is split into one of several flows depending on the conditions. |
-
Search for the Command „ChooseItem“ under the „Commands“ tab on the left side.
Figure 3. Editor ChooseItem Command -
Add the Command to your Workflow and configure its properties as shown in the picture.
Inputs:
-
descriptiveText: „Choose your Task“
-
issueKeyList: „1,2,3“
-
-
Then add the Exclusive Gateway from the controls to your Workflow.
Figure 5. Editor Exclusive GatewayThe 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 -
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.Figure 6. Editor SimpleOK CommandIn this example we create three SimpleOK tasks and rename them to Task 1, Task 2, and Task 3 -
Add the conditions to the paths. (Learn more about pathing conditions here)
selectedItem == "1"
selectedItem == "2"
selectedItem == "3"
-
Then merge the paths through another Exclusive Gateway and add an end event to the BPMN
Figure 10. Editor Exclusive Gateway Example
In this example all paths are filled with a condition, but Exclusive Gateways also allow us to let exact one path empty. The empty path will be considered to be the default path when no other conditional path matches. That is very useful for simple yes no conditions in which you do not want to just write the negative term of the condition e.g number == 1 and number != 1. |
4. Test / Run the workflow
You can download the PAK Workflow Executor here. |
You can download the Example Workflow here. |
-
Save your BPMN via the menu File → Save to your destination folder.
-
Open the Workflow inside the Workflow Executor Application via the „Open new Workflow“ Button.
-
Start the workflow with the Play Button on the right side.