activation-group may be what you are looking for. For things in the one
activation group, only one rule is guaranteed to fire.
eg: activation-group "NIKE" ....
its an attribute like no-loop etc.
On 2/14/07, jdepaul <jjdepaul(a)us.ibm.com> wrote:
I have several rules defined in groups by Customer, so I have number of
rules
for Walmart, some rules for NIKE, more rules for SomeCustomer... When one
of the rules matches for a given customer I need to send an event
notification. I need to make sure that I send only ONE event notification
per Customer (regardless of how many rules were matched), thus after
finding
the very first match in the Walmart group, I'd like to activate a rule,
and
then short-circuit and "Skip" to the next group of rules for NIKE - to see
if any of the matches are found in the next group.
I've implemented this functionality using a Match object, which I assert
into WorkingMemory whenever I find a match for customer, then all my rules
check for absence of Match for given customer...
This works, but I wonder if there is a better way to do it - using Agenda
Groups, maybe - once I find ONE match for Walmart, skip to the next Agenda
Group?! Could someone comment on this?
THanks,
James
--
View this message in context:
http://www.nabble.com/Short-circuit-rules-by-group-%21-tf3222142.html#a89...
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users