8.11 Application Rule
This Application Rule is used to execute any queries in the Process Flow.
Function Application Rule
Function as the Application Rule Type from the drop-down list. Function represents a predefined function for application logic.
Table 8-4 Function Application Rule Details Description
| Field Name | Description |
|---|---|
| Name | Enter a unique name for the Function Application Rule. |
| Rule Type | Select the Rule Type from the drop-down list. The Function Application Rule can be used as a Decision Rule, Execution Rule, or Selection Rule based on your requirement. |
| Execution Type | Displays the Application Execution Type as Function. |
| Implementation Detail |
|
| Return Parameter |
Select the Data Field that receives the return parameter of the Rule, from the drop-down list.
|
| Scope | Select the Scope as Process to use the Application Rule only in the current process or Package to use the Application Rule across all the processes in the package. |
Expression Application Rule
Table 8-5 Expressions
| Name | Description |
|---|---|
| Name | Enter a unique name for the Application Rule. |
| Rule Type | Select the Rule Type from the drop-down list. The Expression Application Rule can be used as Decision Rule, Execution Rule or Selection Rule based on your requirement. |
| Execution Type | Displays the Application Execution Type as Expression. |
| Expression Type | Select Expression Type as SQL to use SQL expressions or JSON to use JSON expressions. |
| Expression | Enter the expression in SQL format or JSON format. |
| Return Parameter | Select the Data Field which will receive the return
parameter of the Expression, from the drop-down list.
|
| Scope | Select the Scope as Process to use the Application Rule only in the current process or Package to use the Application Rule across all the processes in the package. |
Attribute Expressions
Table 8-6 Attribute Expressions
| Field Name | Description |
|---|---|
| Name | Enter a unique name for the Application Rule. |
| Rule Type | Displays the rule type as DecisionRule. This Rule Execution type supports only DecisionRule type. |
| Execution Type | Displays the Application Execution Type as Attribute Expression. |
| Attribute | Select the attribute for which you want to define
the application rule, from the drop-down list. The list displays the
attributes configured for the selected application and component.
Click Add to add values to the selected attributes. A row is added in the Attribute Values pane. Click the Value column to select the values for the attribute from the drop-down. You can select one or more values. You can delete a row by clicking Delete icon. You can select multiple attributes and click Add to assign values to those attributes. |
Advanced Attribute Expressions
Table 8-7 For Advanced Attribute Expression Application Rule
| Field Name | Description |
|---|---|
| Rule Name | Enter a unique name for the Application Rule. |
| AND/ OR | Select the logical operator to be used for the conditions in a group. |
| Add Condition |
When you click Add Condition, a new row gets added. To define a condition, select the attribute, the operator and the value from the drop-down lists. Multiple values can be selected for each attribute. Attribute- The drop-down list displays the attributes configured for the selected application and component. Operator- Available options are in,=,<>,<,<=,>,>=. · Value- Displays the values configured for the selected attributes. Select the required value. Click Remove Condition to delete an already added condition. |
| Add Group | Click Add Group if you want to have nested
conditions. For each group, select the required logical operator as
AND or OR.
Click Remove Group to delete a group of conditions. |
JSON Write to DB
Table 8-8 For JSON Path Expression Application Rule
| 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 will be compared with RHS expression and rule will return 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. |
| 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:
|
| 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. |
JSON Read from DB
Table 8-9 JSON Read from DB
| Field Name | Description |
|---|---|
| Name | Enter a unique name for the Application Rule. |
| Rule Type | Only the Execution Rule type is supported. |
| Execution Type | Displays the Execution Type as JSON Read From DB. |
| Table Name | Enter the table name from which you want to read the data. |
| Column List | Enter the column names of the selected table. |
| Where Condition | Enter the filter condition (where clause) of the SQL query. |
| Return JSON Type | Select the JSON type of the returned value as JSON
Object or JSON Array based on your requirement.
JSON Object- Select this option if the returned value is a single row. JSON Array- Select this option if the returned data has multiple rows. |
| Output DataField | Select the DataField to which you want to return the value of the SQL query, from the drop-down list. |
| Scope |
Select the scope of the Application Rule from the
drop-down list. The options are:
|