simpleExpression Step

Use this step for evaluating simple expressions

Last published at: July 12th, 2024

Description:

Use this step for evaluating simple expressions

 

Inputs

  • sourceValue – variable/global containing the source value
  • selectOperator – select the operator
  • targetValue – variable/global containing the target value
  • variableToStore – variable/global to store the result
 

 

Returns

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

 

Usage:

 

 

Example:

Let’s build and execute the simpleExpressionDef example.          

  • Create a new definition called “simpleExpressionDef”
  • Select the definition and click the “design” button
  • Drag a “simpleExpression” step from the toolbox
  • Connect the dots between the start and “RESTCall” step
  • Define a variable/global to store the source value, target value, and the result value
  • Click the "simpleExpression" step to configure its "Settings" properties. Provide a name to the step. Provide the variable/global reference to the source value. Provide the variable/global reference to the target value. Provide the variable/global reference to store the result. 

 

  • Click on the button to configure the operator. A popup window will appear, as shown below. Select the data type (number, string, or date). Select the operator from the drop-down list.  The operator list is different for each data type. The expression list for the Number data type is below. 

 

  • The expression list for the String data type is below.  

 

  • The expression list for the Date data type is below.  

 

  • In this example the number operator (+) is selected. 

 

  • 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. Provide the values to the source and target variables. 

 

  • Render the process instance. Click on the process step to view its properties. The step should evaluate the simple expression and place the result in the variable/global as configured.