Message event

1. Overview

Message event — is a business process event used to transfer information from one business process to another one, or a subprocess. The generated outgoing message (sender-event) activates the element that receives the corresponding message (receiver-event).

message event 01

The event elements that send and receive messages must be interconnected and have the corresponding information exchange configuration.

The following types of message events are used in modelling:
  1. Message End Event — an event that is modelled at the end of a business process or subprocess. It is configured to send a data array, certain attributes, or a text message.

  2. Message Start Event — an event that is modelled at the initiation of a business process or subprocess start. It is configured to receive a data array, certain attributes, or a text message from End Message Event or Message Intermediate Throw Event element.

  3. Message Intermediate Throw Event — an event that is modelled during business process or subprocess running. It is configured to send a data array, certain attributes, or a text message.

  4. Message Intermediate Catch Event — an event that is modelled during business process or subprocess running. It is configured to receive a data array, certain attributes, or a text message from End Message Event or Message Intermediate Throw Event element.

2. Message End Event modelling and configuring

To model and configure Message End Event, make the following configurations:

Prerequisites

Prepare 2 modelled business process within 2 pools that will interact with each other via messages (here we will use Send Message and Receive Message processes).

  1. Add a process end event in the Send Message business process.

    mess1 1

  1. Select the process end event and define its type by clicking the key icon and selecting Message End Event in configuration.

    mess1 2

  1. On the General tab configure a delegate for message data sending:

  • In the Id field, enter element identificator, or use the default value.

  • In the Name field, enter element name.

  • In the Implementation field, select Delegate Expression from the list.

  • In the Delegate Expression field, enter delegate value — ${startProcessByMessageDelegate}.

    As opposed to other delegate expressions for business process modelling that have developed templates, the startProcessByMessageDelegate delegate used in Message events is configured manually.
  • Expand the Details block by clicking the + button.

  • In the Global Message Name field, enter a name for the message receiving element (for example startProcessReceiveMessageAfterSystemTask).

    The name must be identical for two interconnected elements - the data sending element, and the data receiving element.

    One message sending element can be interconnected with only one message receiving element.

  • In the Global Message referenced field, select data receiving element link value from the list (referenced in Global Message Name field).

    If several interconnected elements of message events are used in the business process modelling within one .bpmn-file, then the dropdown list will show all the previously set values of message receiving elements. Be attentive when configuring this parameter and select the corresponding element.

    When changing values in the Global Message referenced field, an identical value automatically fills in the Global Message Name field.

    mess1 3

  1. Navigate to the Input\Output tab and configure data array, attributes or text message that will be transferred to the receiving business process or subprocess:

  • Click the + button in front of the Input Parameters section. This will automatically enter the incoming parameter, which you need to configure according to the data that is to be transferred to the other business process or subprocess.

    mess1 4

  • In the Local Variable Name field, enter the name for the local variable, or use default name.

    mess1 5

  • In the Variable Assignment Type field, select variable type and configure it in the following way:

    There are for ways to assign the variable:

    • String or Expression;

    • Script;

    • List;

    • Map.

  • When selecting String or Expression type, set the transferred variable expression in the Variable Assignment Value field via JUEL-function.

    You can find more details on the JUEL-functions supported by the Platform on the following page: JUEL functions in business processes.

    mess1 6

  • When selecting Script type, enter script data in the Script Format, Script Type and Script fields.

    mess1 7

  • When selecting List type, click + (Add Value), and set variable value (text or JUEL-function) in the Value field.

    mess1 8

  • When selecting Map type, click + (Add Entry), set variable name in the Key field, and set variable value (text or JUEL-function) in the Value field.

    mess1 9

  • If needed, click + in front of the Input Parameters section, and configure the next variable value.

Example 1. Examples of variable configuration for the message end event

mess1 10

mess1 11

Use business process reference example for details: Process_checkIntermediateThrowEvent.bpmn.

3. Message Start Event modelling and configuring

To model and configure Message Start Event, make the following configurations:

Prerequisites

