<!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">
<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>
k-<br>
</tt><br>
Mauricio Salatino wrote:
<blockquote
 cite="mid:efac615a1001101322y9488634t8399072ff58c8f16@mail.gmail.com"
 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 moz-do-not-send="true"
 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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KnowledgeBuilder kbuilder =<br>
&gt; KnowledgeBuilderFactory.newKnowledgeBuilder();<br>
&gt;<br>
&gt; kbuilder.add(ResourceFactory.newClassPathResource("pol.drl"),<br>
&gt; ResourceType.DRL);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( kbuilder.hasErrors() ) {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.err.println(
kbuilder.getErrors().toString() );<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KnowledgeBaseConfiguration config =<br>
&gt; KnowledgeBaseFactory.newKnowledgeBaseConfiguration();<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; config.setOption(EventProcessingOption.STREAM);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KnowledgeBase kbase =<br>
&gt; KnowledgeBaseFactory.newKnowledgeBase(config);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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 moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
    <a moz-do-not-send="true"
 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 moz-do-not-send="true" href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br>
- <a moz-do-not-send="true" href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br>
- Salatino "Salaboy" Mauricio -<br>
</blockquote>
</body>
</html>