Introduction
There may be a business need to trace the rule execution flow — for example, to identify where the rule execution has stopped or to investigate unexpected results. In such cases, rule tracing can be enabled. It allows you to monitor the current rule and also drill down into any child rules. If an error occurs, the trace highlights the exact step where it happened.
Prerequisites
The rule must already exist.
|
Quick Steps |
| 1 |
Search for and open the logical rule |
| 2 |
Open the Configuration tab, then update the properties |
| 3 |
Save the Rule |
| 4 |
Execute the logical rule on the application |
| 5 |
Return to the logical rule |
| 6 |
Open the Rule Results window |
| 7 |
View the execution diagram of the current rule |
| 8 |
View the left panel of the execution diagram |
| 9 |
View the execution diagram of the child rule, if any |
Detailed Steps
Step 1. Search for and open the logical rule.
Open the logical rule for which you want the trace on. This example uses rulUI_CalculateMonthlyFederalTax.
Step 2. Open the Configuration tab, then update the properties.
This is where you are going to configure the property that enables tracing of the rule.
The important properties are:
- Trace: Making a rule traceable means you can view the path and result every time the code executes that rule. The available options are:
-
- None: If selected, the rule cannot be traced.
- Only Result: Displays only the result in Rule Results window. It is ideally used for Condition Rules (only returns True or False) and Calculated Field (always returns a value).
- Current Rule: Displays the result and diagram for the current rule.
- Child Rule: Displays the execution of current and child rule, if exists.
Step 3. Save the Rule.
Click the Save icon to save the rule.
Step 4. Execute the logical rule on the application.
In this example, enter the input data and click the Calculate button to execute the underlying logical rule. In this case Federal Tax Calculator Maintenance is opened.
After successfully login into the application, open the desired menu item
Enter the desired field values and click the Calculate button.
Step 5. Return to the logical rule.
This is where you are going to configure the property that enables tracing of the rule.
Step 6. Open the Rule Results window.
This is where the results of the rule can be viewed.
Click the Show Rule Results icon to open the Rule Results window.
The return value, if any, gets displayed. You can double-click the list item to open the execution diagram of the current rule.
Step 7. View the execution diagram of the current rule.
View the execution diagram. You can double-click the silver strip to open the left panel of the rule.
In case of any error, the relevant step that resulted in the error gets highlighted in red color.
Step 8. View the left panel of the execution diagram.
Double-click on the silver strip to open the left panel of the execution diagram.
The important properties are:
- Input Argument(s): This is the parameter that is passed to the rule for its execution.
- Output Argument(s): This is the parameter that is passed from the rule after its execution.
- Input Field(s): This is the entity field that is used while executing the rule.
- Output Field(s): This is the entity field that is populated after executing the rule.
- Return Value: This is the value returned after executing the rule.
You can double-click the silver strip to close the panel.
Step 9. View the execution diagram of the child rule, if any.
This is another example. You can double-click any element that calls a child rule or executes a for-each loop to further view its details.
This is a child rule which is calling another child rule. Double-click the rule to open it.
You can view the execution of the child rule only if Child Rule option is selected for Trace property in the parent rule.
What are the improvements over S3 Version 6?
This is a new process.
Related Articles
Create and Test a Logical Rule with One Condition
Use a Try Block in a Logical Rule and Test the Rule
Logical Rule Elements
#Rules