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.
| Grade | Amount of loan | Insurance required | Insurance rate | |
|---|---|---|---|---|
| 1 | A | <100,000 | false | |
| 2 | A | [100,000; 300,000] | true | 0.001 |
Each 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 use operators to express a range of values for a condition. For example, this condition statement uses a range of ages that requires values for <min> and <max>:
if the age of the customer is between <min> and <max>
The following decision table expresses this condition for two rules in the Age column. It uses operators and <min> and <max> values to define the age ranges:
| Age | |
|---|---|
| 1 | [18; 25] |
| 2 | [26; 40] |