My $.02
I'm early in my use of Drools and Rules and struggled at first with the lack
of ELSE. At first I would frequently feel "an ELSE would be prefect here".
After awhile I believe that NOT having Else is a good thing. As I get
better with writing rules I find that most of the times when I think I need
an Else it usually means I should take a closer look at the rule.
If I have a true Else situation for me I put the two rules one right after
another. In these situations I think it is better to have to write the
"ELSE" rule as effectively a NOT of the WHEN rule then having an ELSE fall
through. Isn't that much extra coding and usually gives me pause to give it
one more evaluation to see if this is a true ELSE or a new rule with similar
criteria from the When.
Many times the ELSE covers too many possibilities that should be explicitly
checked and for me at least tells me I might not have fully broken the
requirements down. As another posting indicates the complexity of
implementing it I also wonder about the performance hit the logic to allow
for an ELSE would add.
With my current understanding of business rules and drools I would vote
against an ELSE.
Jim K.
--
View this message in context:
http://drools.46999.n3.nabble.com/else-in-rule-tp3264337p3565278.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.