Evaluate multiple decisions

Use this step to make single or multiple decisions.

Last published at: July 13th, 2023

evaluateDecisions Step

Description:

Evaluates multiple decisions and returns the first matching value. Similar to a switch statement, at design time, step is setup with expressions and return values.

 

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 “evaluateDecisions” step to the canvas
  • Connect the dots between the start and “evaluateDecisions” step
  • Define a variable/global to store the result after execution
  • Click the "evaluateDecisions" step to configure its "Settings" properties. Provide a name to the step. 

 

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

 

  • Click on the button to provide multiple decisions and returns.

 

  • Click on the Decision field. Press Alt+E on the keyboard to invoke the Expression Builder. This utility shall enable the building and validation of expressions, as shown in the image below. Send 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 process 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.