<br> Ha, thanks a lot Greg. I need new glasses... he is actually comparing with the parameter "second", but when creating the win fact, using the parameter "first".<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"><<a href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>></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'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 "direct"<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's all good. :) Sample code and output attached.<br>
<br>
--- On Thu, 4/16/09, Greg Barton <<a href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>> wrote:<br>
<br>
> From: Greg Barton <<a href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>><br>
> Subject: Re: [rules-users] Negation semantics in Drools<br>
<div class="im">> To: "Rules Users List" <<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>><br>
</div>> Date: Thursday, April 16, 2009, 8:50 PM<br>
<div><div></div><div class="h5">> It is on the latest snapshot release,<br>
> 5.0.0.20090417.005612-483<br>
><br>
> --- On Thu, 4/16/09, Edson Tirelli <<a href="mailto:tirelli@post.com">tirelli@post.com</a>><br>
> wrote:<br>
><br>
> > We need to investigate if that is still happening<br>
> in<br>
> > latest trunk.<br>
><br>
><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>
<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>