Gateways is a BPMN notation used to control how a process flows. Connected by sequence flows, a gateway acts as a decision point that decides which (outgoing) sequence flow to take based on the result of the evaluation of condition(s) specified. According to the Business Process Model and Notation (BPMN)’s definition, only sequence flow will affect the flow of activities while message flow does not. If you want to know message flow usage, please see How does BPMN message flow work? article. In this article, we will show you the different types of gateways and their behavior using the BPMN modeler featured by Visual Paradigm.
The image below gives a BPMN example diagram that uses gateways in forming a flow. The gateways are colorized in orange:
The image below gives an example of an incorrect use of gateways:
Types of gateway
BPMN defines 5 types of gateways, which include: Exclusive Gateway, Event-Based Gateway, Inclusive Gateway, Parallel Gateway, and Complex Gateway. The image below shows the graphical notation of the different types of BPMN gateways.
An exclusive gateway is a diversion point of a business process flow. For a given instance of the process, only one of the paths can be taken. Take a look at the business process diagram below. If the order amount is greater than 1,000, we will request the customer for a deposit. If the order amount is 1,000 or less, we will deliver goods directly. There are only two possible paths of the business process and either of them will be executed, but not both. Please see the Exclusive gateways example animation.
The suggested way to mode gateways is to state the checking (question) in the gateway (diamond shape) and state the condition in the sequence flow. When the business process is executed (either by manual process or with the automatic process), the condition will be evaluated one by one and once the first condition is fulfilled, we still trigger the connected activity and stop evaluate other conditions.
Exclusive gateway with a default sequence flow
As we discussed above, an exclusive gateway only takes one outgoing path and disregard the rest. So what if the conditions of all outgoing paths are not fulfilled? In such a case, the default sequence flow will be triggered.
An inclusive gateway is also a division point of the business process. Unlike the exclusive gateway, an inclusive gateway may trigger the execution of more than one out-going flows. Since an inclusive gateway may trigger more than one out-going flows, the condition checking process is a bit different from the exclusive gateway. Under an inclusive gateway, all the out-going conditions will be evaluated. The business process diagram below shows an example of an inclusive gateway.
Following are all possible paths of the business process
- Ship all goods by air
- Ship all goods by sea
- Ship some goods by air and others by sea.
You can set the gateway to an inclusive gateway by popup menu. Please see the image below for detail:
Event-Based Gateway is similar to the exclusive gateway but the triggering of outgoing flow is based on the occurrence of an event instead of condition evaluation. When the flow arrives at an event-based gateway, the process will be paused until something has happened. An event-based gateway is usually triggered by a third party (e.g., the receipt of payment issued by a customer). The image below gives an example of an event-based gateway. We send a quotation to the customer and wait for his confirmation of the order. If the customer sends us a confirmation, we will proceed to prepare the goods for him/her. If we haven’t received any confirmation from the customer after in days, we will send the customer a reminder.
A parallel gateway is used to visualize the concurrent execution of activities and is used in pairs. When the process arrives at the parallel gateway node, all the outgoing flows exhibited from the gateway will be executed simultaneously. The flow will be merged at the joining parallel gateway. The image below shows an example of a parallel gateway.
A complex gateway is used to model complex synchronization behavior. We don’t suggest using a complex gateway too often. Please try to use a combination of different gateway types before deciding to use a complex gateway.