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

Wolfgang Laun wolfgang.laun at gmail.com
Tue Feb 11 12:07:07 EST 2014


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 "context" - and the promotions can be derived
from that.

I think that the logic for this stage can be expressed by simple
rules, resulting in the insertion of some derived fact(s). Of course,
simple and uniform scenarios like i blocks j for all i != j can be
handled using a rule attribute, but devising a more general mechanism
will prepare you for all contingencies. (You never know what your
markting dptmt will cook up next, don't you?)

-W



On 11/02/2014, jcarpene <jerome.carpene at sopragroup.com> wrote:
>
> 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 objects (Promotions) which are added to the Basket.
>
>
> I am thinking of a new Condition which could test some "context" to exclude
> Rules from activation, but not sure it is the right way ... What do you
> think ?
>
>
> Jerome
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Drools-Activation-group-how-to-set-many-activation-groups-tp4028033p4028074.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