ILOG JRules User Guide > Running and Debugging > Getting Started > Tutorial: Debugging a Ruleset > Task 7: Debugging a Ruleflow

In this task, you set breakpoints on the tasks in the ruleflow to watch the execution. The breakpoints will demonstrate how the ruleflow functions when a customer is eligible to rent and when a customer is rejected.

To set the breakpoints:

  1. In the Rule Explorer, open the carreservation ruleflow in the flow package.
  2. In the Diagram page, set a breakpoint on the eligibility task by right-clicking it and selecting Toggle Breakpoint.
  3. XOM, BOM, and Vocabulary
  4. Set another breakpoint on the pricing task.
  5. Start the debugging session (click images/tut_icon_debug.png on the toolbar or select Run > Debug).
  6. Resume execution (click images/tut_icon_resume.png Resume or press F8) until execution stops in the eligibility task.
  7. In the Variables view, click rental=carrental.RentalAgreement to see the current value:
Approved Rental Agreement for Julian Bayles (May 20, 1970) of a MidSize car from Dec 26, 2005 at Concord (New Hampshire) to Jan 3, 2006 (8 days) at Concord (New Hampshire).
  1. Resume execution.
  2. The output in the Console view indicates that the eligibility task finished executing:
########### RESERVATIONS ################
Eligibility task : Initial action for Rental Agreement for Julian Bayles (May 20, 1970)
Eligibility task : Final action for Rental Agreement for Julian Bayles (May 20, 1970)
  1. Resume execution.
  2. The Console shows the output for the pricing task, which indicates that because Julian was accepted in the eligibility task, the ruleflow followed the path to the pricing task:
Pricing task : Initial action for Rental Agreement for Julian Bayles (May 20, 1970)
  set price of standard offer for the Rental Agreement for Julian Bayles (May 20, 1970)
Add surcharge of 2 for PEI
Add surcharge of 3 for PAI
Add surcharge of 21 for LDW [Economy, Compact, MidSize]
Add surcharge of 15 for CDW [Economy, Compact, MidSize]
  Rental Agreement for Julian Bayles (May 20, 1970)qualifies for the long term offer
  set the price of the long term offer for the Rental Agreement for Julian Bayles (May 20, 1970)
  Rental Agreement for Julian Bayles (May 20, 1970)qualifies for the Super Bowl offer
Allocating the small discount to the Super Bowl offer for Rental Agreement for Julian Bayles (May 20, 1970)
    * Offer: standard price: 579.90
    * Offer: Super Bowl price: 550.90 (5.00 % discount)
    * Offer: long term price: 529.90
    # Best Offer: long term price: 529.90
Pricing task : Final action for Rental Agreement for Julian Bayles (May 20, 1970)
  1. Resume execution.
  2. The output in the Console indicates that the eligibility is about to execute again and the Variables view shows that Mary Gerrard is the new value of rental.customer.
  3. Resume execution, and watch the Console to see the output after the eligibility task executes and the output after the pricing task executes.
  4. Again, the output in the Console shows that the pricing task executed, indicating the path followed through the ruleflow.
  5. Resume execution, and when execution stops, check the Variables view.
  6. Alice Boorman's rental is next to be evaluated by the eligibility task.
  7. Resume execution.
  8. The output in the Console shows that Alice is rejected:
-------------------------------------------------------------
Eligibility task : Initial action for Rental Agreement for Alice Boorman (Sep 12, 1990)
In Rhodes Island state, customer must be 25 or more to rent a car
 Rental Agreement for Alice Boorman (Sep 12, 1990)is rejected. Customer must be 18 or more to rent a car
Eligibility task : Final action for Rental Agreement for Alice Boorman (Sep 12, 1990)
-------------------------------------------------------------
  1. Resume execution, and when it stops, check the Variables view.
  2. Note that Evelyn Gosling is now about to be evaluated by the eligibility task. This means the path in the ruleflow went from the eligibility task directly to the end of the ruleflow for Alice.
  3. Resume execution until the application terminates or click images/tut_icon_terminate.png Terminate.

images/check.gif