Columns in a decision table
Each column in a decision table represents a condition or an action.
The columns in a decision table hold the conditions and actions of the rules in the table. The top cell of each column identifies the object of a condition or the target of an action.
| Row | Grade | Amount of loan | Insurance required | Insurance rate | |
|---|---|---|---|---|---|
| Min | Max | ||||
| 1 | A | <100,000 | false | ||
| 2 | 100,000 | 300,000 | true | 0.001 | |
Each numbered row in the table forms a rule. The rule performs the actions in its row when the conditions in the same row are met. For example, the second row in the example states the following rule:
if
all of the following conditions are true:
- the loan grade is A
- the amount of the loan is between 100000 and 300000
then
set the Insurance required to true
set the Insurance rate to 0.001
You can split a condition across columns in a decision table when a rule statement contains more than one value. For example, the following condition requires you to specify values for <min> and <max>:
if the age of the customer is between <min> and <max>
The following decision table expresses the condition in the Age column by using subcolumns for <min> and <max>:
| Age group | Age | |
|---|---|---|
| Min | Max | |
| 1 | 18 | 25 |
| 2 | 26 | 40 |