Assuming the row number indicates the sequence of your rules add the salience attribute and have it "use reverse row numbers".

Then add an additional constraint that checks that "fee" has not been set; e.g. "navclass( fees > -1 )" or "navclass( hasFeeBeenSet == false )"

As you have it now, all rules that match the given data will execute, so in your example "txntype==buy" matches rule 6 too. You cannot control the order rules' RHS execute with the same salience value (default is 0).

If you only add salience but not the additional check that "fee" has not been set you will be able to control the order the rules' RHS execute but not prevent later rules from firing after the earlier ones.

With kind regards,

Mike

On 28 August 2012 10:38, tanug <tanu.gupta@rupeelog.com> wrote:
Hello,

Attached here is the complete screenshot of the decision table.

i am not using salience, so all rules should have same salience of 0

I understand that in such cases, the conflict resolution strategy is
'specificity'.

But for the following case, when i run test scenario with following values:
family == mehta
clientid ==  shailesh
portfolio == exe
txntype == buy
scrip == acc
i get the rule firing sequence as 7-9-8 and 6 and I get 10 in my fees
variable.

but if I remove rule 6, the rules get fired in the following order - 7-9-8
and I get 100 in my fees variable.
This second case shows that it is indeed following the specificity rule.

Is it possible to know what conflict resolution strategy is being used in
guvnor? in eclipse?

http://drools.46999.n3.nabble.com/file/n4019414/Capture4.png

Many thanks in advance

Tanu





--
View this message in context: http://drools.46999.n3.nabble.com/Understanding-Rules-Firing-Sequence-tp4019409p4019414.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users