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:
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/8802/direct/1720781074947/image.png)
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.
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/8802/direct/1720781471759/image.png)
- 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.
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/8802/direct/1720781875338/image.png)
- The expression list for the Date data type is below.
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/8802/direct/1720781887809/image.png)
- In this example the number operator (+) is selected.
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/8802/direct/1720781961937/image.png)
- 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.
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/8802/direct/1720781533160/image.png)
- Save the process definition, create a new process instance, and execute. Provide the values to the source and target variables.
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/8802/direct/1720782105506/image.png)
- 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.
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/8802/direct/1720782233273/image.png)