<!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>
Thanks for the quick reply , It is very important for me that events
arrive in the order i fire them , this is a part of the code used for
stream mode :<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
kbuilder.add(ResourceFactory.newClassPathResource("pol.drl"),
ResourceType.DRL);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ( kbuilder.hasErrors() ) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.err.println( kbuilder.getErrors().toString() );<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; KnowledgeBaseConfiguration config =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; config.setOption(EventProcessingOption.STREAM);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; KnowledgeBase kbase =
KnowledgeBaseFactory.newKnowledgeBase(config);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; StatefulKnowledgeSession ksession =
kbase.newStatefulKnowledgeSession();<br>
<br>
after this part I just start inserting event into the ksession , i.e
ksession.insert(new Event(a)) ...<br>
<br>
does this suffice to make the events in stream mode and hence ordered ?<br>
thank you very much .<br>
k-<br>
<br>
</tt><br>
Mauricio Salatino wrote:
<blockquote
 cite="mid:efac615a1001090846n242e8e84va15657b71f79310a@mail.gmail.com"
 type="cite">both rules are exactly the same.<br>
If you found difference could be because your events are arriving in
different orders.. or because the action of one rule cancel the
activation of the second rule (if you are running both rules at the
same time)<br>
  <br>
  <br>
  <br>
  <div class="gmail_quote">On Sat, Jan 9, 2010 at 2:37 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 was experimenting with Drools fusion (last version) and I have a small<br>
question :<br>
What is the difference between the following (down the page) two rules :<br>
(note the "and" between the patterns) , i.e : how one can understand the<br>
"and" , is it a logical or temporal conjunction ? and finally what is<br>
the implied "relation" between pattern as in rule "b" ? I think it is an<br>
"and" , but using drools fusion to detect 2 stocks having a temporal<br>
relation (using the after op.) , I found different results when<br>
explicitly using "and" between the patterns and not using it.<br>
One final question , what is the default event policy in fusion ? I can<br>
not find any docu about that.<br>
Thank you for your time -k<br>
    <br>
rule "a"<br>
when<br>
&nbsp; &nbsp;--pattern1<br>
&nbsp; &nbsp;and<br>
&nbsp; &nbsp;--pattern2<br>
then<br>
&nbsp; &nbsp;--action<br>
end<br>
    <br>
rule "b"<br>
when<br>
&nbsp; &nbsp;--pattern1<br>
&nbsp; &nbsp;--pattern2<br>
then<br>
--action<br>
end<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>