Task 5: Executing the ruleflow and analyzing the results

You call the ruleflow, define it as the main ruleflow, and then run it.

About this task

Now that you have defined all the rule tasks, you can call the ruleflow from the application. An application can have several ruleflows, but one of them must be defined as the main ruleflow.

Procedure

  1. In the Rule Explorer, expand the deployment folder of the ruleflow-rules-start project and double-click ruleflow-rules-startOperation to open it in the decision operation editor.
  2. On the Overview page in the Ruleflow section, select the Use main ruleflow option and click <choose a ruleflow>.
  3. In the Ruleflow selection dialog, select carreservation from ruleflow-rules-start > rules > flow. Click OK, and then save the decision operation change.
  4. Click Run  >  Run Configurations.
  5. In the Run Configurations dialog, select the Decision Operation > ruleflow-start-configuration launch 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)

    With the ruleflow, the eligibility rule task determines that Alice is not eligible, so her rental agreement does not meet the condition for the pricing rule task and follows the else transition to the end of the ruleflow, without computing unneeded rental prices.

    Note: The dates come from the day the output is generated.

Results

You have completed the tutorial. It showed you how to use a ruleflow to control rule execution.