Skip to main content

Exclusive Gateway

Introduction

Exclusive Gateway

info

A diverging Exclusive Gateway (Decision) is used to create alternative paths within a Process flow. This is basically the "diversion point in the road" for a Process. For a given instance of the Process, only one of the paths can be taken.

— BPMN 2.0.2 Standard, 10.6.2, Exclusive Gateway

Exclusive gateways are one of the most common sights within a process model. They are used to model decisions within a process.

To decide which route the process follows, the conditions on the outgoing Sequence Flows are checked. The conditions are modeled as an expression and must always evaluate to a boolean value of true or false. It is important to understand that the conditions of an exclusive gateway are not modeled on the gateway itself but rather on the outgoing sequence flows.

If more than one condition evaluates to true, the path that was defined first is chosen. This should obviously never happen. If no condition evaluates to true, the process is stuck.

There is the possibility to mark a Sequence Flow as Default Flow. If you do so, the flow follows this route if no condition matches.

Example

The following example shows how an Exclusive gateway is used to model a simple decision.

Exclusive gateway

Properties

General

AttributeTypeDescriptionCategory
Model Id Text

Model Id identifies the element within the process model.

The model id, name and documentation properties can be found on any element. They are used respectively to uniquely identify the gateway, to give the gateway a user-friendly name and to add a free-form description.

Name Expression usage possibleText

The name of the element. This is the name displayed in the diagram.

Documentation Multiline Text

A free-form text that can be used to explain details about the particular element.

Flow order FlowOrder

The order in which the outgoing flows will be evaluated and stored in the XML representation of the process.

For some use cases, the order in which the sequence flow are evaluated is important.

The order of how the conditions on the sequenceflows are evaluated can be configured here, from top (first) to bottom (last).

Advanced

AttributeTypeDescriptionCategory
Include in history Boolean

When the history level is set to "instance" or "task" level with this property it can be configured if this activity instance should be included in the historic activity data.

The Include in history flag can be used to store the historical entry of this gateway when running with a history level that normally would not store the execution of the gateway.

Note that this flag has no effect when running with history level 'none'.

Asynchronous Boolean

When enabled, the activity will be started as an asynchronous job. The process state is persisted before this element is executed. Then, the process execution will be resumed asynchroneously. This can be used when the execution an activity takes a long time to return the UI to the user quicker in case the user does not need to see the next step immediately. However, if an error occurs before the following wait state, there will be no direct user feedback. Please refer to the documentation for more details.

When making an exclusive gateway asynchronous, the evaluation of conditions on outgoing sequenceflow will be done asynchronously and subsequent steps will be executed in the background.

Choose exclusive to avoid other asynchronous steps of this process instance to run at the same time.

Exclusive Boolean

Determines whether the activity or process is run as an exclusive job. An exclusive job makes sure that no other asynchronous exclusive activities within the same process are performed at the same time. This helps to prevent failing jobs in concurrent scenarios.

Leave asynchronously Boolean

When enabled, the activity will be left as an asynchronous job. This means that the activity is ended asynchronously, including end execution listeners. Please refer to the documentation for more details.

Leave exclusive Boolean

Determines whether the activity should leave as an exclusive job. An exclusive job makes sure that no other asynchronous exclusive activities within the same process are performed at the same time. This helps to prevent failing jobs in concurrent scenarios.

Job Category Expression usage possibleText

When set, the underlying generated job will have a Job Category, which will be executed only by Application Servers, where the Process Engine has enabledJobCategories set to this category.

Visual

AttributeTypeDescriptionCategory
Font size Selection:
  • 8
  • 9
  • 10
  • 11
  • 12
  • 14
  • 18
  • 20
  • 24
  • 36
  • 48
  • 72

Font size.

Visual properties that determine how the gateway is shown in the diagram.

This has no impact on the runtime execution.

Border color RequiredColor

The border color of the element in the diagram.

Font weight Selection:
  • Normal
  • Bold

Select the style between bold and normal.

Font style Selection:
  • Normal
  • Italic

Select the style between italic and normal.

Font color Color

Select a font color.

Background color RequiredColor

The background color of the element in the diagram.