Chapter 25. Event Types

Events are triggers that impact a business process. Events are classified as:

  • Start events

    Indicate the beginning of a business process.

  • End events

    Indicate the completion of a business process.

  • Intermediate events

    Drive the flow of a business process.

Every event has an event ID and a name. You can implement triggers for each of these event types to identify the conditions under which an event is triggered. If the conditions of the triggers are not met, the events are not initialized, and the process flow does not complete.

25.1. Start Event

Every process must have at least one start event with no incoming and exactly one outgoing flow.

Multiple start event types are supported:

  • None Start Event
  • Signal Start Event
  • Timer Start Event
  • Conditional Start Event
  • Message Start Event
  • Compensation Start Event
  • Error Start Event
  • Escalation Start Event

All start events, except for the None Start Event, define a trigger. When you start a process, the trigger needs to be fulfilled. If no start event can be triggered, the process is never instantiated.

25.1.1. Start Event types

25.1.1.1. None Start Event

The None Start Event is a start event without a trigger condition. A process or a sub-process can contain at most one None Start Event, which is triggered on process or sub-process start by default, and the outgoing flow is taken immediately.

When used in a sub-process, the execution is transferred from the parent process into the sub-process and the None Start Event is triggered. That means that the token is taken from the parent sub-process activity and the None Start Event of the sub-process generates a token.

25.1.1.2. Message Start Event

A process or an event sub-process can contain multiple Message Start Events, which are triggered by a particular message. The process instance with a Message Start Event only starts its execution from this event after it has received the respective message. After the message is received, the process is instantiated and its Message Start Event is executed immediately (its outgoing Flow is taken).

As a message can be consumed by an arbitrary number of processes and process elements, including no elements, one message can trigger multiple Message Start Events and therefore instantiate multiple Processes.

Attributes
MessageRef
ID of the expected Message object

25.1.1.3. Timer Start Event

The Timer Start Event is a Start Event with a timing mechanism. For more information about timing, see Chapter 24, Timing.

A process can contain multiple Timer Start Events, which are triggered at the start of the process, after which the timing mechanism is applied.

When used in a sub-process, the execution is transferred from the parent process into the sub-process and the Timer Start Event is triggered. The token is taken from the parent sub-process activity and the Timer Start Event of the sub-process is triggered and waits for the timer to trigger. Once the time defined by the timing definition has been reached, the outgoing flow is taken.

Attributes
Time Cycle
Repeatedly triggers the timer after a specific time period. If the period is 0, the timer is triggered only once.
Time Cycle Language

Set to None for the default interval, or Cron for the following Time Cycle property format:

