Skip to content

Expression Evaluator#

The Expression Evaluator task performs various operations on input values to produce an output. It supports mathematical expressions through the mathjs engine, XPath queries, and Regular Expressions. It can also evaluate multiple expressions until one returns a Boolean true, similar to an if (condition) else statement.

Screenshot showing the Expression Evaluator interface.

Warning

This task is deprecated and will be removed starting with version 12. Its functionality has been split into three separate actions: Generic Expression Evaluator, 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 operation
Activate any Triggers the task

Outputs#

Name Data Type Description
<custom list> <custom> Defines the output values generated by the operation
Error Error Details about any error that occurs during processing

Settings#

The General tab includes standard task settings and the following parameters:

Name Data Type Values Default Value Description
Expression Type enum Generic
XPath
RegularExpression
Generic Defines the type of expression to evaluate
Evaluator Behavior enum EvaluateAll
EvaluateUntilTrue
EvaluateAll Determines whether all expressions are evaluated or the evaluation stops when a true result is found
Clear Inputs Boolean false When enabled, clears input values after the task is triggered

Screenshot showing a settings page with an option for selecting the type of expression.

The Inputs Tab includes the following settings:

Name Data Type Description
Name String Input Name
Type Long
Decimal
DateTime
Boolean
String
Integer
Defines the input data type
Collection Type None
Array
Map
Specifies the structure of the input
Default Value any Default value assigned to the input parameter

Screenshot showing settings options for collection type, including None, Array, and Map.

The Outputs Tab includes the following settings:

Name Data Type Description
Name String Output Name
Type Long
Decimal
DateTime
Boolean
String
Integer
Defines the output data type
Collection Type None
Array
Map
Specifies the structure of the output
Expression any Operation applied to the input value

Screenshot showing settings for an expression evaluator, with options for collection type including None, Array, and Map.

Note

Expressions can be tested by entering sample input values and evaluating the result.

Action Settings#

Expression Type Generic#

The Generic expression type uses the mathjs library, a JavaScript-based math engine. It supports mathematical operations and a subset of native JavaScript functions.

Expression Type XPath#

The XPath expression type searches for a specific path within an object and returns the value or an array of values corresponding to that path.

Expression Type Regular Expression#

The Regular Expression expression type applies a pattern to the input value and returns matching results as a single value or array.

Evaluator Behavior#

  • EvaluateUntilTrue: Stops processing when an expression returns a true value and outputs the corresponding result.
  • EvaluateAll: Evaluates all configured expressions and outputs all results.
  • Clear Inputs: When enabled, resets the inputs after task execution.

Remarks#

The 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.