if you don&#39;t put any timestamp fusion will automatically assign the timestamp at the insertion time.<br>I see the problem now. You are probably not using the entry points for events.<br>In your rules you need to add for example:<br>
Alarm() from entry-point &quot;alarmsEntryPoint&quot;<br><br>and then you need to insert the events in:<br><br>ksession.getWorkingMemoryEntryPoint(&quot;alarmsEntryPoint&quot;).insert(new Alarm());<br><br>that will treat your POJO as event in fusion.<br>
Please read the fusion documentation:<br><a href="http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-fusion/html_single/index.html#d0e523">http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-fusion/html_single/index.html#d0e523</a><br>
<br><br><div class="gmail_quote">2010/1/10 Khalil Hafsi <span dir="ltr">&lt;<a href="mailto:hafsi@fzi.de">hafsi@fzi.de</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



  

<div bgcolor="#ffffff" text="#000000">
<tt>Hi Mauricio,<br>
<br>
Of course I did. What about the timestamps , agenda and jobs that were
used in the example , are they necessary ?<br>
<br>
Thanks,<br><font color="#888888">
k-<br>
</font></tt><div><div></div><div class="h5"><br>
Mauricio Salatino wrote:
<blockquote type="cite">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" target="_blank">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" target="_blank">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" target="_blank">http://salaboy.wordpress.com</a><br>
- <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br>
- Salatino &quot;Salaboy&quot; Mauricio -<br>
</blockquote>
</div></div></div>

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