Database Reference
In-Depth Information
Business Rule Designer
Compared to the decision tables, the rule functions are more IF-THEN like, where IF is
a set of conditions or pattern matches and THEN is the list of actions. A rule might per-
form several types of actions. An action can add, modify, or remove facts and can execute
a Java method or perform a function, which may modify the status of facts or create facts.
Here you can see the problem. If a rule action can modify the fact and if a decision is
based on this fact, then it's quite possible to create a never-ending loop within the ruleset
or lead to the so-called "combinatorial rules explosion." When a rule adds facts and when
these facts run against the rules, this process is called an inference cycle . Luckily, Oracle
implements the JSR-94-compliant RETE logic ( http://docs.oracle.com/cd/E15523_01/in-
tegration.1111/e10228/intro.htm ) for optimization of a rule's execution, avoiding unneces-
sary checks for facts when they were altered or deleted during the rule function execution.
The RETE algorithm provides the following benefits:
• Rule orders independence.
• Optimization across multiple rules.
• High-performance inference cycles; typically, each rule firing changes just a few
facts. The cost of updating the RETE network is proportional to the number of
changed facts, not the total number of facts or rules.
Yet we have to warn you that as long as all the rule executions for the highest performance
is memory-based, combinatorial explosion is still a threat and the RETE algorithm's com-
pliance alone cannot prevent memory depleting. Plan all your rulesets wisely and do not
Search WWH ::




Custom Search