Generic Expression Evaluator#
The Generic Expression Evaluator evaluates mathematical and logical expressions using the mathjs engine. It allows users to perform arithmetic, logical comparisons, and complex mathematical operations on input data, producing computed results dynamically.
Note
This task results from a split of the Expression Evaluator task. It can be used along with Regular Expression Evaluator and XPath Expression Evaluator.
Workflows#
| Data Flow | Control Flow |
|---|---|
Inputs#
| Name | Data Type | Description |
|---|---|---|
<custom list> | <custom> | Defines the input values used in the evaluation |
| Activate | any | Triggers task execution |
Outputs#
| Name | Data Type | Description |
|---|---|---|
<custom list> | <custom> | Defines the output values generated by the evaluation |
| Success | Boolean | Returns true if the task completes successfully |
| Error | Error | Contains information about any error that occurs |
Settings#
The General tab includes standard task settings and the following parameters:
| Name | Data Type | Values | Default Value | Description |
|---|---|---|---|---|
| Evaluator Behavior | enum | EvaluateAllEvaluateUntilTrue | EvaluateAll | Defines whether all expressions are evaluated or evaluation stops after the first true result |
| Clear Inputs | Boolean | false | When enabled, clears input values after task execution |
The Inputs Tab includes the following settings:
| Name | Data Type | Description |
|---|---|---|
| Name | String | Input Name |
| Friendly Name | String | The displayed input name |
| Type | LongDecimalDateTimeBooleanStringInteger | Defines the data type of the input |
| Default Value | any | Default value assigned to the input parameter |
| Required | any | Indicates if input is required |
The Outputs Tab includes the following settings:
| Name | Data Type | Description |
|---|---|---|
| Name | String | Output Name |
| Friendly Name | String | The displayed output name |
| Type | LongDecimalDateTimeBooleanStringInteger | Defines the data type of the output |
| Expression | any | Expression applied to the input data |
Evaluator Behavior#
The Generic Expression Evaluator task uses the mathjs engine, a JavaScript-based library for mathematical and logical computation, as well as some native JavaScript functions.
EvaluateUntilTrue: Stops processing when an expression returns atruevalue and outputs the corresponding result.EvaluateAll: Evaluates all configured expressions and outputs all results.Clear Inputs: When enabled, resets the inputs after task execution.
Note
Test mathjs expression at https://jsbin.com/devacu/edit?html,js,output. Additional documentation is available at http://mathjs.org/docs/expressions/syntax.html and http://mathjs.org/docs/reference/functions.html ⧉.
Remarks#
The Generic Expression Evaluator provides flexible operations for transforming input data. While mathjs supports many JavaScript-like functions, it is not a full JavaScript engine; some native JavaScript code may not execute as expected.



