Re: [rules-users] [Drools Activation-group] / how to set many activation groups

2014-02-11 Thread Wolfgang Laun
I can only let my imagination run wild... Let's say you have n vouchers. It may be that voucher i blocks voucher j or vice versa, or voucher i should be preferred against j (not reflexive). These rules should be evaluated up front, leaving you with a consolidated voucher set - you can call this "co

Re: [rules-users] [Drools Activation-group] / how to set many activation groups

2014-02-11 Thread jcarpene
Well, we do not really manage states, that is to say each voucher has a Rule which will be executed or not. All the rules are at the same level. The evaluation phase fires only the Rules that can be activated at the same time (currently thanks to the Activation-group) The output is a list of o

Re: [rules-users] [Drools Activation-group] / how to set many activation groups

2014-02-11 Thread Wolfgang Laun
How many different states (based on the validity of vouchers) do you have during an evaluation cycle? How are rules related to these states? What controls the transition from one state to another? Please understand that only a solid analysis can provide sound advice. -W On 11/02/2014, jcarpene

Re: [rules-users] [Drools Activation-group] / how to set many activation groups

2014-02-11 Thread jcarpene
Hi, thank you for your advice. However (I have to dive a bit more into Drools I guess), in your opinion, is the best way to rely on Agenda Groups (which could allow me not to fire some rules depending by controlling the agenda) or to build a condition taking a list of "manual" XOR groups to calcu

Re: [rules-users] [Drools Activation-group] / how to set many activation groups

2014-02-10 Thread Wolfgang Laun
All rule attributes are (more or less) just ad-hoc shortcuts for certain scenarios which can, with little effort, be implemented using the elementary techniques of inference, truth maintenance, fact manipulation etc. In fact, not letting rule attributes befuddle your mind will enable you to design

Re: [rules-users] [Drools Activation-group] / how to set many activation groups

2014-02-10 Thread Wolfgang Laun
On 10/02/2014, Mauricio Salatino wrote: > It seems that you can define a rule to codify what you are explaining. You > can change the agenda groups using rules, so you can write a rule that know > how and when change the agenda groups for each of your codes. > Please clarify as this sounds as if

Re: [rules-users] [Drools Activation-group] / how to set many activation groups

2014-02-10 Thread Mauricio Salatino
It seems that you can define a rule to codify what you are explaining. You can change the agenda groups using rules, so you can write a rule that know how and when change the agenda groups for each of your codes. On Mon, Feb 10, 2014 at 12:16 PM, jcarpene wrote: > Hello, > > I am trying to impl

[rules-users] [Drools Activation-group] / how to set many activation groups

2014-02-10 Thread jcarpene
Hello, I am trying to implement some rules that need more that a unique Activation-group. My case is related to some Voucher codes for online shopping. A simple case works great, by defining an Activation-group to make sure 2 Voucher codes cannot be used at the same time. But now I need 2 Vouche

Re: [rules-users] Drools Activation Group

2011-11-30 Thread freejava
Thanks for the clarification, Laune. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-Activation-Group-tp3546598p3548380.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users

Re: [rules-users] Drools Activation Group

2011-11-29 Thread Wolfgang Laun
You misunderstood the term "fire", which is commonly used to say that a rule's consequence is executed. This means that you can't use activation-group to achieve what you want. What you mean when you write "fire" is the rule condition's evaluation. This is not a process that can be controlled easi

[rules-users] Drools Activation Group

2011-11-29 Thread freejava
Hello Drools Experts, I have a question on activation group and trying to understand the mechanism. I have the following rules in a .drl file : import function com.test.utils.StringUtil.isEmpty; import function com.test.utils.Logger.log; rule "r1" salience 10 activation-group "fireOnlyOnce

[rules-users] Drools Activation Group

2011-11-29 Thread Java Bean
Hello Drools Experts, I have a question on activation group and trying to understand the mechanism. I have the following rules in a .drl file : import function com.test.utils.StringUtil.isEmpty; import function com.test.utils.Logger.log; rule "r1" salience 10 activation-group "fireOnlyOnce"