Data exchange and transformation

This topic explains how you can streamline your workflows using data exchange and transformation.

The output of your jobs can be very detailed and complex because it contains many data, such as information about the job itself, predecessor jobs, output from predecessor jobs, variable tables, variables, and so on.

You can easily exchange data between jobs and transform their output for using it in other jobs. Job output data is combined into a single JSON file, containing the job context. HCL Universal Orchestrator can query and transform information in the job context using JSONata4Java, the Java version of JSONata, a lightweight query and transformation language for JSON data.

JSONata is used to extract relevant data that is hidden in potentially large JSON files using sophisticated queries with a compact and intuitive notation. It can be applied to virtually any problem that involves querying and transforming JSON data, and is able to perform the following actions:

  • manipulate strings.
  • combine and aggregate numeric data
  • query and extract values
  • create complex JSON output structures that enable complex data transformation tasks

JSONata4Java accepts data and a JSONata expression as input, and returns transformed data based on the requirements defined in the expression. It is very useful when you have a predictable data structure as an input, and you want to transform your data before writing it to the output. If you have a large amount of data, for example full data of all your customers, you can concatenate and filter it and obtain as output the information defined in the expression, for example the mobile phone number of a specific customer.

The resulting output can be formatted into any JSON output structure using JSON item and array syntax, in YAML, and text format.

You can find more information, documentation, and examples of JSONata and JSONata4Java expressions and functions in JSONata documentation and JSONata4Java.

In addition to the rich complement of built-in operators and functions provided by JSONata for manipulating and combining extracted data, HCL Universal Orchestrator provides a number of proprietary functions. For a full list of these functions, see Proprietary functions for JSONata.

Also, in many scenarios, you can define one or more properties in a job and then reference these properties as variables in a subsequent job in the same job stream. For more information about passing variables between jobs, see Passing variables between jobs.