Once execution is underway, the debugging commands are enabled. You can access them in the Debug menu or directly on the toolbar, as shown in Figure 16.12. A shortcut menu is also available on the action statements of the rule belonging to a ruleset currently executing.
Figure 16.12 Debugger Toolbar
Execution Commands
The execution commands that allow you to control the execution are described in Table 16.5:
Table 16.5 Execution Commands
|
|
|
---|
| Continue
| Executes the rule actions until a breakpoint is reached or until all the rules are fired if there are no breakpoints.
|
| Continue Without Stop
| Executes the rule actions until there are no more rules to fire, without stopping at breakpoints.
|
| Stop
| Suspends the execution.
|
| End
| Quits the execution.
|
| Continue to Cursor
| Executes the rule actions until a selected action statement is reached. The execution stops before executing the selected action statement.
|
| Open Debugger Panels
| Opens all the Debugger panels at the bottom of the Rule Builder window.
|
| Close Debugger Panels
| Closes all the Debugger panels at the bottom of the Rule Builder window.
|
Stepping Commands
In the ILOG Rule Language, rule actions are grouped into blocks. A block contains action statements and other blocks. A block is delimited by the characters { and }. The root block starts just after the then
keyword. The code shown in Figure 16.13 is an example of a rule action part with nested blocks:
Figure 16.13 Rule Action Part with Nested Blocks
In this rule action part, the engine evaluates six expressions. The numbers at the right of each expression indicate the evaluation order.
The stepping commands allow you to move from one block to another, see Table 16.6:
Table 16.6 Stepping Commands
|
|
|
---|
| Step Into
| Evaluates the current expression and steps into the next block if the next instruction is a block or goes to the next expression. In the previous example, the Step Into command stops at each expression.
|
| Step Out
| Evaluates the current expression, exits the current block, and stops at the first expression encountered. In the previous example, if expression 2 is the current expression, a call to the Step Out command will evaluate expression 2 and will position the cursor at expression 3. A new call to the Step Out command will exit from the current block (block 1) and the execution will continue at the first expression of the next rule.
|
| Step Over
| Evaluates the current expression, jumps over the next block, and stops at the first expression encountered after the next block. In the previous example, if expression 1 is the current expression, a call to the Step Over command will evaluate the current expression and will position the cursor on expression 3.
|
Note |
The stepping commands may be used with rules written in TRL or a business rule language, but the results displayed will be based on the IRL. |
See Also
Setting Breakpoints | Executing a Ruleset in the Rule Builder
|