JSON Path Expression Application Rule

This Application rule is used to extract data from the JSON Path Expression, which gets returned from a Rest API or Web Service call, and you can store it into a Data Field for further processing.

Figure 4-17 JSON Path Expression Rule Details window


This image displays the JSON Path Expression Rule Details window.

Table 4-13 JSON Path Expression Rule Details Description

Field Name Description
Name Enter a unique name for the Application Rule.
Rule Type

Select the rule type from the drop-down list. The available rule types are Decision Rule and Execution Rule.

For Decision Rule, the output of JSON Path Expression is compared with RHS expression, and the rule returns as either true or false accordingly.

For execution rule, JSON Path Expression is evaluated and the output is returned to the DataField selected as Output DataField.

Execution Type Displays the Application Execution Type as JSON Path Expression.
JSON Input Select the Data Field in which the output of Web Service is stored from the drop-down list. You should select a DataField which has JSON as its value.
JSON Path Expression Enter the JSON path expression. For more information, see the JsonPath Expressions section.
Operator

This field is displayed only if Rule Type is selected as Decision Rule.

Select the required operator for comparison from the drop-down list. The options are =,<,>,>= and <=.

RHS Expression

This field is displayed only if Rule Type is selected as Decision Rule.

Enter the expression to which you want to compare the JSON path expression.

Output DataField

This field is displayed only if Rule Type is selected as Execution Rule.

Select the DataField to which you want to return the value of JSON Path Expression, from the drop-down list.

Scope

Select the scope of the Application Rule from the drop-down list. The options are:

  • Process- Select Process if you want to use the Application Rule only in the current process.
  • Package- Select Package if you want to use the Application Rule across all the processes in the application package.
Convert To Type Select JSON ARRAY to store the output in Array format or select String to store as a string, from the drop-down list.