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 on the "evaluateDecisions" step to configure its "Settings" properties. Provide a name to the step. 
  • Click on 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 keyboard to invoke the Expression Builder. This utility shall enable to build and validate expressions as shown in the image below. Send the expression to clipboard and paste the same in 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 measure the workflow progress and the percent complete. This is acheived 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 evaluate the expression and returns the first matching value.