v2.1.5+ JSONata editor
The JSONata editor is an integrated testing tool in the Graphical Designer that enables you to validate JSONata expressions against real or simulated task context data before saving changes.
Fields that support JSONata expressions in the Graphical Designer display a JSONata editor icon. These fields include output conditions, output properties, pre-conditions, and task input fields. Clicking the icon opens the editor for that specific field, pre-loading any expression already defined there.
Editor panes
The JSONata editor is organised into three panes:
- JSON Context
- An editable area for the task context JSON that the expression is evaluated against. You can populate this pane by loading the context from a previous run, by requesting a generated skeleton based on the current workflow definition, or by editing the JSON directly to test what-if scenarios.
- Expression / field content
- An editable area for the JSONata expression or embedded template string. This pane provides syntax highlighting and autocompletion for JSONata standard functions, HCL Universal Orchestrator proprietary functions, and fields derived from the context loaded in the JSON Context pane.
- Result and validation
- A read-only area that displays the evaluation result alongside any syntax errors, runtime errors, and type-validation warnings. The content of this pane is updated automatically as you modify the expression or context.
Evaluation modes
The JSONata editor supports two evaluation modes:
- Boolean mode
- Evaluates the expression in the Expression pane as a JSONata expression and
returns a boolean result. The only values this mode can yield are
trueandfalse. Use this mode for output conditions, pre-conditions, and any field that requires a boolean value. - Embedded mode
- Identifies
${...}blocks within a template string and resolves each block individually before returning the final interpolated string. ModifiersJ:,Y:, andT:inside a block control how the result is serialised. Use this mode for message templates and fields that combine static text with dynamic values.
Server-side evaluation
All evaluations are performed by the HCL Universal Orchestrator engine
using the same JSONata runtime used by the orchestration engine at run time. This
guarantees that evaluation results in the editor are consistent with actual workflow behaviour,
including the availability of HCL Universal Orchestrator proprietary
functions such as datecalc.