With the Business Rules Embedded decision
table editor, you can use automatic cell checking to highlight problems
in the contents of a decision table.
The editor automatically checks the contents of a decision table
when you open the table, and displays error and warning tags in the
decision table.
To view the cause of an error or warning, hover your mouse over
the tagged cell or the header of the column that contains the cell.
A message box opens with a description of the problem. When you hover
over the column header, the message box shows the rule statement for
the column along with a list of any problems in the column.
Errors
Errors prevent a decision table from
working. The following list provides common examples of errors:
- Unexpected value
- For example, entering a word where a number is expected, or entering
a word that does not match any of the variables that are defined for
the table.
- Mixed characters
- For example, entering a letter where a number is expected.
- Misspelled word
- Misspelling a word so that it does not match any of the variables
that are defined for the table.
- Wrong operator
- Entering an operator that produces a value that is out of scope
for the rule statement.
Warnings for overlaps and gaps
The editor
warns you when overlaps or gaps occur between rows with shared conditions.
These anomalies do not stop a decision table from working. However,
they might produce incorrect results. Typically, ranges in tables
are contiguous, and do not overlap.
Warnings are given for the
following reasons:
- Overlaps
- When two cells in a column contain ranges that include the same
values. In the example, the ranges [200,000; 300,000] and [200,000;
600,000] both include the numbers 200,000 to 300,000.
- Gaps
- When two cells in a column contain ranges that do not include
values between the ranges. In the example, the ranges <
100,000 and [200,000; 600,000] do
not cover the numbers between 100,000 and 200,000.
You can select overlap and gap checking for
an individual column or an entire table.
For an individual column:
- Right-click the top cell of the column.
- Select or clear Check Gap or Check
Overlap.
For an entire table:
- Click Check Gap and Overlap.
Updating warnings in a decision table
The decision
table rule editor provides manual and automatic row ordering. How
you update the warnings varies with the different row ordering modes.
- Automatic row ordering
- Click Optimize Row Order to update the
gap and overlap warnings. The warnings are displayed when the row
order and partitions are updated. Any change in a partition resets
the errors, for example, a change in the value of a condition cell.
- Manual row ordering
- All the editing commands update the errors. For example, if you
change the value of a cell and press Enter, the editor checks the
table for errors and updates the warnings.
Displaying errors and warnings together
If
a table contains errors and warnings, both are tagged in the table.
However, because errors are more severe than warnings, the table displays
an error marker in the header of any column that contains both errors
and warnings.