setWFState Step

Use this step to set the workflow states while executing the instance.

Last published at: December 31st, 2025

Description:

This step is used to set the workflow states while executing the instance. For example, a business proposal life cycle includes the following stages; Pre-proposal, RFP/Opportunity, Pre-writing, Submission, Award, Progress Management, and Follow Up. We can configure the workflow with the appropriate life cycle stages using this process step. The current stage of business proposals (at run time) can be easily identified during process instance review. 

 

Inputs

  • State - State of the instance
 

 

Returns

  • True – True condition
  • False – False condition
 

 

Usage:

 

 

Example:

Let’s build and execute the “setWFStateDef” example.          

  • Create a new definition called “setWFStateDef” and open the definition in designer mode. 
  • Drag a “setWFState” step to the canvas. 
  • Connect the dots between the “Start” and “setWFState” steps, as shown above. 
  • Click the "setWFState" step to configure its "Required" properties. Provide a name for the step and describe the process instance state. Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description. 

 

  • Click the "routeForm" step to configure its "Required" properties. Provide a name for the step and the task. Select the Form Definition from the drop-down list. Provide a variable or global reference to store the form instance ID. Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description. 

 

  • Click the "routeForm" step to configure its "Optional" properties. Click the button to specify the users who will route the Form. A pop-up window appears for configuration. Search for and select the user, then click the Save button. In this example, the “variable.initiatorID” system variable routes the Form to the user who initiated the new process instance. 

 

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

 

  • Save the process definition, create a new instance, and execute it. The instance should be updated with the latest executed state step value. In the following example, the setWFState step captures the user's feedback submitted through a process workflow. The process “State” indicates the process flow during runtime.  

 

  • The workflow below shows the process that iterates for the user's feedback rating < 8.  

 

  • The workflow is complete for the user's feedback rating of >= 8. 

 

 

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 the import. Then, save the definition to confirm the changes.

Click here to download the sample file.

Click here to download the loop sample file.