[rules-users] Order of firing rules

nicolae oana oananicolae1981 at yahoo.com
Mon Jun 4 12:56:09 EDT 2007


Hi,

There are some rule attributes like: salience, agenda-group or activation-group etc.
Read more about them on : http://labs.jboss.com/jbossrules/docs/index.html

I think that you probably need salience attribute (integer value - default is 0)  in order to controll your rules. 

rule "ruleName"
salience 10
when conditions
then actions
end

The rules with greater salience attribute value will be executed first. 
Even without salience attribute, the order of rules is not randomize. It depends on the order of facts assertion on working memory ( this will cause some rules activation).

Kind regards, Oana

"Rajesh.Sachin10" <rajesh_sachin10 at yahoo.co.in> wrote: 
Hi,

    If we wrote 6 [when] [then] rules in an drl file, there is any order in
firing the rules or the rules get fired in random? 

    If it is fired in random, there is any method or keywords to control the
order of firing the rules?
-- 
View this message in context: http://www.nabble.com/Order-of-firing-rules-tf3866064.html#a10952429
Sent from the drools - user mailing list archive at Nabble.com.

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


       
---------------------------------
Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070604/1c4e2bb7/attachment.html 


More information about the rules-users mailing list