Gateways are used to control the flow of a process, often based on a condition. Gateways can be used to branch into separate paths or merge onto a common path. Gateways are shown in the diagram as diamonds. The symbol inside the diamond indicates the type of gateway.
This example shows part of a request process and includes two gateways. Both gateways in the process are exclusive gateways. Exclusive gateways control flow based on decisions.
In the example above, all the flow lines are drawn, but the logic for the first gateway is not yet complete. We would like this gateway to direct flow based on the amount of the request. Let's walk through it.
After the first activity completes, flow arrives at the gateway. Then, coming out of the gateway, there are two paths. If the request is over a certain amount, manager approval is required. Otherwise, it flows past the approval step. Here are the steps to configure the gateway:
- Select the gateway to see the configuration panel for it:
- With the General Settings tab selected, add a name for the gateway. A good convention is to phrase the name as a question: Over Limit
- Select the wire leading from the gateway to add a name. Here, we will name it by answering the question: No
- Select the next wire and name it: Yes
- Select the gateway again and click the Conditions tab
- One path will be the default. Expand the panel for that flow line and set it to the default path using the checkbox at the bottom:
- Expand the other path and add a condition based on data in your process:
Parallel gateways are used to split or join flow paths in a process. Splits are used to branch from one flow into two or more parallel directions. Joins are used to merge flow, waiting for execution to complete on each path leading into them before proceeding.
The example below shows two parallel gateways, a split and a join. When this process begins, the first gateway splits the flow into two directions. This causes two activities to be assigned at the same time, one to each team.
The second gateway joins the two paths into one. Once both of the estimation activities complete, flow proceeds to the last activity.
For more details on gateways, including inclusive and event gateways, see the Camunda documentation.