Help ELMA BPM Platform
×
Menu

Send Message


A Send Message activity allows you to send context variables form the current process instance to another process instance. To receive an incoming message you need to place the Receive Message activity in the respective process model. This combination of activities allows you to send and receive context variables without creating sub-processes. It is especially useful if the two processes must be performed independently, but at some point, the system requires information from one of the processes to continue the execution of the second one.
The system is able to execute the Send Message activity, only if all the variable values sent to the other process are specified.

Send Message Settings

Common Tab
Fig. 1. Send Message activity settings. Common tab.
Name — An activity name that a user will see in the graphic model, process documentation, policies and in the header of the settings window. The name is also shown on the transition button in Web Application if the incoming connector name is not specified the graphic model.
Description — An activity description that a user will see in the process documentation and policies.
Operation Type — Shows the selected activity type. The Change Type button allows you to select any available operation type: User Task, Script Activity, Manual Execution, Notification, Send Message, and Receive Message.
Send Message Tab
Fig. 2. Send Message Tab.
The variable with the process instance that will receive the message - A context variable of the “Process instance Workflow” type. It stores a process instance that will receive a message. If this variable is not specified or its value is not defined, the message will be send to each active process instance, which has reached the Receive Message activity and meets the following requirements:
If one of the active process instances receives the message, the system does not send it forward to the next process instance. If none of the running process instances matches the requirements listed above, the message is rejected.
This context variable can be specified by using a script or a user task.
By clicking the Add variable button, you can add a context variable of the "Process Instance Workflow" type in the process.
Attention!
By default, the process context includes a Process Instance variable of the "Process Instance Workflow" type. It stores the current active instance. Do not use it as the value of the field The variable with the process instance that will receive message.
Message type
In the drop-down list you must select the message type. If there are no suitable message types, you can create a new type by clicking the green cross button .
In the Message Parameters section match each parameter with the respective context variable.

Example

For example, consider a situation in which to perform equipment modernization users need to start two processes: "Modernization of the equipment" and "Equipment Purchase Request". The modernization process begins with the selection of the equipment, preparation of the technical specifications, timing. The process of Modernization of the equipment is a standard process in which you must specify such information as a product name, specifications, quantity, timing and amount of the request. These processes can be started independently, but by the end of the "Equipment Purchase Request" the accounting system accumulates such equipment data as actual equipment name, quantity, serial number, etc. It is quite reasonable to use these data when assigning a task to the assembly worker in the "Modernization of the equipment" process.
In accordance with the above, place the Send Message activity in the graphic model of the Equipment Purchase Request process (fig. 3), at the point where the equipment data is already accumulated. Also, place the Receive Message activity in the graphic model of the Modernization of the equipment before the task is assigned to the assembly worker (fig. 4).
Fig. 3. Send Message activity in the Equipment Purchase Request process.
Fig. 4. Receive Message activity in the Modernization of Equipment process.
In the Equipment Purchase Request process, open in the Send data to the Modernization of equipment process activity, switch to the Send Message Tab and use the ID of the "Process Instance Workflow" type of Modernization of equipment instance which was previously created in the context of the process. In this example the variable Modernization of equipment is specified while executing the Create purchase request task. For this example we have created a message type “Equipment Data” with three parameters: Name, Quantity, Serial Number. These parameters are matched with the respective context variables of the process (fig. 5).
Fig. 5. Send Message Tab.
The Modernization of equipment process has the "Receive Equipment Parameters" activity of the "Receive Message type". On the Receive Message tab, select the same "Equipment Data" type for this activity. Then match the message parameters with the process context variables (Fig. 6).
Fig. 6. Receive Message tab.
The processes in this example are started by the same employee at the same time. The "Modernization of the Equipment" process waits for a message with data of equipment that will be used for modernization. These data can come from any process that sends messages of the "Equipment Data" type. In the given example, there is only one process of such kind, the Equipment Purchase Request.
Copyright © 2006–2019 ELMA