<br>   Ha, thanks a lot Greg. I need new glasses... he is actually comparing with the parameter &quot;second&quot;, but when creating the win fact, using the parameter &quot;first&quot;.<br><br>not Win(first == m.second)<br>
  insert(new Win(m.first));<br>
<br>   Yes, in this case the engine is working exactly as it should.<br><br>   Anyway, I added the (fixed) test case to the codebase, just in case. :)<br><br>   Thanks,<br>       Edson<br><br><div class="gmail_quote">2009/4/16 Greg Barton <span dir="ltr">&lt;<a href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.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;">You don&#39;t have to worry.  The engine is acting as it should.<br>
<br>
The rule Paul had was this, a bit simplified for clarity:<br>
<br>
rule &quot;direct&quot;<br>
when<br>
    m : Move()<br>
    not Win(first == m.second)<br>
then<br>
        insert(new Win(m.first));<br>
end<br>
<br>
If the insertion order is [Move(1,2), Move(2,3)] then the rule matches first on Move(2,3) and Win(2) is inserted.  No other rule fires because now Move(1,2) and Win(2) match up, removing the instantiation with Move(1,2) from the agenda.<br>

<br>
If the insertion order is [Move(2,3), Move(1,2)] then the order is this:<br>
<br>
matched Move(1,2) insert Win(1)<br>
matched Move(2,3) insert Win(2)<br>
<br>
The insertion of Win(1) in the first firing does NOT prevent the instantiation with Move(2,3) from then firing.<br>
<br>
So it&#39;s all good. :)  Sample code and output attached.<br>
<br>
--- On Thu, 4/16/09, Greg Barton &lt;<a href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>&gt; wrote:<br>
<br>
&gt; From: Greg Barton &lt;<a href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>&gt;<br>
&gt; Subject: Re: [rules-users] Negation semantics in Drools<br>
<div class="im">&gt; To: &quot;Rules Users List&quot; &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br>
</div>&gt; Date: Thursday, April 16, 2009, 8:50 PM<br>
<div><div></div><div class="h5">&gt; It is on the latest snapshot release,<br>
&gt; 5.0.0.20090417.005612-483<br>
&gt;<br>
&gt; --- On Thu, 4/16/09, Edson Tirelli &lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt; &gt;     We need to investigate if that is still happening<br>
&gt; in<br>
&gt; &gt; latest trunk.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<br>
      </div></div><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>
<br></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>