[rules-users] Getting Latest Matching Fact
salt
writemesaltworth at gmail.com
Fri Aug 24 02:02:00 EDT 2012
Hi Laune,
Vehicles list contains the values name and qty and the values are
car,10
jeep,20
lorry,30
car,30
Below is my implementation for that scenario which i have asked.
rule "HelloWorld_13"
salience 65523
when
$p1:Policy()
$trandet:Vehicle(name in ("CAR")) from $p1.vehicleslist
then
System.out.println($trandet.getQty());
end
The result for the above rule is
30
10
but i need 10 alone which is at the top of that list.. is that possible.?
and when googling found that if we use salience along with 'from' its
possible..
Please share your thoughts on the above.
Thanks
Salt
--
View this message in context: http://drools.46999.n3.nabble.com/Getting-Latest-Matching-Fact-tp4019345p4019378.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list