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> </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 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>