Task 2: Creating the MinimumAge decision table
You create the MinimumAge decision table that is used in this tutorial.
Procedure
- In the Rule Explorer, in the rule project decisiontable-rules-start, right-click the eligibility package in the rules folder, and then click New > Decision Table.
- In the dialog, type the name MinimumAge, and then click
Finish.
The decision table editor opens, showing a blank decision table with three empty condition columns and one action column.
- Define the first condition column:
- Right-click the header of column A, and then click Edit Condition Column.
- Enter the title State.
- Make the relevant selections to create the following
condition test:
the state of the pickup branch of 'the current rental agreement' is <an object>
- Click OK.
- Define the second condition column:
- Right-click the header of column B, and then click Edit Condition Column.
- Enter the title Age of the customer.
- Make the relevant selections to create the following
condition test:
the customer's age of 'the current rental agreement' is at least <min> and less than <max>
- Click Apply, and then enter the subcolumn titles Minimum age and Maximum age by selecting each entry in Expression Placeholders.
- Click OK.
- Delete column C by right-clicking its header and clicking Remove Condition Column.
- Define the first action column:
- Right-click the header of the action column, which is now column C, and then click Edit Action Column.
- Enter the title Rental Rejected.
- Make the relevant selections to create the action:
make it <a boolean> that 'the current rental agreement' is rejected
- Click OK.
- Create and define a second action column:
- Right-click the header of the Rental Rejected
action column, and then click Insert Action Column After.
A new action column, named D, is added to the decision table.
- Right-click the header of column D, and then click Edit Action Column.
- Enter the title Reason.
- Make the relevant selections to create the action:
in 'the current session', display the message : <a string>
- Click OK.
- Right-click the header of the Rental Rejected
action column, and then click Insert Action Column After.
- Create two rows in the table to represent rules by entering
data into the table cells:
- In row 1, enter the following details:
- New York for the State column.
- 18 for Minimum Age and 21 for Maximum Age.
- true for the Rental Rejected column.
- In row 2, enter the following details:
- New York for the State column.
- 21 for Minimum Age and 25 for Maximum Age.
- false for the Rental Rejected column.
The completed decision table looks like the following table:

- In row 1, enter the following details:
- Merge the two New York cells by selecting them, right-clicking the selected cells, and then clicking Merge.
- Save your work.
What to do next
In the next task, you enter data into the decision table by generating lines automatically.