[\#d][\#h][\#m][\#s][#[ms]]
Time Duration
Marks the timer as a one-time expiration timer. It is the delay after which the timer fires. Possible values are a String interval, a process variable, or the ISO-8601 date format.
Time Date
Starts the process at the specified date and time in the ISO-8601 date format.

25.1.1.4. Escalation Start Event

The Escalation Start Event is a start event that is triggered by an escalation with a particular escalation code. For further information, see Section 22.3, “Escalation”.

Process can contain multiple Escalation Start Events. The process instance with an Escalation Start Event starts its execution when it receives the defined escalation object. The process is instantiated and the Escalation Start Event is executed immediately, which means its outgoing flow is taken.

Attributes
Escalation Code
Expected escalation Code.

25.1.1.5. Conditional Start Event

The Conditional Start Event is a start event with a Boolean condition definition. The execution is triggered always when the condition is first evaluated to false and then to true. The process execution starts only if the condition is evaluated to true after the start event has been instantiated.

A process can contain multiple Conditional Start Events.

Attributes
Expression
A Boolean condition that starts the process execution when evaluated to true.
Language
A language of the Expression attribute.

25.1.1.6. Error Start Event

A process or sub-process can contain multiple Error Start Events, which are triggered when an Error object with a particular ErrorRef property is received. The error object can be produced by an Error End Event, and it signalizes an incorrect process ending. The process instance with the Error Start Event starts execution after it has received the respective error object. The Error Start Event is executed immediately upon receiving the error object, which means its outgoing Flow is taken.

Attributes
ErrorRef
A code of the expected error object.

25.1.1.7. Compensation Start Event

A Compensation Start Event is used to start a Compensation Event sub-process when using a sub-process as the target activity of a Compensation Intermediate Event.

25.1.1.8. Signal Start Event

The Signal Start Event is is triggered by a signal with a particular signal code. For further information, see Section 22.1, “Signals”.

A process can contain multiple Signal Start Events. The Signal Start Event only starts its execution within the Process instance after the instance has received the respective Signal. Then, the Signal Start Event is executed, which means its outgoing flow is taken.

Attributes
SignalRef
The expected Signal Code.

25.2. Intermediate Events

25.2.1. Intermediate Events

“... the Intermediate Event indicates where something happens (an Event) somewhere between the start and end of a Process. It will affect the flow of the Process, but will not start or (directly) terminate the Process.[3]

An intermediate event handles a particular situation that occurs during process execution. The situation is a trigger for an intermediate event.

In a process, intermediate events can be placed as follows:

On an activity boundary with one outgoing flow

If the event occurs while the activity is being executed, the event triggers its execution to the outgoing flow. One activity may have multiple boundary intermediate events. Note that depending on the behavior you require from the activity with the boundary intermediate event, you can use either of the following intermediate event types:

  • Interrupting: The activity execution is interrupted and the execution of the intermediate event is triggered.
  • Non-interrupting: The intermediate event is triggered and the activity execution continues.

Based on the type of the event trigger, the following Intermediate Events are distinguished:

Timer Intermediate Event
Delays the execution of the outgoing flow.
Conditional Intermediate Event
Is triggered when its condition evaluates to true.
Error Intermediate Event
Is triggered by an error object with the given error code.
Escalation Intermediate Event

Has two subtypes:

  • Catching Escalation Intermediate Event, which is triggered by an escalation event.
  • Throwing Escalation Intermediate Event, which produces an escalation event when executed.
Signal Intermediate Event

Has two subtypes:

  • Catching Signal Intermediate Event, which is triggered by a signal.
  • Throwing Signal Intermediate Event, which produces a signal when executed.
Message Intermediate Event

Has two subtypes:

  • Catching Message Intermediate Event, which is triggered by a message object.
  • Throwing Message Intermediate Event, which produces a message object when executed.
Compensation Intermediate Event

Has two subtypes:

  • Catching Compensation Intermediate Event, which is triggered by a compensation object.
  • Throwing Compensation Intermediate Event, which produces a compensation object when executed.

25.2.2. Intermediate Event types

25.2.2.1. Timer Intermediate Event

A timer intermediate event allows you to delay workflow execution or to trigger the workflow execution periodically. It represents a timer that can trigger one or multiple times after a given period of time. When triggered, the timer condition, that is the defined time, is checked and the outgoing flow is taken. For more information about timing, see Chapter 24, Timing.

When placed in the process workflow, a timer intermediate event has one incoming flow and one outgoing flow. Its execution starts when the incoming flow transfers to the event. When placed on an activity boundary, the execution is triggered at the same time as the activity execution.

The timer is canceled if the timer element is canceled, for example by completing or aborting the enclosing process instance.

Attributes
Time Cycle
Repeatedly triggers the timer after a specific time period. If the period is 0, the timer is triggered only once.
Time Cycle Language

Set to None for the default interval, or Cron for the following Time Cycle property format:

[\#d][\#h][\#m][\#s][#[ms]]
Time Duration
Marks the timer as a one-time expiration timer. It is the delay after which the timer fires. Possible values are a String interval, a process variable, or the ISO-8601 date format.
Time Date
Triggers the timer at the specified date and time in the ISO-8601 date format.

25.2.2.2. Conditional Intermediate Event

A Conditional Intermediate Event is an intermediate event with a boolean condition as its trigger. The event triggers further workflow execution when the condition evaluates to true and its outgoing flow is taken.

The event must define the Expression property. When placed in the process workflow, a Conditional Intermediate Event has one incoming flow, one outgoing flow, and its execution starts when the incoming flow transfers to the event. When placed on an activity boundary, the execution is triggered at the same time as the activity execution. Note that if the event is non-interrupting, the event triggers continuously while the condition is true.

Attributes
Expression
A Boolean condition that triggers the execution when evaluated to true.
Language
A language of the Expression attribute.

25.2.2.3. Compensation Intermediate Event

A compensation intermediate event is a boundary event attached to an activity in a transaction sub-process. It can finish with a compensation end event or a cancel end event. The compensation intermediate event must be associated with a flow, which is connected to the compensation activity.

The activity associated with the boundary compensation intermediate event is executed if the transaction sub-process finishes with the compensation end event. The execution continues with the respective flow.

25.2.2.4. Message Intermediate Event

A Message Intermediate Event is an intermediate event that allows you to manage a message object. Use one of the following events:

  • Throwing Message Intermediate Event produces a message object based on the defined properties.
  • Catching Message Intermediate Event listens for a message object with the defined properties.
Throwing Message Intermediate Event

When reached during execution, a Throwing Message Intermediate Event produces a message object and the execution continues to its outgoing Flow.

Attributes
MessageRef
ID of the produced Message object.
Catching Message Intermediate Event

When reached during execution, a Catching Message Intermediate Event awaits a message object defined in its properties. Once the message object is received, the event triggers execution of its outgoing flow.

Attributes
MessageRef
ID of the expected Message object.
CancelActivity
If the event is placed on the boundary of an activity and Cancel Activity property is set to true, the activity execution is canceled when the event receives its escalation object.

25.2.2.5. Escalation Intermediate Event

An Escalation Intermediate Event is an intermediate event that allows you to produce or consume an escalation object. Depending on the action the event element should perform, you need to use either of the following:

  • Throwing Escalation Intermediate Event produces an escalation object based on the defined properties.
  • Catching Escalation Intermediate Event listens for an escalation object with the defined properties.
Throwing Escalation Intermediate Event

When reached during execution, a Throwing Escalation Intermediate Event produces an escalation object and the execution continues to its outgoing flow.

Attributes
EscalationCode
ID of the produced escalation object.
Catching Escalation Intermediate Event

When reached during execution, a Catching Escalation Intermediate Event awaits an escalation object defined in its properties. When the object is received, the event triggers execution of its outgoing Flow.

Attributes
EscalationCode
Code of the expected Escalation object.
CancelActivity
If the event is placed on the boundary of an activity and Cancel Activity property is set to true, the activity execution is canceled when the event receives its escalation object.

25.2.2.6. Error Intermediate Event

An Error Intermediate Event is an intermediate event that can be used only on an activity boundary. It allows the process to react to an Error End Event in the respective activity. The activity must not be atomic. When the activity finishes with an Error End Event that produces an error object with the respective ErrorCode property, the Error Intermediate Event catches the error object and execution continues to its outgoing flow.

25.2.2.6.1. Catching Error Intermediate Event

When reached during execution, a Catching Error Intermediate Event awaits an error object defined in its properties. Once the object is received, the event triggers execution of its outgoing Flow.

Attributes
ErrorRef
The reference number of the expected error object.

25.2.2.7. Signal Intermediate Event

A Signal Intermediate Event enables you to produce or consume a signal object. Use either of the following:

  • Throwing Signal Intermediate Event produces a signal object based on the defined properties.
  • Catching Signal Intermediate Event listens for a signal object with the defined properties.
Throwing Signal Intermediate Event

When reached on execution, a Throwing Signal Intermediate Event produces a signal object and the execution continues to its outgoing flow.

Attributes
SignalRef
The signal code that will be sent.
Signal Scope

You can choose one of the following scopes:

  • Process Instance: Catch events in the same process instance can catch this signal.
  • Default: Catch events in a given KIE session can catch this signal. The behavior varies depending on the KIE session strategy:

    • Singleton: Signal reaches all the process instances available to the KIE session.
    • Per request: Signal reaches only the current process instance and start processes with a Signal Start Event.
    • Per process: same as per request.
  • Project: Signal reaches only active process instances of a given deployment and starts processes with a Signal Start Event.
  • External: Enables the signal to reach the same process instances as with the Project scope, as well as process instances across deployments. To send the signal to a process instance across deployments, create a SignalDeploymentId process variable that provides information about what deployment or project should be the target of the signal. Broadcasting the signal would have negative impact on performance in larger environments.
25.2.2.7.1. Catching Signal Intermediate Event

When reached during execution, a Catching Signal Intermediate Event awaits a signal object defined in its properties. Once the object is received, the event triggers execution of its outgoing flow.

Attributes
SignalRef
Reference code of the expected signal object.
CancelActivity
If the event is placed on the boundary of an activity and Cancel Activity property is set to true, the activity execution is canceled when the event receives its Escalation object.

25.3. End Events

An end event is a node that ends a particular workflow. It has one or more incoming sequence flows and no outgoing flow.

A process must contain at least one end event.

During runtime, an end event finishes the process workflow. The end event can finish only the workflow that reached it, or all workflows in the process instance, depending on the end event type.

25.3.1. End Event types

25.3.1.1. Simple End Event

The Simple End Event finishes the incoming workflow, that means it consumes the incoming token. Any other running workflows in the process or sub-process remain uninfluenced.

Terminate property on Simple End Event

In Red Hat JBoss BPM Suite, the Simple End Event has the Terminate property in its Property tab. This is a Boolean property that turns a Simple End Event into a Terminate End Event when set to true.

25.3.1.2. Message End Event

When a flow enters a Message End Event, the flow finishes and the end event produces a message as defined in its properties.

25.3.1.3. Escalation End Event

The Escalation End Event finishes the incoming workflow, that means consumes the incoming token, and produces an escalation signal as defined in its properties, triggering the escalation process.

25.3.1.4. Terminate End Event

The Terminate End Event finishes all execution flows in the given process instance. Activities being executed are canceled. If a Terminate End Event is reached in a sub-process, the entire process instance is terminated.

25.3.1.5. Throwing Error End Event

The Throwing Error End Event finishes the incoming workflow, that means consumes the incoming token, and produces an error object. Any other running workflows in the process or sub-process remain uninfluenced.

Attributes
ErrorRef
The reference code of the produced error object.

25.3.1.6. Cancel End Event

The Cancel End Event triggers compensation events defined for the namespace, and the process or sub-process finishes as CANCELED.

25.3.1.7. Compensation End Event

A Compensation End Event is used to finish a transaction sub-process and trigger the compensation defined by the Compensation Intermediate Event attached to the boundary of the sub-process activities.

25.3.1.8. Signal End Event

A throwing Signal End Event is used to finish a process or sub-process flow. When the execution flow enters the element, the execution flow finishes and produces a signal identified by its SignalRef property.

25.4. Scope of Events

An event can send signals globally or be limited to a single process instance. You can use the scope attribute for events to define if a signal is to be considered internal (only for one process instance) or external (for all process instances that are waiting). The scope attribute called Signal Scope on the Properties panel of the process designer allows you to change the scope of the signal throw intermediate or end events.

The Scope data input is an optional property implemented to provide the following scope of throw events:

  • Process Instance: Catch events only in the process instance will be able to catch this signal.
  • Default: Catch events in a given KIE session will be able to catch this signal. The behavior varies depending on the KIE session strategy:

    • Singleton: Signal reaches all process instances available to the KIE session.
    • Per request: Signal reaches only the current process instance and start processes with a Signal Start Event.
    • Per process: same as per request.
  • Project: Signal reaches all active process instances of a given deployment and start processes with a Signal Start Event.
  • External: Enables the signal to reach the same process instances as with the Project scope, as well as process instances across deployments. To send the signal to a process instance across deployments, create a SignalDeploymentId process variable that provides information about what deployment or project should be the target of the signal. Broadcasting the signal would have negative impact on performance in larger environments.


[3] Business Process Model and Notation (BPMN). Version 2.0, OMG Document Number: formal/2011-01-03 http://www.omg.org/spec/BPMN/2.0