evaluateDecisions Step

Use this step to evaluate multiple decisions.

Last published at: April 17th, 2025

Description:

This step evaluates multiple decisions and returns the first matching value. Similar to a switch statement, this step is set up with expressions and return values at design time.

 

Inputs

  • decisions – multiple decisions to evaluate
  • varToStoreResult – variable to store the resulting value 
 

 

Returns

  • returns the value from the first evaluated expression
 

 

 

Usage:

 

 

Example:

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

  • Create a new definition called “evaluateDecisionsDef”
  • Select the definition and click the “design” button
  • Drag an “updateGlobals, evaluateDecisions, and placeHolder” steps to the canvas
  • Connect the dots between the Start and other steps as above
  • Define a variable/global to store the result
  • Click the "updateGlobals" step to configure its "Required" properties. Provide a name to the step. Select the “Optional” tab and click the Update multiple globals button. A popup window is displayed for configuration. Click the Add Row button to insert an empty row. Provide the global name and value. Click the Save button.  

 

  • Click the "evaluateDecisions" step to configure its "Required" properties. Provide a name to the step. Click on the button to provide multiple decisions and returns. Provide a variable/global to store the result. Click the Save button. 

 

  • Click on the button to provide multiple decisions and returns. A popup window is displayed for configuration. Click the Add Row button to insert an empty row. Provide the decision and return value. Click the Save button. 

 

  • Click on the Decision field. Press Alt+E on the keyboard to invoke the Expression Builder. This utility enables the building and validation of expressions, as shown in the image below. Copy the expression to the clipboard and paste it into the input field.

 

  • Examples for decisions to evaluate:
    e.g. Variable.number > 10    
    e.g. Global.testNumber >= 100
    e.g. "test" == "test"
    e.g. 1==1
    e.g. DateTime.Today.ToString()=="04.09.2019 00:00:00"
     
  • 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.

 

  • Save the process definition, create a new instance, and execute. Render the process instance. Click on the process step. 

 

  • The step evaluates the expression and returns the first matching value.

 

Definition Sample:

You may download the sample definition(s) from the link here and later import it (drag-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.