Testing ruleset execution
You can test the execution of a particular ruleset through a testing interface.
Before you begin
To test rulesets with a managed Java™ XOM, you prepare for the test in one of
the following ways:
- Construct the Java input parameters by using the options provided in the interface.
- Temporarily set the ruleset.managedxom.uris ruleset
property to the location of the Java XOM .jar files.Tip:
When you add this property to a ruleset, all execution requests use this same property value. In a production environment, this is unlikely to be the intended behavior.
About this task
The Rule Execution Server console provides a web testing interface for you to enter ruleset parameter values and call a deployed ruleset.
Restriction:
- The web testing interface is not a programmatic interface and is not designed for automated execution.
- On zRule Execution Server for z/OS®, you cannot test a ruleset from its Ruleset View: the Test Ruleset button is not available in the menu bar.
- You can use the testing feature only when the console is deployed in a Java EE environment where an execution unit (XU) is reachable through a JNDI lookup. You can verify that your deployment conforms to this configuration by checking that the result of the Local XU connectivity test is green. For more information, see Monitoring and managing the server.
- You cannot use the Test Ruleset feature for rulesets that are built with an incompatible engine version. In case of incompatibility, the Ruleset View provides more information.
Procedure
Results
The Test Ruleset View page displays
the results of the call. Two boxes are displayed:
- Execution result
This box provides information about ruleset execution:
Label Description Executed canonical ruleset path The complete path for the ruleset, including its version number Execution duration In milliseconds Number of rules The number of rules in the ruleset Rules fired The names of the rules that the rule engine executed Number of tasks The number of rule flow tasks in the ruleset Executed tasks The names of the tasks that the rule engine executed Output Strings that are written to print.out Warnings Any warnings that were raised during execution - Output Parameters
This box contains the values of the output parameters set on the ruleset. The values are displayed as strings. With the ruleset property ruleset.bom.enabled at true, these strings result from the BOM serialization. Otherwise, the strings are equal to the return value of the toString method.