sendMessages Step
Description:
This step allows you to send messages between or within the same workflow instance. It is used for inter-process communication (IPC). Other workflows can be configured with the step “waitForMessages” to wait for incoming messages.
Note: If you want to send the message to all waiting workflows, we recommend writing a custom event handler and sending the message to that. Using the FlowWright API, the event handler should get all waiting workflow instances and send a message to each one.
Inputs
-
selInstLevel– Select instance types; when sending messages, select where to send messages to, the options are the following:
- Current – current workflow
- All – all workflow instances within the hierarchy, includes all parents, children & siblings
- Siblings – send messages to only siblings
- Parents – send messages to all parents within the hierarchy
- Children – send message to all children
- Top Most – send messages to the top most workflow instance
- waitMessage – list of messages to send, should be a “,” separated list
Returns
- True/False
Usage:

Example:
Let’s build and execute the “sendMessagesDef” example.
- Create a new definition called “sendMessagesDef” and open the definition in designer mode.
- Drag a “Task, WaitForMessage, and sendMessages” step to the canvas.
- Connect the dots between the “Start” and the other steps, as shown above.
- Click the “Task” step to configure its “Required” properties. Provide a name for the step.
- Click the “Task” step to configure its “Optional” properties. Select the user to route to. Provide the task duration to complete. Click the Save button.
- Click the “sendMessages” step to configure its “Required” properties. Provide a name for the step. Provide the message to send. Select any one of the instance types from the drop-down list - All, Children, Current, Parents, Siblings, and TopMost." The instance type “Current” is selected as the message is sent to a “WaitForMessage” step in the same instance. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Click the “WaitForMessages” step to configure its “Required” properties. Provide a name for the step and the message to wait for. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Save the process definition, create a process instance, and then execute it. The instance is sleeping on the Task step as below.

- The SendMessage step should “publish or send” messages to the process.

Definition Sample:
You may download the sample definition(s) from the link here and later import them (drag-and-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Please verify and complete the process steps for any missing configurations, such as file path references and database connections, after import. Then, save the definition to confirm the changes.
Click here to download the sample file.