Consistency check options

Decision Center can carry out advanced rule analysis to check for ambiguities in your rules.

You can carry out the following consistency checks:

Consistency check option Description
Check the ruleset archive

Selected by default. This option provides only basic syntax and decision table and decision tree checks (refer to Rule verification).

For information about further checking options, refer to Project options.

Enable rule analysis

If you select this option, you activate all the options listed after it. If you deselect it, the options are checked, but grayed out, signifying that these checks are not active.

By default, the first two options are enabled. They do not compare rules with other rules, and so are the least time-consuming checks to run.

Include decision tables and decision trees in the inter-rule checks This option specifies that rule verification must also compare action rules with the individual rules found in decision tables and decision trees. By default, this option is not enabled since these checks are time-consuming.

To obtain the most thorough accuracy and consistency checks on your rules, enable all the available checks. However, in certain circumstances, such as when testing, you might want to remove some of the checks to reduce the time it takes to generate a ruleset.

To enable or disable rule analysis on your rulesets:

To analyze the results, view the Rule Analysis report. You can view this report in various ways:

Consistency checks on individual rules

When set, the rule analysis features of Decision Center check for ambiguities or conflicts within individual rules, and between different rules. Rule analysis goes beyond the simple syntax of rules to consider its semantics, that is, what the rule does.

For rules in a ruleflow, the rule analysis compares only rules that are in the same task. For more information, refer to the Rule Designer user documentation.

Note:

Rule analysis indicates how consistent your rules are, but cannot identify all potential problems. Therefore, an empty Rule Analysis Report does not a guarantee that there are no problems in the analyzed rules.

The following checks analyze rules individually:

Consistency checks on individual rules Description
Rules are never selected Reported when a rule is not part of a rule task and cannot be selected at runtime. For more information, refer to the Rule Designer user documentation.
Rule never applies

Reported when the conditions of the rule can never be met. This normally means that the syntax of the rule is correct but it contains common logic errors, such as:

  • Use of the wrong operator to combine condition statements, such as and instead of or:

    the category of the customer is Gold and the category of the customer is Platinum

  • Values are inverted, for example: the age of the customer is between 70 and 50

  • Values in the conditions are outside the permitted range

Rule may cause domain violation

To reduce the risk of errors, some business terms can be assigned only values that are within a specified range. For example, the yearly interest rate on a loan might be limited to values between 0 and 10.

If a rule contains an action that tries to assign a value that is outside the permitted range, Decision Center displays a domain violation error in the report.

You set ranges on business terms in Rule Designer.

Consistency checks on sets of rules

The following table describes those checks that analyze rules in a set of rules in relation to each other:

Consistency checks on sets of rules Description
Rules have equivalent conditions This check highlights rules that contain condition parts that have the same meaning, and where their actions are different but not in conflict. Rules with equivalent conditions do not necessarily represent an error, but they may be good candidates to be merged.
Rules are equivalent

This check highlights rules where both their conditions and actions are the same. For example:

Rule1

definitions
   set minDiscount to 5
   set ageDiscount to 10
if
   the age of the borrower is more than 65
then 
   set the discount to minDiscount + ageDiscount

Rule2

if 
   the age of the borrower is at least 66
then 
   set the discount to 15

Although the syntax of these two rules is different, rule analysis evaluates the numeric expressions and reports that these rules are equivalent. You can therefore delete one of these rules.

Equivalent rules often arise between a decision table and an existing rule.

Rule makes other rule redundant

When two rules have the same actions, one of them becomes redundant when the conditions of the one are included in the conditions of the other.

In the following example, the Else part of Rule2 makes Rule1 redundant:

Rule1

if
   the category of the customer is Gold
then 
   set the discount to 10

Rule2

if 
   the category of the customer is Platinum
then 
   set the discount to 15
else 
   set the discount to 10

Although Rule1 is correct, it is redundant so you can delete it.

Redundant rules often arise between a decision table and an existing rule.

Rules are conflicting (or self-conflicting)

When the actions of two different rules set a different value for the same business term, the two rules may conflict. For example, conflicts occur in these two rules in circumstances where the conditions are equivalent or cover the same values.

Rule1

if
   the loan report is approved
   and the amount of the loan is at least 300 000
then 
   set the category of the borrower to Gold

Rule2

if 
   the age of the latest bankruptcy of the borrower is less than 1
   and the category of the borrower is not Platinum
then 
   set the category of the borrower to No Category

Rule1 and Rule2 conflict in the following circumstances, because the rules set the category of the borrower to different values:

  • If the loan report is approved

  • If the amount of the loan is 300 000, or more

  • If the borrower has not had a bankruptcy in the last year

  • If the category is not Platinum

You can correct conflicting rules by adjusting the conditions, deleting one of the rules, or setting different priorities on the rules.

A rule can be self-conflicting when two executions of a rule assign different values to the same business term.

Decision table or decision tree conflicts

To check decision tables or decision trees, you must enable the option Include decision tables and decision trees in the inter-rule checks.

If you select this option, rule analysis reports conflicts, redundancies, and equivalences between or within decision tables and decision trees.

For example, if the option is enabled, rule analysis can check between two rows in the same decision table or with a different decision table. Rule analysis can also check between a row of a decision table and an action rule. The same mechanism applies for decision trees.

However, decision tables and decision trees are checked for never-applicable rules and rules with range violation even if the option is disabled.

Note:

This option does not impact overlapping and gaps. Overlapping and gaps within a decision table or decision tree are detected when you write the rules.