[rules-users] Rules fired without calling session.fireAllRules()

Jin Chai jin.chai at jdsu.com
Mon Nov 17 17:17:03 EST 2008


Hi,

I have the following code, which is not working as I expected.

rule "New AlertFacade"
    salience 1140
	when
	    $af : AlertFacade();
	then
	    System.out.println($af.getProperties());	
end


In the java code:
   while (!isFireAllRules)
   {
     session.insert(alertFacade);
     ....
   }
   session.fireAllRules();


But I am seeing the rule "New AlertFacade" is fired everytime I inserted the
fact.  Shouldn't it wait until fireAllRules() be called? Am I missing something
here?

Thanks,
Jin




More information about the rules-users mailing list