Before you start
This topic explains the tasks, objectives, and prerequisites of this tutorial.
In this tutorial, you use the Ruleflow Editor to make a ruleflow to control rule execution in an application used by a fictitious car rental company.
The company needs to implement a car rental policy that changes regularly, and provide a reservation application. To implement the application, you add a ruleflow to a rule project, and then you define the ruleflow structure by creating ruleflow elements and transitions between these elements.
If you want to view what is created with this tutorial, see Viewing the completed tutorial.
A car rental company needs to implement a car rental policy that changes regularly. The company must also provide a reservation application that does the following:
- Enables car rental agents to complete rental agreement forms. At this stage, rules are used to assess customer eligibility and validate the rental agreement.
- Enables car rental agents to quote a price for a reservation. Rules compute the price and select the best promotional discount plan.
- Determines car assignments for customers. Rules resolve car assignments when customers come for pickup, and give upgrades if there is a shortage of cars.
Learning objectives
Along with learning about ruleflows, ruleflow elements, and ruleflow conditions, you do the following tasks:
- Create and edit a ruleflow.
- Define rule tasks, transitions, and transition conditions.
Time required
This tutorial takes about 30 minutes to complete.
Directory structure
You can find the files for this tutorial in the following directories:
- <InstallDir>/studio/tutorials/shared
- <InstallDir>/studio/tutorials/ruleflow
The ruleflow directory has the following structure:
- answer: The answer directory for the tutorial, which contains an executable example.
- start: The start directory for the tutorial, which contains a rule project with two rule packages eligibility and pricing, two ruleset parameters named rental and pricing, and a decision operation that uses the parameters as inputs.
What you need to know
When working with ruleflows, you can use one of these approaches:
- Bottom-up approach: After creating the rules, you add them to a ruleflow.
- Top-down approach: You design the ruleflow first, and then write and add rules to the designed structure.
You use the bottom-up approach in this tutorial. The tutorial provides the rules, which are based on the operations of a car rental company.
This tutorial is for developers who want to use ruleflows to control rule execution. It assumes that you are familiar with business rule programming principles, Java™, and the Eclipse environment.