<br>   You are not using the configuration you created... you need to pass it as a parameter to the factory:<br><br><br><tt>            KnowledgeBaseConfiguration config =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();<br>
            config.setOption(EventProcessingOption.STREAM);<br><br></tt><tt>            KnowledgeBase kbase =
KnowledgeBaseFactory.newKnowledgeBase( config );<br>
           
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());           </tt><tt><br></tt><br>   As it is now, your are using CLOUD mode. Since you are not timestamping events, the engine is using the system clock and your application should not rely on the matching order. If you need a specific matching order, you need to use one of the conflict resolution strategies (like salience).<br>
<br>   Edson<br><br><div class="gmail_quote">2009/12/14 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 Edson,<br>
<br>
I am running in stream mode , I used this function <br>
<br>
config.setOption(EventProcessingOption.STREAM);<br>
<br>
to enable it.<br>
<br>
About the clock and time stamping I am not using anything special ,
this is the initiation part of my main :<br>
<br>
<br>
            KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();<br>
           
kbuilder.add(ResourceFactory.newClassPathResource(&quot;pol.drl&quot;),
ResourceType.DRL);<br>
            if ( kbuilder.hasErrors() ) {<br>
                System.err.println( kbuilder.getErrors().toString() );<br>
            }<br>
            KnowledgeBase kbase =
KnowledgeBaseFactory.newKnowledgeBase();<br>
           
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());           <br>
<br>
            KnowledgeBaseConfiguration config =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();<br>
            config.setOption(EventProcessingOption.STREAM);<br>
            StatefulKnowledgeSession ksession =
kbase.newStatefulKnowledgeSession();<br>
            WorkingMemoryEntryPoint mainS =
ksession.getWorkingMemoryEntryPoint( &quot;mainS&quot; );<br>
<br>
Thank you,<br><font color="#888888">
Khalil Hafsi<br>
</font></tt><div><div></div><div class="h5"><br>
Edson Tirelli wrote:
<blockquote type="cite"><br>
   Are you running in STREAM or CLOUD mode? What clock are you using?
Are you timestamping the events or are you using the clock to timestamp
them?<br>
  <br>
   Edson<br>
  <br>
  <div class="gmail_quote">2009/12/14 Khalil Hafsi <span dir="ltr">&lt;<a href="mailto:hafsi@fzi.de" target="_blank">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;">Hi
Guys,<br>
    <br>
I was working lately with drools fusion, we wanted to know what event<br>
consumption policy was implemented.<br>
We made the following simple rule :<br>
    <br>
rule a<br>
    <br>
   when<br>
       $c1 : Event(symbol == 1 , $l1 :load) from entry-point &quot;mainS&quot;<br>
        and<br>
       $c2 : Event(this after $c1,symbol == 2,$l2 :load) from<br>
entry-point &quot;mainS&quot;<br>
    <br>
   then<br>
       System.out.println(&quot;event1 &quot;+$l1+&quot; event2 &quot;+$l2);<br>
    <br>
end<br>
    <br>
The event class has just symbol : int and load : int , load is used to<br>
differentiate between different events that have the same symbol.<br>
    <br>
and then we declared the following events into the stream using the<br>
constructor Event(symbol,load): with mainS being a
WorkingMemoryEntrypoint<br>
    <br>
           mainS.insert(new Event(1,10.0));<br>
           mainS.insert((new Event(1,20.0)));<br>
           mainS.insert((new Event(1,30.0)));<br>
           mainS.insert(new Event(2,80.0));<br>
           mainS.insert(new Event(2,90.0));<br>
    <br>
    <br>
We have the following output :<br>
    <br>
         event1 30.0 event2 90.0<br>
         event1 20.0 event2 90.0<br>
         event1 10.0 event2 90.0<br>
         event1 10.0 event2 80.0<br>
    <br>
So what is exactly the consumption policy used in DROOLS ? It seems that<br>
is unrestricted for event 90.0 and chronological for event 80 .<br>
    <br>
We have tested different situations and order of events and we always<br>
came to the conclusion that for the first $c2 the policy is<br>
chronological and for all the other $c2&#39;s it is unrestricted.<br>
    <br>
Thank you for you time.<br>
Khalil<br>
    <br>
_______________________________________________<br>
</blockquote></div><br></blockquote>
</div></div></div>

</blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>