This works for me. If it is not working for you, please open a JIRA and
attach a test case for us to reproduce and investigate.
On an related note, just for the information of users reading this, it is
usually better to have control facts (like Bar in your case) as the first
pattern of the rule, specially in the presence of collect/accumulate. This
comes from the general principle that more restrictive patterns should be
written before less restrictive patterns in a rule's LHS, but what it really
does is to prevent a left propagation that is usually very expensive in the
presence of collect/accumulate.
2009/4/28 techy <techluver007(a)gmail.com>
Simplified version of my rule is given below. Since I want to run this
once once, I control it using Bar() fact.
This rule fired inconsistently(i.e sometime it fired, sometime it is not).
could not also reproduce. Does anybody have the clue for this? Thanks for
rule "run once"
list : ArrayList(size > 0) from collect(Foo())
View this message in context:
Sent from the drools - user mailing list archive at Nabble.com
rules-users mailing list
JBoss Drools Core Development
JBoss, a division of Red Hat @ www.jboss.com