Show Table of Contents
A.3. Collaboration mechanisms
Elements with execution semantics make use of general collaboration mechanisms. Different Elements allow you to access and use the mechanism in a different way; for example, there is a mechanism called signalling: a Signal is sent by a Throw Signal Intermediate Event Element and received by a Catch Signal Intermediate Event (two Elements with execution semantics make use of the same Signal mechanism).
Collaboration mechanism includes the following:
- Messages: Messages are used to communicate within the process and between process instances. Messages are implemented as signals which makes them scoped only for a given
KSessioninstance.For external system interaction send and receive task should be used with proper handler implementation. - Escalations: mainly inter-process (between processes) signalling of escalation to trigger escalation handling
- Errors: mainly inter-process signalling of escalation to trigger escalation handling
- Signals: general, mainly inter-process instance communication
All the events are managed by the signaling mechanism. To distinguish individual objects of individual mechanism the signal use different signal codes or names.
A.3.1. Messages
“A Message represents the content of a communication between two Participants. In BPMN 2.0, a Message is a graphical decorator (it was a supporting element in BPMN 1.2). An ItemDefinition is used to specify the Message structure.[1]”
Messages are objects that can be sent between Processes or Process elements, that participate in the respective communication; They are sent by the Message Intermediate Throw Events and Send Tasks, and can be consumed by the Message Start Events, Message Intermediate Catch Events, Message End Events, and Receive Tasks. One Message can be consumed by an arbitrary number of Processes and Process elements.
Attributes
Mandatory Attributes
- Message
- string with the message
A.3.2. Escalation
"An Escalation identifies a business situation that a Process might need to react to." [2]
The Escalation mechanism is intended for the handling of events that need the attention of someone of higher rank, or require additional handling.
Escalation is represented by an Escalation object that is propagated across the Process instances. It is produced by the Escalation Intermediate Throw Event or Escalation End Event, and can be consumed by exactly one Escalation Start Event or Escalation Intermediate Catch Event. Once produced, it is propagated within the current context and then further up the contexts until caught by an Escalation Start Event or Escalation Intermediate Catch Event, which is waiting for an Escalation with the particular Escalation Code. If an Escalation remains uncaught, the Process instance is ABORTED.
Attributes
Mandatory Attributes
- Escalation Code
- string with the escalation code
A.3.3. Signals
A Signal is an object, which can be propagated on execution within its parent Process instance as well as to other Processes. Every Signal can be consumed by multiple elements in multiple Process instance within the same Session.
Every Signal defines its Signal Reference,
which is unique in the respective Session. A Signal can be generated by a Throw Signal Event and an action of an Activity. Once generated, it is propagated as an object through all the context in the parent Session of the Signal element.
Note
To trigger a Signal using API, you can use in your code the following:
- To instantiate a Process instance directly with a Signal, you can use the following API function:
ksession.signalEvent(eventType, data, processInstanceId)
The eventType parameter defines the Signal's Event Type, the data parameter defines the data accompanying the Signal, and processInstanceId defines the ID of the Process to be instantiated. - To trigger a Signal from a script, that is, from a Script Task or using on-entry or on-exit actions of a node, you can use the following API function:
kcontext.getKieRuntime().signalEvent( eventType, data, kcontext.getProcessInstance().getId());
[1]
Business Process Model and Notation (BPMN). Version 2.0, OMG Document Number: formal/2011-01-03 http://www.omg.org/spec/BPMN/2.0
[2]
Business Process Model and Notation (BPMN). Version 2.0, OMG Document Number: formal/2011-01-03 http://www.omg.org/spec/BPMN/2.0

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.