JSONTODATA Workflow Application
Overview
The JSONTODATA workflow application lets you parse JSON content into process data.
How it works
The JSONTODATA application requires either the
JSON_CONTENT
or theJSON_CONTENT_FILE
parameter; these correspond to the JSON to parse.The application supports the JSONPath query language (see https://github.com/json-path/JsonPath), which allows extraction of specific data from JSON content, similar to XPath expressions in XML.
Application logs are available. These can be specified by setting the value of the
JsonToDataLogLevel
parameter in theweb.config
file to0
to deactivate logs,1
for error logs,2
for information logs, or3
for debug logs; the default value is0
.
Parameters
Parameter | Type | Direction | Description |
| TEXT | IN | Query to execute |
| FILE | IN | Query to execute, stored in a file |
Parameter mapping
Using simple parameter names
The application supports custom OUT parameters to map simple JSON content.
📌 Example
The following parameters allow you to map the JSON content to different process data:
Parameter | Type | Direction | Retrieve the value into a data | Result |
| Text | OUT |
|
|
| Text | OUT |
|
|
| Text | OUT |
|
|
| Text | OUT |
|
|
Using JSONPath query language
The application supports the JSONPath query language, similar to XPath expressions in XML. This language allows you to retrieve specific data from a JSON. For more details regarding the JSONPath syntax, see https://github.com/json-path/JsonPath.
📌 Example
In the above example, we want to get the names of Charles's grandchildren who are older than seven years old, and we also want these names to be separated by a |
(using the APP_JSONPATH_DELIMITER
IN parameter). At the same time, we are also getting Elizabeth's age and date of birth. To get the information, the following parameters must be defined:
Parameter | Type | Direction | IN Value | OUT Value |
| Text | IN |
| |
| Text | INOUT |
| data |
| Text | IN |
| |
| Numeric | OUT | data | |
| Text | IN |
| |
| DateTime | OUT | data |
In the
PARAM1__JSONPATH
parameter name, thePARAM1
name is not relevant, but it must be followed by the__JSONPATH
suffix (two underscores are used in the suffix).To retrieve a value into a Text process data, you can use a single INOUT Text parameter (e.g.
PARAM1__JSONPATH
parameter as in the example above).To retrieve a value into a Numeric or DateTime process data, you must use separate parameters: an IN Text parameter for the JSONPath query and an OUT parameter that maps to the Numeric or DateTime process data. Both parameters must share the same name prefix (e.g.
AGE__JSONPATH
andAGE
parameters as in the example above).The default value of
APP_JSONPATH_DELIMITER
is a comma (,
) when this parameter is not defined.