[rules-users] filtering object having max value

Wolfgang Laun wolfgang.laun at gmail.com
Fri May 31 12:22:47 EDT 2013


What was the data you were using that didn't produce the expected result?
-W


On 31 May 2013 13:36, mohan <mohan.narangoda at gmail.com> wrote:

> 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.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130531/0f62fb1f/attachment.html 


More information about the rules-users mailing list