Columns
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 header cell of each column identifies the object of a condition or the target of an action.
| Grade | Loan | Insurance | |||
|---|---|---|---|---|---|
| Min | Max | Rate | Required | ||
| 1 | A | <100,000 | false | ||
| 2 | 100,000 | 300,000 | 0,001 | true | |
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:
- Grade is A
- the amount of Loan is between 100,000 and 300,000,
then
set decision to a new insurance where
required is true,
the rate is 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 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 |