[rules-users] RE: reuse a rule already fired

ch4nd4n ch4nd4n at yahoo.com
Thu May 10 01:39:12 EDT 2007



Anstis, Michael (M.) wrote:
> 
> All rules that have their patterns (LHS) matched will be activated, so
> for example:-
> 
> Rule A
> When
> 	Person( )
> Then
> 	//Something
> End
> 
> Rule B
> When
> 	Person( )
> Then
> 	//Something
> End
> 
> Rule C
> When
> 	Person( )
> Then
> 	//Something
> End
> 
> Rule D
> When
> 	Person( )
> Then
> 	//Something
> End
> 
> Rule E
> When
> 	Person( )
> Then
> 	//Something
> End
> 
> Will all be activated and put on the agenda for execution. The order of
> execution can be controlled with salience (3.0.x), agenda-groups (3.0.x)
> and RuleFlow (4.0.x); all of which (I believe) are different forms of
> Conflict Management. If the rules were all in the same activation group
> then only the first to be activated would execute. IMHO, salience would
> probably be your simplest option for the requirement you have below.
> 
> With kind regards,
> 
> Mike
> 
> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org
> [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of ch4nd4n
> Sent: 09 May 2007 11:27
> To: rules-users at lists.jboss.org
> Subject: [rules-users] reuse a rule already fired
> 
> 
> Hi,
> is there a possibility to fire a particular rule twice?
> 
> For example if I have Rules "A", "B", "C", "D" and I am putting a Person
> Object with few parameters,
> 
> Then how can I fire in following order
> 
> A -> B -> C -> B -> D
> 
> Thanks,
> Ck
> 

Hi Mike,
I could control the sequence by using salience but that was not what I
exactly asked. I wanted to know how to fire a particular rule twice or
thrice in a particular set of rules.

Thanks,
Ck

-- 
View this message in context: http://www.nabble.com/reuse-a-rule-already-fired-tf3714857.html#a10407431
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list