In this task, you set breakpoints on the tasks in the ruleflow
to watch its execution. The breakpoints demonstrate how the ruleflow
functions when a customer is eligible or rejected.
Procedure
To set the breakpoints:
- In the Rule Explorer, open the carreservation ruleflow
in the flow package.
- On the Diagram page, set a breakpoint
on the eligibility task:
- Click the task to select it.
- Right-click the task, and then select Toggle
Breakpoint.
- Set another breakpoint on the pricing task.
- Start the debugging session with the Debug-start-Julian launch
configuration.
- Resume execution until execution stops in the eligibility task.
- 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 Mar 17, 2010 at Concord (New Hampshire) to Mar 25, 2010 (8 days) at Concord (New Hampshire).
- Resume execution.
You can
see from the output in the Console view that the eligibility task applied:
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)
- Resume execution.
The Console shows
the output for the pricing task,
which indicates that Julian passed the eligibility task,
and the ruleflow continued along 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 Spring Season offer
Allocating the small discount to the Spring Season offer for Rental Agreement
for Julian Bayles (May 20, 1970)
* Offer: standard price: 579.90
* Offer: Spring Season 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)
- Click
Terminate.