You use the Agenda view to watch the execution output and see what happens to the
objects.
About this task
You inspect the agenda.
Procedure
- On the Run menu, click Debug
Configurations.
- In the Debug Configurations dialog, select
Debug-start-Julian, and then click Debug.
When you see the Confirm Perspective Switch dialog, click
Yes to open the Debug perspective.
- Click
Resume (or press
F8) to continue debugging to the first breakpoint.
Execution stops at the breakpoint in the qualifyFor.LongTermDiscount rule.
You can see the output in the Console view:
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)
-------------------------------------------------------------
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]
- Select Rule engine executing in
the Debug view tree, and open the Agenda view.
The Agenda view shows
the rules that ran: pricing.qualifyFor.LongTermDiscount and pricing.qualifyFor.SpringSeason.
However, the pricing.price.LongTermDiscount rule
is not listed, though it is supposed to run every time the pricing.qualifyFor.LongTermDiscount rule
is true.
- Under pricing.qualifyFor.LongTermDiscount > matchedObjects for the
carrental.RentalAgreement, click offers to inspect its value
in the detail pane:
[standard=standard price: 579.90]
- Click
Resume (or press
F8) to resume debugging. Execution stops in the pricing.qualifyFor.SpringSeason rule.
Normally, the pricing.price.LongTermDiscount rule
is supposed to run before the pricing.qualifyFor.SpringSeason rule.
In the Agenda view, again check the value of offers.
The
detail pane now displays the incorrect price for the long-term offer:
[standard=standard price: 579.90, long term=long term price: 0.00]
- Click
Terminate to
stop debugging.
What to do next
In the next task, you correct the problem so that the
pricing.price.LongTermDiscount rule runs properly.