ILOG Rules for .NET User Guides > Rule Studio > Writing Rules > Working with Decision Tables > Checking Decision Tables

Rule Studio provides checking mechanisms to help you as you edit decision tables.

Checking Expressions

Rule Studio always checks that the expressions entered in the Edit Condition Column and Edit Action Column are valid. It checks that variables have been assigned where needed--that is, all the <select a object> placeholders in the expression have been filled. Rule Studio also checks that the values you enter in the cells of a decision table match the expression for the column. It checks that the number of arguments is correct and that the types of the values match the types of the corresponding arguments in the expression. So, for example, you get an error when you do not provide both the maximum and minimum values for a range of numbers.

You cannot successfully build a rule project while there are invalid expressions in its decision tables.

When Rule Studio finds a problem in an expression it puts a red squiggle on the inside of the cell containing the problem, or in the header of the column. It also adds an entry to the task list. You can get more information about the problem by placing the mouse pointer over the squiggle and reading the tool tip that appears.

Checking Overlaps

You can tell Rule Studio to check the cells in a column so that only one row (rule) can ever fire for a given case. To do this, Rule Studio looks for overlaps in the columns.

For example, if you have a column defined as age equals <enter a number>, and if you have one row in the column with the value >5 and another with the value 10, then when the age is equal to 10 both rows match the conditions and it is ambiguous which actions should be performed.

Overlap checking recognizes overlaps in all types and also identifies identical cells in the same condition column.

When Rule Studio finds an overlap problem it puts a blue squiggle on the inside of the cells in which the problem occurs. It also adds an entry to the task list, and adds a symbol (images/usrstd_dtable-error-icon17.gif) in the column header. You can get more information about the problem by placing the mouse pointer over the squiggle or the symbol and reading the tool tip that appears.

To activate and disable overlap checking
  1. In the Decision Table Editor, click the top-left cell of the decision table.
  2. Open the Properties window for the decision table.
  3. To open the Properties window, right-click in the decision table, and on the shortcut menu click Properties.
  4. Set the Check Overlap property to True.
  5. Rule Studio begins automatically checking the condition columns for overlap problems.
    To disable overlap checking, set Check Overlap to False.

Checking Contiguity

You can tell Rule Studio to check that the cells in a condition column consider all possible cases. This is particularly useful for making sure that there are no gaps in numeric intervals. For example, if you have a column defined as age equals <enter a number>, and you have three rows with the values 1, 2, and 4, the decision could not handle the case in which age equals 3.

When Rule Studio finds a contiguity problem it puts a blue squiggle on the outside of the cells in which the problem occurs. It also adds an entry to the task list, and adds a symbol (images/usrstd_dtable-error-icon18.gif) in the column header. You can get more information about the problem by placing the mouse pointer over the squiggle or the symbol and reading the tool tip that appears.

To activate and disable contiguity checking
  1. In the Decision Table Editor, click the top-left cell of the decision table.
  2. Open the Properties window for the decision table.
  3. To open the Properties window, right-click in the decision table, and on the shortcut menu click Properties.
  4. Set the Check Contiguity property to True.
  5. Rule Studio begins automatically checking the condition columns for contiguity problems.
    To disable contiguity checking, set Check Contiguity to False.

See Also

Working with Decision Tables