No if salience (priority) is not set, then it is not necessarily as simple
as top to bottom in the XML (as I am sure you read in the doco on it). 

If you care about the order in the xor group, you need to set salience
accordingly. 

If you have very special needs for ordering, you can write and plug in your
own conflict resolver of course.

-----Original Message-----
From: Karr, David [mailto:[EMAIL PROTECTED] 
Sent: Sunday, 20 November 2005 11:53 AM
To: [email protected]
Subject: [drools-user] RE: [spam]::RE: [drools-user] RE: [spam]::Re:
[drools-user] Is order of "rule" elements in "rule-set" the load-order?

So are you saying that rules definitely fire (checking conditions) in the
order they are in in the XML, ignoring for the moment any conflict
resolution settings (like salience)?  If that's the case, then that might
give me what I need, if I order the rules in order of priority in each
xor-group.

> -----Original Message-----
> From: Michael Neale [mailto:[EMAIL PROTECTED]
> 
> No the ordering works over the whole ruleset with nothing to do with 
> xor grouping.
> 
> The rules inside an xor group would follow the ordering of rule firing 
> of the whole rule set, the xor group having no effect on this (the xor 
> group simply only allows one of the rules to fire).
> 
> -----Original Message-----
> From: Karr, David [mailto:[EMAIL PROTECTED]
> 
> > -----Original Message-----
> > From: Geoffrey Wiseman [mailto:[EMAIL PROTECTED]
> > 
> > On 11/19/05, Karr, David <[EMAIL PROTECTED]> wrote:
> > > I'm trying to figure out how I can make only one rule in a set of 
> > > rules fire, and have it check the rules in a certain order.
> > >
> > > I see that using the "xor-group" attribute deals with the
> > "only one"
> > > part, but I'm not sure how to specify the order it checks
> > the rules in
> > > an xor-group. Is that what "salience" is for? In a particular 
> > > xor-group, will the rule with the highest salience be
> checked first?
> > 
> > Salience is a factor, yes; that's the easiest way to control the 
> > firing of rules. There's a page on the Drools site about Conflict 
> > Resolution that should help clarify somewhat.
> 
> Yes, I saw that section.  I wasn't certain from that exactly what the 
> semantics would be in the context of xor-groups.
> Would the saliency ordering in a particular xor-group be completely 
> independent of the saliency ordering in a different xor-group, even 
> for identical saliency values across xor-groups?
> 
> I want to use salience within xor-groups because I want each rule in 
> an xor-group to have a condition which checks to see whether a 
> particular code value "isPresent()" in a list, but each particular 
> code value has a "priority", so I'll set the salience for that rule to 
> the priority for the code value.

Reply via email to