Wait for incoming messages

Use this step to wait for an incoming message and start process later.

Last published at: July 25th, 2023

waitForMessage Step

Description:

This step waits for a message to arrive, completes the step, and starts processing from that point forward.

 

Inputs

  • waitMessage – Wait for messages 
 

 

Returns

  • True – step executed successfully
  • False – step failed to execute 
 

 

Usage:

 

 

Example:

Let’s build and execute the waitForMessageDef example.          

  • Create a new definition called “waitForMessageDef.” 
  • Select the definition and click the “design” button
  • Drag the “waitForMessage” and “decision” steps to the canvas
  • Connect the dots between the steps as shown above 
  • Click on the first “waitForMessage” step to configure its “Settings” properties. Provide a name for the step. Provide the message text to wait for. 

 

  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Click on the other “waitForMessage” step to configure its “Settings” properties. Provide a name for the step. Provide the message text to wait for. 

 

  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Click on the “decision” steps to configure its “Settings” properties. Provide a name for the step. Provide the condition to evaluate. 

 

  • Save the process definition, create a new process instance, and execute. Render the process instance. The process instance is sleeping at the “waitForMessage” steps.

 

  • Render the process instance. The process instance is sleeping at the “waitForMessage” steps. 

 

  • On the process instance page, select Utils - Send Message menu option. 

 

  • Select the message from the dropdown list. Click on the “Send” button to confirm.

 

  • The message is sent to the sleeping process instance via FlowWright .Net API/REST API. The process execution continues after the “waitForMessage” step. As one wait message is selected in this example, the other step continues to wait for the message. 

 

  • Repeat the “send message” activity to complete the process instance.