<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>Terry,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>    As I know this very alike as the drools implementation to resolve this so teorically this is not necesary as you set the right</DIV><DIV>configuration on drools.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-style-span">   You can use <FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">System.identityHashCode(obj)</SPAN></FONT> to compare to instances of the same object, so the rule can be like</SPAN></DIV><DIV>this:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>  rule "compare"</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>when</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>$f1: Foo()</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>$f2: Foo( $sysId -&gt; ( System.identityHashCode($f1) &lt; System.identityHashCode($f2)))</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>then</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I didnt check this code, so maybe the syntax can be wrong... but thas the idea...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Greetings.</DIV><BR><DIV><DIV>On 16-04-2007, at 15:28, Terry Laurenzo wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">This may be a silly question, but I had taken the non-self-joining nature of Drools for granted.  Aside from disabling the option in RuleBaseConfiguration, how would one write a rule that would not self-join (ie. the old behavior)?<DIV><BR class="khtml-block-placeholder"></DIV><DIV>(Say I wanted two different facts to match:</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>when</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>Foo()</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>Foo()</DIV><DIV>instead of the new default which allows the same fact to match)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks.</DIV><DIV>Terry</DIV><DIV><BR><DIV><DIV>On Mar 26, 2007, at 12:26 PM, Edson Tirelli wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV>   Michael,<BR><BR>   In 3.1 the default is now to allow self joins (we need to add BIG<BR>warnings to the documentation due to this change) and an option was<BR>added to RuleBaseConfiguration to remove self joins.<BR> <BR>   []s<BR>   Edson<BR><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><BR>Michael Neale wrote:<BR><BR>&gt; I know that we by default remove self joins, ie: <BR>&gt;<BR>&gt; when<BR>&gt;   Foo()<BR>&gt;   Foo()<BR>&gt;<BR>&gt; will not match for the same instance of Foo - is it possible to turn<BR>&gt; that off? I know we talked about it at one point, not sure what the<BR>&gt; latest position is (someone was asking me and I can't recall what our <BR>&gt; final position is). FYI Jess and Jrules both self join by default.<BR>&gt;<BR>&gt;------------------------------------------------------------------------<BR>&gt;<BR>&gt;_______________________________________________ <BR>&gt;rules-dev mailing list<BR>&gt;<A href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</A><BR>&gt;<A href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev </A><BR>&gt;<BR>&gt;<BR><BR><BR>--<BR> Edson Tirelli<BR> Software Engineer - JBoss Rules Core Developer<BR> Office: +55 11 3124-6000<BR> Mobile: +55 11 9218-4151<BR> JBoss, a division of Red Hat @ <A href="http://www.jboss.com"> www.jboss.com</A><BR><BR><BR>_______________________________________________<BR>rules-dev mailing list<BR><A href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</A><BR><A href="https://lists.jboss.org/mailman/listinfo/rules-dev"> https://lists.jboss.org/mailman/listinfo/rules-dev</A><BR><BR></BLOCKQUOTE></DIV><BR><BR clear="all"><BR>-- <BR>  Edson Tirelli<BR>  Software Engineer - JBoss Rules Core Developer<BR>  Office: +55 11 3124-6000<BR>  Mobile: +55 11 9218-4151 <BR>  JBoss, a division of Red Hat @ <A href="http://www.jboss.com">www.jboss.com</A><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">rules-dev mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</A></DIV> </BLOCKQUOTE></DIV><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">rules-dev mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</A></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><SPAN class="Apple-style-span" style="text-decoration: underline;; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="-khtml-text-decorations-in-effect: underline; ">                                                                        </SPAN></SPAN><DIV><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;"><B style="font-size: 13px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 13px; font-weight: bold; ">Felipe Piccolini M.</SPAN></B></SPAN></FONT></DIV><DIV><A href="mailto:felipe.piccolini@bluesoft.cl"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); -khtml-text-decorations-in-effect: underline; ">felipe.piccolini@bluesoft.cl</SPAN></A></DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>