Viewing the completed tutorial

You can load and run the completed version of this tutorial by following these step-by-step instructions.

About this task

When you finish, you can run the ruleflow made with the tutorial, and view its output.

Step 1: Loading the tutorial

You load the completed version of the tutorial.

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, navigate to Rule Designer > Tutorials > Creating and defining a ruleflow > answer, and then click Import projects.

    Two projects are shown in the Rule Explorer. The Java™ project carrental-xom defines an execution object model for rule execution. The rule project ruleflow-rules-answer contains a set of business rules and a ruleflow. This rule project references the project carrental-xom. The ruleflow is stored in rules/flow/carreservation.

Step 2: Running the tutorial

You run the completed tutorial.

Procedure

  1. Make sure you are in the Rule perspective. To open it, go to the Window menu and click Open Perspective  >  Other >  Rule.
  2. To open the ruleflow in the Rule Explorer, double-click ruleflow-rules-answer/rules/flow/carreservation to display this ruleflow:
    Completed ruleflow
  3. On the Run menu, click Run Configurations.
  4. In the Run Configurations dialog, select Decision Operation > ruleflow-answer-configuration, and then click Run.

    The Console displays the output::

    In Rhode Island state, customer must be 25 or more to rent a car
    Rejected Rental Agreement for Alice Boorman (Sep 12, 1988) of a FullSize car 
    from Dec 1, 2011 at Providence (Rhode Island)
    to Dec 5, 2011 (4 days) at Providence (Rhode Island)
    Note: The dates come from the day the output is generated.

Results

The Console view shows that the rules process requests for rentals, and compute offers based on information about the customers.