[rules-users] activation-group

Bynum, Joe jbynum at onecommunications.com
Mon Apr 23 13:49:50 EDT 2007


I've read the manual but as I stated below only the first order seems to
trigger a rule.  The other orders are completely ignored.  I would
expect one rule in the group to trigger for each order.

-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of JLL
Sent: Monday, April 23, 2007 11:38 AM
To: rules-users at lists.jboss.org
Subject: Re: [rules-users] activation-group


from documentation
3.5.3.5. activation-group

default value N/A

type : String

Rules that belong to the same named activation-group will only fire
exclusively. In other words, the first rule in an activation-group to
fire will cancel the other rules activations (stop them from firing).
The Activtion group attribute is any string, as long as the string is
identical for all the rules you need to be in the one group.

NOTE: this used to be called Xor group, but technically its not quite an
Xor, but you may hear people mention Xor group, just swap that term in
your mind with activation-group.


JLL

Bynum, Joe wrote:
> 
> All,
>  
> I'm trying to setup three rules to process orders as a test case.  The

> first two rules look for specific conditions and the third one is the 
> default rule.  I only want a single rule to fire for each order that I

> pass into the engine.  I gave all three rules the same
activation-group.
> The first two rules have a salience of 10 and the third rule has the 
> default salience value.  The problem that I'm experiencing is that 
> only one order is processed and the rest are skipped.
>  
> Here's a snippet from the rules file:
>  
> rule "837621 - Stage 5"
> 
>     activation-group "Harris"
> 
>     salience 10
> 
>     when
> 
>         flowid is 1798
> 
>         workflow in stage "5"
> 
>     then
> 
>         assign prov plan "Harris Gtwy-ChXchange-New Loop"
> 
>         complete task "FAC VER"
> 
> end
> 
> rule "828257 - New Order"
> 
>     activation-group "Harris"
> 
>     salience 10
> 
>     when
> 
>         flowid is 1798
> 
>         workflow in stage "1"
> 
>     then
> 
>         assign prov plan "Harris Gtwy-ChXchange-New Loop"
> 
> end
> 
> rule "1798 Default"
> 
>     activation-group "Harris"
> 
>     salience 0
> 
>     when
> 
>         flowid is 1798
> 
>     then
> 
>         assign prov plan "Harris Gtwy-ChXchange-New Loop"=
> 
> end
> 
> Any Ideas?
> 
>  
> 
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 

--
View this message in context:
http://www.nabble.com/activation-group-tf3631850.html#a10142866
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




More information about the rules-users mailing list