On 26/08/2012, salt <writemesaltworth(a)gmail.com> wrote:
Hi david,
Have doubt in the below implementation. As per my understanding the
salience
are used to execute the rules in an order. The rule with higher salience
will execute first.
Correct.
By the below implementation will that affect the rule execution order.
salience ( 65535 - $list.indexOf( $trandet ) ) // lower indexes first
It does: indexOf returns 0, 1, 2,..., every so often, and thus the
salience values will be computed accordingly.
But as you wrote you want to fire the rule for the first "car" in your
list *only*, I suppose it isn't quite what you want.
-W
Thanks
Salt
--
View this message in context:
http://drools.46999.n3.nabble.com/Getting-Latest-Matching-Fact-tp4019345p...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users