[rules-users] filtering object having max value
mohan
mohan.narangoda at gmail.com
Fri May 31 07:36:30 EDT 2013
Hi folks,
I want to filter object instance in WM when max value of an object field
(rental ) is less than X (reloadValue) . X will vary over time.
I tried to use below query but I couldn't get expected results. Could anyone
please help me?
Thanks.
--------------------------------------------
rule "Insuf-Balance-Reload Alert"
dialect "java"
when
$re : ReloadEvent($rechargeNum : rechargedNumber,$reloadVal :
reloadValue ) from entry-point "RELOAD-EVENT"
InsufBalFailFact(mobileNo == $rechargeNum,$reloadVal > rental, $pkgId :
pkgId,$rental : rental)
not InsufBalFailFact(mobileNo == $rechargeNum, rental > $rental)
then
System.out.println($rechargeNum+","+$pkgId +","+$rental);
end
--
View this message in context: http://drools.46999.n3.nabble.com/filtering-object-having-max-value-tp4024055.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list