Your test, Mark, is not the same example to which Wolfgang refers.<br><br>You&#39;ll need to re-test with the DRL at the end of Wolfgang&#39;s email (which is what we&#39;ve included in N&amp;N for 5.2).<br><br>It&#39;s quite possible one of the ?&#39;s is simply wrong... but I don&#39;t understand the subtleties of BC syntax yet.<br>
<br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">On 24 June 2011 21:14, Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<u></u>

  
    
  
  <div text="#000000" bgcolor="#ffffff">
    On 23/06/2011 13:20, Wolfgang Laun wrote:
    <blockquote type="cite">Still not resolved...<br>
      <br>
    </blockquote>
    I have added a test for all the possible insertion orders for that
    particular use case and was not able to reproduce a problem:<br>
<a href="https://github.com/droolsjbpm/drools/commit/501f2196dcef754eed5a28b066b50665a5bc29a3" target="_blank">https://github.com/droolsjbpm/drools/commit/501f2196dcef754eed5a28b066b50665a5bc29a3</a><br>
    <br>
    MArk<br>
    <blockquote type="cite"><div><div></div><div class="h5">On 22 June 2011 21:40, Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org" target="_blank">mproctor@codehaus.org</a>&gt;</span>
      wrote:<br>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
          heh, I made a mistake with the rule<br>
          <div>( Location(z, y;) and ?hasFood(x, z;) )<br>
          </div>
          should be<br>
          <div>( Location(z, y;) and hasFood(x, z;) )<br>
            <br>
          </div>
          Otherwise it&#39;s not reactive, and then ordering matters.<br>
          <br>
          With that change I can do the insertions in any order and all
          is fine.<br>
          <br>
        </blockquote>
        <div><br>
          This works for the example you gave. But the one taken from
          the &quot;Introduction&quot; still depends on the order the facts are
          inserted. Below is the .drl, which does not need any pojos.
          Rule kickOff contains the order that produces nothing to see
          and eat:<br>
          You are in the table<br>
            You can see []<br>
            You can eat []<br>
          <br>
          Insert Here after the others, and it works.<br>
          <br>
          -W<br>
          <br>
           import java.util.List<br>
          <br>
          declare Thing<br>
              thing : String @key<br>
          end<br>
          <br>
          declare Edible extends Thing<br>
          end<br>
          <br>
          declare Location extends Thing<br>
              location : String  @key<br>
          end<br>
          <br>
          declare Here<br>
              place : String<br>
          end    <br>
          <br>
          rule kickOff<br>
          when<br>
          then<br>
              System.out.println( &quot;insert Here&quot; );<br>
              insert( new Here( &quot;table&quot; ) );<br>
              System.out.println( &quot;insert Edible&quot; );<br>
              insert( new Edible( &quot;peach&quot; ) );<br>
              System.out.println( &quot;insert Location&quot; );<br>
              insert( new Location( &quot;peach&quot;, &quot;table&quot; ) );<br>
          end<br>
          <br>
          # 2011-06-22<br>
          query isContainedIn( String x, String y ) <br>
              Location(x, y;)<br>
              or <br>
              ( Location(z, y;) and /*?*/isContainedIn(x, z;) )<br>
          end<br>
          <br>
          query whereFood( String x, String y )<br>
              ( Location(x, y;) and<br>
              Edible(x;) ) <br>
              or <br>
              ( Location(z, y;) and /*?*/whereFood(x, z;) )<br>
          end<br>
          <br>
          query look(String place, List things, List food) <br>
              Here(place;)<br>
              things := List() from accumulate( Location(thing, place;),<br>
                                                collectList( thing ) )<br>
              food := List() from accumulate( /*?*/whereFood(thing,
          place;),<br>
                                              collectList( thing ) )<br>
          end<br>
          <br>
          rule reactiveLook<br>
          when<br>
              Here( $place : place) <br>
              /*?*/look($place, $things; $food := food)<br>
          then<br>
              System.out.println( &quot;You are in the &quot; + $place);<br>
              System.out.println( &quot;  You can see &quot; + $things );<br>
              System.out.println( &quot;  You can eat &quot; + $food );<br>
          end<br>
          <br>
        </div>
      </div>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
rules-dev mailing list
<div class="im"><a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</div></pre>
    </blockquote>
    <br>
  </div>

<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>