skip to main content
Corticon Studio: Rule Modeling Guide : Logical analysis and optimization : Validating and testing Rulesheets in Corticon Studio : The conflict checker : Using overrides to handle conflicts that are logical dependencies

Try Corticon Now
Using overrides to handle conflicts that are logical dependencies
Overrides can be used for more than just conflicting rules. While the basic use of overrides is in cases where rules are in conflict to allow the modeler to control execution, it is not the only use. An advanced usage applies to cases where there is a logical dependency -- cases where a rule might modify the data so that it forces another rule to execute. That can be what you want but it could be unintended. This type of conflict is not detected by the conflict checker.
Consider a simple Cargo Rulesheet:
When tested, the first rule is triggered and its action sets a value that triggers rule 2:
The Ruletest result shows that the value set in the first rule's action modified the data so that the change in the condition's value triggered the second rule. If this effect is not what is intended, an override can be used. The use of an override here ensures that the modification of data will not trigger execution of the second rule -- they are mutually exclusive (mutex). When an override is set on rule 1 that specifies that, if it fired, it should skip rule 2...
... then the rules produce the preferred output:
Note that in this example, if these rules are re-ordered, the override is not necessary.