<!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 bgcolor="#ffffff" text="#000000">
This may be a bug, we are looking into it. Differential update greatly
increases the complexity of our data structures, which now have to be
maintained in specific order, and it can be very hard to find somewhere
were we don't fix the order after an insert or an update.<br>
<br>
Mark<br>
On 12/05/2010 18:52, Michal Bali wrote:
<blockquote
 cite="mid:p2y58f4ed91005121052vb37362bew3ead6326227dccc5@mail.gmail.com"
 type="cite">Hi,
  <div><br>
  </div>
  <div>I have encountered the following problem with the latest Drools
5.1 SNAPSHOT</div>
  <div><br>
  </div>
  <div>I've created a sample Drools project and replaced the Sample.drl
with the following:</div>
  <div>--Sample.drl--------------------------------------</div>
  <div>
  <div>package com.sample</div>
  <div>&nbsp;</div>
  <div>import com.sample.DroolsTest.Message;</div>
  <div><br>
  </div>
  <div>rule "Hello World"</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>forall(
Message( )</div>
  <div><span class="Apple-tab-span" style="white-space: pre;"> </span>Message()
)</div>
  <div><span class="Apple-tab-span" style="white-space: pre;"> </span>then</div>
  <div><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("executed");<span
 class="Apple-tab-span" style="white-space: pre;"> </span></div>
  <div>end</div>
  <div>--------------------------------------------</div>
  <div>If I run the sample application &nbsp;like this everything is fine -
"executed" is printed. However, if I modify the main method and insert
some additional fact just before the message fact is inserted, like
this:</div>
  <div>--DroolsTest.java-----------------------------------</div>
  <div>.....</div>
  <div>
  <div>ksession.insert(new Object());</div>
  <div>ksession.insert(message);</div>
  <div>.....</div>
  <div>-----------------------------------------------------------</div>
  <div>then the rule won't fire any more.</div>
  <div><br>
  </div>
  <div>Please note that if you change the fact insertion order (first
the message then the Object) it will work as expected.</div>
  <div><br>
  </div>
  <div>Is this a bug or am I missing something? I can file a JIRA if
needed.</div>
  <div><br>
  </div>
  <div>Thank you!</div>
  <div>Best regards,</div>
  <div>Michal</div>
  </div>
  </div>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </pre>
</blockquote>
<br>
</body>
</html>