Working with decision tables
For a complete example of how to work with decision tables, see the
Training sample available on GitHub
. Alternatively, you can import the
Training sample from the Samples library in Decision Designer. For more information about the Samples
library, see Building decision
services.
How decision tables work
A decision table contains rows and columns that work together to form rules. In the following table, each numbered row expresses a rule. The columns define the conditions (Grade and Amount of loan) and actions (Insurance required and Insurance rate) of the rules in the table.
| Grade | Amount of loan | Insurance required | Insurance rate | ||
|---|---|---|---|---|---|
| Min | Max | ||||
| 1 | A | <100,000 | false | ||
| 2 | 100,000 | 300,000 | true | 0.001 | |
| 3 | 300,000 | 600,000 | true | 0.003 | |
| 4 | ≥600,000 | true | 0.005 | ||
| 5 | B | <100,000 | false | ||
| 6 | 100,000 | 300,000 | true | 0.0025 | |
| 7 | 300,000 | 600,000 | true | 0.005 | |
| 8 | ≥600,000 | true | 0.0075 | ||
When an application calls a decision table, the rules are executed. If the conditions in a row are met, the rule that is formed by the row performs the actions in the row.
You can add rows to the decision table and enter values in their cells to create new rules. You can also define preconditions that apply to all the rules in a table. Error markers help you find overlaps and gaps in your rules.