< Previous | Next >

Task 2: Setting breakpoints in the rules

You set breakpoints in rules to track what happens during rule execution.

About this task

To run correctly, the application must determine when customers qualify for special offers and compute the rental prices accordingly. At the moment, the application detects when customers qualify, but it does not run the rules for special offers.

You set breakpoints in the rules to determine why the special offer rules do not run.

Procedure

  1. Switch to the Rule perspective by clicking Window > Open Perspective > Other > Rule.
  2. In the Rule Explorer, locate the LongTermDiscount rule in the debug-rules-start > rules > pricing > qualifyFor package.
  3. Right-click the rule LongTermDiscount, and then select Open With > Intellirule Editor.
    Note: You must use the Intellirule editor to add breakpoints. If you are in the guided editor, close the editor window, and then right-click the rule and select Open With > Intellirule Editor.
  4. In the Content section, right-click in the shaded border next to the first action, and then select Toggle Breakpoint.

    The first action shows a breakpoint:

    XOM, BOM, and vocabulary
  5. Repeat these steps to set a breakpoint after the first action in both the pricing.price.qualifyFor.SpringSeason rule and the pricing.price.LongTermDiscount rule.

What to do next

In the next task, you start the debugging session again and watch the output at the breakpoints to see exactly where the error arises. Not all the breakpoints are reached, as you see in the next task.

< Previous | Next >