Skip to main content

Event-based Gateway

Introduction

Event-based Gateway

info

The Event-Based Gateway represents a branching point in the Process where the alternative paths that follow the Gateway are based on Events that occur, rather than the evaluation of Expressions using Process data (as with an Exclusive or Inclusive Gateway). A specific Event, usually the receipt of a Message, determines the path that will be taken. Basically, the decision is made by another Participant, based on data that is not visible to Process, thus, requiring the use of the Event-Based Gateway.

— BPMN 2.0.2 Standard, 10.6.6, Event-Based Gateway

In Flowable, Event-Based Gateways are used to model branches which are depending on the occurrence of two or more events. The process execution stops at the gateway and resumes once one of the events connected via Sequence Flow occur.

Example

The following example shows a process where an activation code is being sent out. The process then stops and waits until an acknowledgement message arrives or if 5 minutes elapsed.

Event-based gateway example workflow

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.

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 event-based gateway asynchronous, the listening for the events will be set up asynchronously in the background. Make sure you understand the implications of this.

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.