<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    On 23/06/2011 07:03, Wolfgang Laun wrote:
    <blockquote
      cite="mid:BANLkTimsK6RfxOuKsvAmuPfmSjpjq6WqKQ@mail.gmail.com"
      type="cite">Eeek!<br>
      <br>
      Assume this: A is a field of B is a field of C is a field of D is
      a... <br>
      <br>
      Object references remain the same, in all objects; I simply modify
      A, and<br>
      "when you change [A] you are also changing [B], so I must notify
      the<br>
      engine for [B]" but that's a field of C... &nbsp;D... E... and so on,
      until<br>
      'I' for infinity?!<br>
      <br>
      <u><b><i>It's just a change in some fact object's hashCode that
            causes this problem.</i></b></u><br>
    </blockquote>
    If you don't want any indexing in your rule engine. If you want
    indexing, you have to notify the engine. Changes to nested accessors
    have always been invisible to the engine. If a nested access
    changes, you must notify the engine of the root fact.<br>
    <br>
    Mark<br>
    <blockquote
      cite="mid:BANLkTimsK6RfxOuKsvAmuPfmSjpjq6WqKQ@mail.gmail.com"
      type="cite">
      <br>
      -W<br>
      <br>
      <br>
      <br>
      On 22 June 2011 22:37, Mark Proctor &lt;<a moz-do-not-send="true"
        href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;
      wrote:<br>
      &gt; As One is a field of Two. When you change One you are also
      changing Two, so<br>
      &gt; you most notify the engine for Two too.<br>
      &gt;<br>
      &gt; MArk<br>
      &gt; On 22/06/2011 14:37, Wolfgang Laun wrote:<br>
      &gt;<br>
      &gt; To avoid misunderstandings: yes, equals() is written
      according to hashCode,<br>
      &gt; i.e., according to the usual Java conventions.<br>
      &gt;<br>
      &gt; If<br>
      &gt;<br>
      &gt; &nbsp;&nbsp; - an object of class Two contains a member of class One,
      and<br>
      &gt; &nbsp;&nbsp; - one object Two and one object One are facts, and<br>
      &gt; &nbsp;&nbsp; - a rule modifies One, changing its hashCode<br>
      &gt;<br>
      &gt; then<br>
      &gt;<br>
      &gt; &nbsp;&nbsp; another rule containing the patterns<br>
      &gt; &nbsp;&nbsp; $one: One()<br>
      &gt; &nbsp;&nbsp; $two: Two( $x: one == $one )<br>
      &gt;<br>
      &gt; does NOT fire (any more).<br>
      &gt;<br>
      &gt; If you use the constraint<br>
      &gt; &nbsp;&nbsp; one == $one || != $one<br>
      &gt; the rule will fire, and you can observe that hashCode results
      for $one and<br>
      &gt; $x are the same and that $one.equals( $x ) returns true.<br>
      &gt;<br>
      &gt; Reproduced using 5.1.1 and 5.2.x<br>
      &gt;<br>
      &gt; -W<br>
      &gt;<br>
      &gt;<br>
      &gt;<br>
      &gt;<br>
      &gt; _______________________________________________<br>
      &gt; rules-dev mailing list<br>
      &gt; <a moz-do-not-send="true"
        href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
      &gt; <a moz-do-not-send="true"
        href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
      &gt;<br>
      &gt;<br>
      &gt; _______________________________________________<br>
      &gt; rules-dev mailing list<br>
      &gt; <a moz-do-not-send="true"
        href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
      &gt; <a moz-do-not-send="true"
        href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
      &gt;<br>
      &gt;<br>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>