Choosing between a rule set and a decision table
You can capture business rule logic using either a rule
set or a decision table. Here are some suggestions for how to decide
which format to use.
Begin by sketching out a plan for your rules on a white board or
a notepad. Use structure and terminology that is natural to the business
environment in which these rules will be used. Then, look for the
following trends in the finished product:
- If your rules seem to take the form of a large number of unstructured sentences, then you should probably use a rule set to capture their business logic. A rule set is more flexible than the more structured decision table.
- If you notice that every rule seems to use the same decision criteria, then it would be a good idea to use a decision table. In this case, the decision criteria that all the rules share in common can be captured once, and then you can define the parameters for each criteria.
- If your rules naturally take the form of a table, then you should probably use a decision table.
- However, if this table has a large number of holes, where some decision criteria are not applicable, or where the output values are undefined, then you should use a rule set. The structure of the decision table works well for regularity, but not for exception cases.
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15