Hi Mauricio,

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 :

            KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
            kbuilder.add(ResourceFactory.newClassPathResource("pol.drl"), ResourceType.DRL);
            if ( kbuilder.hasErrors() ) {
                System.err.println( kbuilder.getErrors().toString() );
            }
            KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
            config.setOption(EventProcessingOption.STREAM);
            KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(config);
            kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
           
            StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

after this part I just start inserting event into the ksession , i.e ksession.insert(new Event(a)) ...

does this suffice to make the events in stream mode and hence ordered ?
thank you very much .
k-


Mauricio Salatino wrote:
both rules are exactly the same.
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)



On Sat, Jan 9, 2010 at 2:37 PM, Khalil Hafsi <hafsi@fzi.de> wrote:
Hi guys,

I was experimenting with Drools fusion (last version) and I have a small
question :
What is the difference between the following (down the page) two rules :
(note the "and" between the patterns) , i.e : how one can understand the
"and" , is it a logical or temporal conjunction ? and finally what is
the implied "relation" between pattern as in rule "b" ? I think it is an
"and" , but using drools fusion to detect 2 stocks having a temporal
relation (using the after op.) , I found different results when
explicitly using "and" between the patterns and not using it.
One final question , what is the default event policy in fusion ? I can
not find any docu about that.
Thank you for your time -k

rule "a"
when
   --pattern1
   and
   --pattern2
then
   --action
end

rule "b"
when
   --pattern1
   --pattern2
then
--action
end

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -