Re: [rules-users] decision tables conditional matching
Just some thoughts/comments... It looks like you are trying to solve a logic that has conditions that are dependent between rules. This usually gets messy like you have observed. I like to keep my rules "atomic" without ANY dependencies to other rules and I try to avoid controlling order of execution. As you stated, if you make every rule atomic, it has to account for all conditions - which is not necessarily bad, but your rules will have many conditions that seem redundant when you look at the other rules. There are many posts on this topic, you may want to scan through the posts. One approach is to use "stated facts" and let rete do its work. If your domain is to check eligibility, you can consider writing only the rules that evaluate for true or only the rules that evaluate to false. Typically, for eligibility, you only evaluate when eligibility would be false, that will reduce your rules. Otherwise, there will be plenty of gaps in your rules. I know I dint give an answer that you are looking for, but some things to consider. Good Luck :) -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-decision-tables-conditional-matching-tp4025603p4025645.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] decision tables conditional matching
We are using drools decision tables and have a quite a few scenarios where there are three conditions: A, B, and C. The behavior we want is: if A is true, then B and C must be true (if B and C are true, we want to output true, otherwise we want to output false) if A is not true, then B and C don't matter, the output should be true. Currently the way we are doing it is the following: 0 (priority), A is true (CONDITION), B is true (CONDITION), C is true (CONDITION), set eligibility to TRUE (ACTION) 0 (priority), NOT A (CONDITION), set eligibility to TRUE (ACTION) -1 (priority), A is true (CONDITION), set eligibility to FALSE (ACTION) We are using decision tables and we are dealing with more complex conditions than this simple example. For example, there are scenarios like if A and B are true then C and D must be true, in which we'd have to check if NOT (A and B) which can get messy. Any suggestions around best practices? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users