The request for "else" is not as simple as it may seem. (Has the fundamental difference between a rule and an if statement impregnated itself?)
Given rules when Car(color=Color.RED) then when Car(color=Color.BLUE) then and assuming that we have an "else" linked to these rules, how should this "else" rule fire? (a) Fire once, when there are no RED or BLUE Car facts ano no other Car facts at all. (b) Fire once, when there are no RED or BLUE cars but when there is at least one Car fact, with any other color. (c) When there are no RED or BLUE cars, but fire once for each Car that has any other color. (d) Irrespective of the presence or absence of RED and BLUE Car facts, once for each Car that has any other rule. I am, of course, assuming that rules do not fire mutually exclusive; hence an "else" could fire even when one of its associated "when" rules should fire. There is, of course, a thing called "decision tree", and it's legitimate to expect that a "decision making system" should provide this technique (just like "decision tables"). But I think it should not be tacked onto rules (and you may not even need a Rete engine for that) - the user confusion is bound to reach new levels. -W On 06/12/2011, Mark Proctor <[email protected]> wrote: > On 05/12/2011 18:43, ronalbury wrote: >> Please consider the possibility of >> >> When >> >> Then >> >> When >> >> Then >> >> Else > It's already specced up in "relational data flows" which allows a > tree-like data flow for your decision: > http://community.jboss.org/wiki/RelationalDataFlows > > I hope that it, or a variation on it, is delivered in 2012. > > Mark >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/else-in-rule-tp3264337p3562187.html >> Sent from the Drools: User forum mailing list archive at Nabble.com. >> _______________________________________________ >> rules-users mailing list >> [email protected] >> https://lists.jboss.org/mailman/listinfo/rules-users > > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
