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.<br><br>   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&#39;s LHS, but what it really does is to prevent a left propagation that is usually very expensive in the presence of collect/accumulate.<br>
<br>   []s<br>   Edson<br><br><div class="gmail_quote">2009/4/28 techy <span dir="ltr">&lt;<a href="mailto:techluver007@gmail.com">techluver007@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hello<br>
Simplified version of my rule is given below.  Since I want to run this rule<br>
once once, I control it using Bar() fact.<br>
This rule fired inconsistently(i.e sometime it fired, sometime it is not). I<br>
could not also reproduce. Does anybody have the clue for this? Thanks for<br>
the help.<br>
<br>
rule &quot;run once&quot;<br>
list : ArrayList(size &gt; 0)  from collect(Foo())<br>
not Bar()<br>
then<br>
insert(new Bar());<br>
end<br>
<font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/inconsistent-behaviour-with-%27not%27-keyword-tp23282677p23282677.html" target="_blank">http://www.nabble.com/inconsistent-behaviour-with-%27not%27-keyword-tp23282677p23282677.html</a><br>

Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>