sendMessages Step

Last published at: November 19th, 2021

Description:

Using this step, send messages between workflow instances or within the same workflow instance. This step 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, then we recommend writing a custom event handler and then send the message to that.  Using the FlowWright API, the event handler should get all waiting workflow instances and call send message on 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
  • Select the definition and click the “design” button
  • Drag the above controls from the toolbox
  • Connect the dots between the start and controls as above
  • Save the process definition, create a process instance and execute.  The SendMessage step should publish/send messages to the process.