ILOG JRules User Guide > Running and Debugging > Getting Started > Tutorial: Debugging a Ruleset > Task 2: Setting Breakpoints in the Rules

You can set breakpoints in rules to help determine the side effects of rule execution.

To perform correctly, the application should determine when customers qualify for special offers and compute the rental prices accordingly. In this tutorial, the application detects when customers qualify. However, the rules that compute the special offer prices are not triggered.

In this task, you set breakpoints in the rules that are related to the problem to see why the price rules are not triggered.

To set breakpoints:

  1. In the Rule Explorer (Window > Open Perspective > Other > Rule), navigate to the LongTermDiscount rule in the debug-rules-start > rules > pricing > qualifyFor package.
  2. Open the LongTermDiscount rule using the Intellirule Editor (right-click the rule and select Open With > Intellirule Editor).
  3. Notes
    Make sure you are in the Intellirule Editor, otherwise, you will not be able to add the breakpoints. If you are in the Guided Editor, close the editor window, then right-click the rule, and select Open With > Intellirule Editor.
  4. In the Code section, right-click in the shaded border to the left of the first action, then from the shortcut menu, select Toggle Breakpoint.
  5. A breakpoint appears beside the first action as shown here:
    XOM, BOM, and Vocabulary
  6. Repeat these steps to set a breakpoint after the first action in both the pricing.qualifyFor.SuperBowl rule and the pricing.price.LongTermDiscount rule.

In the next step, you start the debugging session again and watch the output at the breakpoints to see at exactly which point the error arises. In this case, not all the breakpoints you have just set will be reached, as you discover in the next step.

images/arrow_next.gif Next: Task 3: Inspecting the Agenda