Tuesday, August 24, 2010

Compare between facts in condition

In Oracle Business Rules, it is usually the practice to validate a fact against a constant. But there might be cases where you would want to map the input from an user to one of fact, compare another fact with input from the user and make decisions. In other words, when the value of the constant to be issued in the condition is itself ambiguous, it is better to use the facts vs facts instead of facts vs constant method. For instance, I have a case where I have three inputs IP1, IP2 and IP3 coming in and I do not want to fix values (use constants for comparison in condition of rules) and instead make a condition directly involving IP1, IP2 and IP3. My schema in such a case will look like:

The decision table involving the facts will look like below:











The facts have been directly compared against each other without the need for a constant.

Peace!

Cheers,
- AR

1 comment:

Anonymous said...

Hi,
I'm trying to do this kind of fact to fact comparison using Decision Table. Do I need to type in the condition expression as the editor is not allowing to build the expression using two facts? I did type in but decision service is executing the decision table. When I'm making a fact to constant comparison then only it is executed. Any help would be much appreciated.
Thanks
Sam

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License