[rules-users] Exclude certain rules

Vincent LEGENDRE vincent.legendre at eurodecision.com
Fri Nov 18 12:35:23 EST 2011


If you want to modify the "enabled" property of a rule according to facts in WM, why don't you add a first condition on that fact ?
If the problem is to groups some rules under this condition, you can use rule inheritance (extends keyword) : all LSH of parent rule will be inherited by child rules. Simply put your "enabling" conditions in parent rule.

I don't know if "enabled" can be a fact relative expression. I thin that this depends on when the enabled property is take into account by drools :
  - if compile time, ie the disabled rule does not even contribute in the RETE building, it will be impossible to bind the enabled property to something in WM
  - if run time , ie the rule exists in the RETE, but cannot be added to agenda (or filtered), may be it could be possible, but to me, it is far much cleaner to play with facts in conditions (which are made for this ...).


----- Mail original -----
De: "icechunk" <icechunk at gmail.com>
À: rules-users at lists.jboss.org
Envoyé: Vendredi 18 Novembre 2011 18:14:48
Objet: Re: [rules-users] Exclude certain rules


Thanks, wasn't aware of enabled attribute. Is there any way to insert a fact
into the enabled expression, say to the helper class being called? 

--
View this message in context: http://drools.46999.n3.nabble.com/Exclude-certain-rules-tp3517185p3519142.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list