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.
[]s
Edson
2009/4/28 techy <techluver007(a)gmail.com>
Hello
Simplified version of my rule is given below. Since I want to run this
rule
once once, I control it using Bar() fact.
This rule fired inconsistently(i.e sometime it fired, sometime it is not).
I
could not also reproduce. Does anybody have the clue for this? Thanks for
the help.
rule "run once"
list : ArrayList(size > 0) from collect(Foo())
not Bar()
then
insert(new Bar());
end
--
View this message in context:
http://www.nabble.com/inconsistent-behaviour-with-%27not%27-keyword-tp232...
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss, a division of Red Hat @
www.jboss.com