[rules-users] activation-group

JLL jll at labocollard.be
Mon Apr 23 11:38:29 EDT 2007


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.




More information about the rules-users mailing list