Message Type is a set of parameters which are sent between processes via the Send Message and Receive Message activities. A message type created in one process is available in all the other processes.
Parameters are named elements. A context variable that is received or sent in an activity is linked to a certain parameter. One parameter specified in the message type may match different context variable types in the Send Message and Receive Message activities.
You can create and configure a message type by
-
using the message type editor
-
Configure Message Type
New message types can be created in several ways.
-
In the Message Type Editor, click the Add button (Figure 1);
|
Fig. 1. Message Type Editor. The Add button
|
-
On the Send Message tab of the Send Message activity, click in the Message Type section (fig. 1). You can also do it on the Receive Message tab of the Receive Message activity.
|
Fig. 2 Send Message activity settings. Send Message tab.
|
A window opens with message type settings (fig. 3, 4) where you should fill in all the required fields and click OK. The window has two tabs: Common (fig. 3) and Parameters (fig. 4).
|
|
Fig. 3. Configuring Message Type. Common tab.
|
Fig. 4. Configuring Message Type. Parameters tab.
|
Common tab
-
-
Guaranteed delivery - this feature prevents loss of messages if a user sends a messages (the Send Message activity) before the receiving process reaches the Receive message activity. Guaranteed delivery ensures message delivery even if the server is not available between sending and receiving the message (for example, when the server crashes). You can read more about guaranteed delivery below.
Attention!
-
Messages with guaranteed delivery can only be used when the variable of the recipient instance is selected in the Send Message activity in the Variable with the process instance field.
-
Guaranteed delivery to several Receive Message activities at once is not supported.
|
-
Description - Description of the message's purpose.
Parameters tab
On this tab (fig. 4), you set up parameters that will be linked to the variables sent in the message. To add a parameter, click the respective button (fig. 4). A window will open (fig. 5)
|
Fig. 5 Parameter adjustment
|
The window contains the following fields:
Parameter name
Description
The Reference Parameter option makes it possible to send the message to an exact process instance. The message will be sent to the instance which has the same reference parameter as the instance that sends the message. If a parameter is marked as "Reference Parameter", it cannot be sent with an empty context variable.
To make sure that the context variables in the message are filled it, you can mark them as required when configuring a user task activity. Another way is to fill them in with scripts.
A message type can contain only one variable marked as Reference Parameter. If no variable is marked as Reference Parameter, only the message type and condition will be checked at message sending. The condition is specified in the Receive Message activity.
To edit a parameter, click Edit parameter (fig. 4).
To delete a parameter from the system click Delete (fig. 4).
Editing Message Type
There are several ways to edit a message type.
-
in the Message Type editor, click Edit (fig. 1)
-
in the Send Message activity settings, open the Send Message tab (fig. 2) or in the Send Message activity settings, open the Receive Message tab, and click
in the Message Type section.
Deleting a Message Type
There are several ways to delete a message type:
-
In the message type editor, click Delete (Figure 1);
-
in the Send Message activity settings, open the Send Message tab (fig. 2) or in the Send Message activity settings, open the Receive Message tab, and click
in the Message Type section.
A dialog box will open (see Figure 6), in which you have to confirm you decision.
|
Fig. 6 Deleting message type
|
An example of a process with the guaranteed delivery
As an example, consider the situation described in the Send message article. Simplify the process architecture in ELMA Designer (Figure 7 - Figure 8). In the settings of the "Equipment data" message type, select the "Guaranteed delivery" checkbox (Figure 3) and do not change any parameters in the parameters list.
|
Fig. 7. "Send message" activity in the "Application for the purchase of production equipment"
|
|
Fig. 8. "Receive Message" activity in the "Equipment retrofitting" process
|
Once the "Equipment Retrofitting" process is started, the current user will receive the task to "Set the parameters". The task to "Receive the equipment data 1" (figure 9) will also be assigned.
|
Fig. 9. "My processes" subsection
|
After that, a user starts the process "Application for the purchase of production equipment" and fills in the parameters (fig. 10).
In this task (Fig. 10), it is necessary to fill in the parameters, indicating the instance of the receiving process, and click the Send to Production button. After that, the entered data will be sent to the specified instance.
When performing the "Set Parameters" task, the user receives from the Equipment Retrofit process the task "List of parameters" which contains the data of the instances "Application for the purchase of production equipment".
If you perform the above actions without guaranteed delivery, once the task "Set Parameters" is performed, the process instance will be suspended until it receives a message. An instance of the "Equipment Retrofitting" will be completed, if you re-run the "Application for the purchase of production equipment" process, indicating the same process instance.
Copyright © 2006–2019 ELMA