Gateways are used to control how the process flows. In Business Process Model and Notation (BPMN) definition, only sequence flow will affect the flow of work and message flow should not affect the flow of work. If you want to know message flow usage, please see How does BPMN message flow work? article. Gateways can only be connected by sequence flow only. This article will show different type of gateways and their behavior with Business Process Animacian.
Below image shows correct gateways usage:
Below image shows incorrect gateways usage:
Type of gateways
There are 5 types of gateways in BPMN. These five types of gateways are Exclusive Gateway, Event-Based Gateway, Inclusive Gateway, Parallel Gateway and Complex Gateway. Below image show the graphical notation of different type of BPMN gateways.
Exclusive gateway is a diversion point of a business process flow. For a given instance of the process, there is only one of the paths can be taken. See below business process diagram. If the order amount is greater than 1,000, we will request deposit from customer. If the order amount is 1,000 or less, we will deliver goods directly. There is only two possible path of the business process and these two possible paths will only execute one but not both. Please see Exclusive gateways example animation.
The suggested modeling of gateways is 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 automatic process), the condition will evaluate one by one and once the first condition is fulfilled, we still trigger the connected activity and stop evaluate other condition.
Exclusive gateway with default sequence flow
As we discussed above, exclusive gateway only run one and only one path of the out-going sequence flow and evaluate condition by condition. You may want to know how about all condition are not fulfilled? In this case, the default sequence flow will be triggered. When all condition are evaluated and no one is fulfilled, the default sequence flow will be triggered.
Inclusive gateway is also a division point of the business process. Unlike the exclusive gateway, inclusive gateway may trigger more than 1 out-going paths. Since inclusive gateway may trigger more than 1 out-going paths, the condition checking process will have a little bit different then the exclusive gateway. All out-going conditions will be evaluated no matter has fulfilled out-going flow or not. Below business process diagram show a typical inclusive gateway usage.
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 inclusive gateway by popup menu. Please see below image for more detail:
Event-Based Gateway are similar to exclusive gateway but the trigger of gateway is base on event occur instead of evaluate condition. We can imagine when our process arrived to event-based gateway, we will wait until something is happen. The event usually trigged by third party (e.g. our customer send payment to us). Below is typical event-based gateway. We send a quotation to customer and waiting for customer to confirm the order. If customer sends confirmation, we will prepare goods for customer. If we don’t receive any confirmation from customer after 15 days, we will send reminder to customer.
A parallel gateway is used to visualize concurrent execution of activities. We the process arrive to parallel gateway node, the work will split into multiple token and will merge when reach to the joining parallel gateway. Bellow in typical example of parallel gateway.
Complex gateway is used to model complex synchronization behavior. We don’t suggest modeler to use complex gateway too often. Please try to use combination of different gateway types before decided to use complex gateway.