When completed, this tutorial provides an executable rule
project that includes a complete vocabulary and business rules.
Procedure
To import the answer projects and run
the tutorial:
- Import the answer projects:
- Open the Samples Console in the en_US (American English)
locale (see Running samples from the Samples Console).
- In the Samples and Tutorials view, locate Rule
Designer > Tutorials > Editing
decision tables > answer, and
then click Import projects to import the tutorial.
Eclipse switches to the Rule perspective, which is indicated in the
perspective toolbar.
The Rule Explorer view displays
two projects:
- The Java™ project carrental-xom,
which defines an execution object model for rule execution.
- The decision service main rule project, decisiontable-rules-answer,
which contains a complete vocabulary and a set of business rules.
This project references the project carrental-xom.
The decision service defines a variable set that contains
the following items:
- rental, which is verbalized as the current rental agreement
- session, which is verbalized as the current session
To view this variable set, expand decisiontable-rules-answer/rules in
the Rule Explorer and double-click DT-AnswerParameters.
- Run the tutorial:
- In the Rule Explorer, double-click rule project items
to view them in their editors.
- Click .
- In the Run Configurations dialog,
open the Decision Operation launch configurations. There are four configurations to run on four different user
profiles:
- DT-answer-Alice
- DT-answer-Julian
- DT-answer-Evelyn
- DT-answer-Mary
Look at the Parameters page and see how the session and the rental
agreement are initialized by using the BOM function.
- Select a user and click Run.
The Console view displays messages
that describe the actions carried out by the business rules in the
project.
- Select a different user and see that the output depends
on the user profile.