Prepare 2 modelled business process within 2 pools that will interact with each other via messages (here we will use Send Message and Receive Message processes).

  1. Add a process start event in the Receive Message business process.

    mess1 12

  2. Select the process start event and define its type by clicking the key icon and selecting Message Start Event in configuration.

    mess1 13

  3. In the General tab, configure the message receiving element:

  • In the Id field, enter element identificator, or use the default value.

  • In the Name field, enter element name.

  • Click + in front of the Details section.

  • In the Global Message Name field, enter the name of the data receiving element with the same value that was set for message event sender (End Message Event or Message Intermediate Throw Event). For example, startProcessReceiveMessageAfterSystemTask.

    The name must be identical for two interconnected elements - the data sending element, and the data receiving element.

    One message sending element can be interconnected with only one message receiving element.

  • In the Global Message referenced field, select data receiving element link value from the list (referenced in Global Message Name field).

    If several interconnected elements of message events are used in the business process modelling within one .bpmn-file, then the dropdown list will show all the previously set values of message receiving elements. Be attentive when configuring this parameter and select the corresponding element.

    When changing values in the Global Message referenced field, an identical value automatically fills in the Global Message Name field.

    mess1 14

4. Intermediate Throw Event modelling and configuring

To model and configure Intermediate Throw Event, make the following configurations:

Prerequisites

Prepare 2 modelled business process within 2 pools that will interact with each other via messages (here we will use Send Message and Receive Message processes).

  1. Add an Intermediate/Boundary Event event in the Receive Message business process.

    mess1 15

  2. Model the interaction between the two processes.

    mess1 16

  3. Select the intermediate event and define its type by clicking the key icon and selecting Message Intermediate Throw Event in configuration.

    mess1 17

  1. On the General tab configure a delegate for message data sending:

  • In the Id field, enter element identificator, or use the default value.

  • In the Name field, enter element name.

  • In the Implementation field, select Delegate Expression from the list.

  • In the Delegate Expression field, enter delegate value — ${startProcessByMessageDelegate}.

    As opposed to other delegate expressions for business process modelling that have developed templates, the startProcessByMessageDelegate delegate used in Message events is configured manually.
  • Expand the Details block by clicking +.

  • * In the Global Message Name field, enter a name for the message receiving element (for example startProcessReceiveMessageExec).

    The name must be identical for two interconnected elements - the data sending element, and the data receiving element.

    One message sending element can be interconnected with only one message receiving element.

  • In the Global Message referenced field, select data receiving element link value from the list (referenced in Global Message Name field).

    If several interconnected elements of message events are used in the business process modelling within one .bpmn-file, then the dropdown list will show all the previously set values of message receiving elements. Be attentive when configuring this parameter and select the corresponding element.

    When changing values in the Global Message referenced field, an identical value automatically fills in the Global Message Name field.

    mess1 18

  1. Navigate to the Input\Output tab and configure data array, attributes or text message that will be transferred to the receiving business process or subprocess:

Input/output parameters of the delegate are descriped in the Message End Event modelling and configuring section.
Example 2. Configuration examples for the Message Intermediate Throw event

mess1 19

mess1 20

Use business process reference example for details: Process_checkIntermediateThrowEvent.bpmn.

5. Message Intermediate Catch Event modelling and configuring

To model and configure Message Intermediate Catch Event, make the following configurations:

Prerequisites

Prepare 2 modelled business process within 2 pools that will interact with each other via messages (here we will use Send Message and Receive Message processes).

  1. В рамках бізнес-процесу, що прийматиме інформацію (тут — Receive Message), додайте проміжну подію.

  2. Add an intermediate event in the Receive Message business process.

    mess1 21

  3. Select the intermediate event and define its type by clicking the key icon and selecting Message Intermediate Catch Event in configuration.

    mess1 22

  4. On the General tab, configure the message data receiving element:

  • In the Id field, enter element identificator, or use the default value.

  • In the Name field, enter element name.

  • Click + in front of the Details section.

  • In the Global Message Name field, enter the name of the data receiving element with the same value that was set for message event sender (End Message Event or Message Intermediate Throw Event). For example, sendIntermediateMessage.

    The name must be identical for two interconnected elements - the data sending element, and the data receiving element.

    One message sending element can be interconnected with only one message receiving element.

  • In the Global Message referenced field, select data receiving element link value from the list (referenced in Global Message Name field).

    If several interconnected elements of message events are used in the business process modelling within one .bpmn-file, then the dropdown list will show all the previously set values of message receiving elements. Be attentive when configuring this parameter and select the corresponding element.

    When changing values in the Global Message referenced field, an identical value automatically fills in the Global Message Name field.

    mess1 23