you need to call ksession.fireAllRules() after: ksession.insert(new Event(a))<br><br><br><div class="gmail_quote">On Sun, Jan 10, 2010 at 6:29 PM, Khalil Hafsi <span dir="ltr">&lt;<a href="mailto:hafsi@fzi.de">hafsi@fzi.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Guys,<br>
<br>
I am using DROOLS FUSION last version<br>
It is very important for me that events arrive in the order i fire them<br>
, this is a part of the code used for stream mode :<br>
&gt;             KnowledgeBuilder kbuilder =<br>
&gt; KnowledgeBuilderFactory.newKnowledgeBuilder();<br>
&gt;<br>
&gt; kbuilder.add(ResourceFactory.newClassPathResource(&quot;pol.drl&quot;),<br>
&gt; ResourceType.DRL);<br>
&gt;             if ( kbuilder.hasErrors() ) {<br>
&gt;                 System.err.println( kbuilder.getErrors().toString() );<br>
&gt;             }<br>
&gt;             KnowledgeBaseConfiguration config =<br>
&gt; KnowledgeBaseFactory.newKnowledgeBaseConfiguration();<br>
&gt;             config.setOption(EventProcessingOption.STREAM);<br>
&gt;             KnowledgeBase kbase =<br>
&gt; KnowledgeBaseFactory.newKnowledgeBase(config);<br>
&gt;             kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());<br>
&gt;<br>
&gt;             StatefulKnowledgeSession ksession =<br>
&gt; kbase.newStatefulKnowledgeSession();<br>
<br>
after this part I just start inserting Events into the ksession , i.e<br>
ksession.insert(new Event(a)) ...<br>
<br>
does this suffice to make the the engine in stream mode and hence ordered ?<br>
In the example app , Events were fired as they arrive , but a timestamp<br>
was given , and also agenda and jobs were used.<br>
Is that necessary for the engine to work in stream mode ?<br>
I have a piece of code that gives me different results every time I run<br>
it ?! it is in stream mode , but for some reason the rule either do not<br>
fire , or do not print the output. is there a way to debug into this ?<br>
<br>
thank you .<br>
k-<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> - Salatino &quot;Salaboy&quot; Mauricio -<br>