Viewing the completed tutorial

When completed, this tutorial provides an executable rule project that includes a complete vocabulary and business rules.

About this task

You load the sample decision service and run it to see the results that are expected from the tutorial.

Step 1: Importing the anwser projects

You import the answer projects.

Procedure

  1. Open the Samples Console in the en_US (American English) locale (see Running samples from the Samples Console).
  2. 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.

Step 2: Running the tutorial

You run the tutorial.

Procedure

  1. In the Rule Explorer, double-click rule project items to view them in their editors.
  2. Click Run > Run Configurations.
  3. 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.
  4. Select a user and click Run.
    The Console view displays messages that describe the actions carried out by the business rules in the project.
  5. Select a different user and see that the output depends on the user profile.

Results

You loaded the sample decision service and ran it to see the results. Now, you update a decision service to produce the same results.