[rules-users] filtering object having max value
Wolfgang Laun
wolfgang.laun at gmail.com
Sat Jun 1 14:37:07 EDT 2013
If you need to restrict the maximum search to the facts that have a
rental less than reload value, you'll have to repeat the constraint
rental < $reloadVal in all patterns.
$re : ReloadEvent($rechargeNum : rechargedNumber,
$reloadVal : reloadValue ) from entry-point
"RELOAD-EVENT"
InsufBalFailFact(mobileNo == $rechargeNum,
$rental: rental < $reloadVal,
$pkgId : pkgId )
not InsufBalFailFact(mobileNo == $rechargeNum,
rental > $rental && < $reloadVal )
-W
On 01/06/2013, mohan <mohan.narangoda at gmail.com> wrote:
> re = new ReloadEvent();
> re.rechargedNumber = "777123456";
> re.reloadValue =80;
>
>
> balFact1 = new InsufBalFailFact();
> balFact1.mobileNo = "777123456";
> balFact1.rental=40;
> balFact1.pkgId="IBB40";
>
> balFact2 = new InsufBalFailFact();
> balFact2.mobileNo = "777123456";
> balFact2.rental=100;
> balFact2.pkgId="IBB100";
>
> balFact3 = new InsufBalFailFact();
> balFact3.mobileNo = "777123456";
> balFact3.rental=60;
> balFact3.pkgId="IBB60";
>
>
> want to filter balFact3 from list of InsufBalFailFact objects which is
> having max (rental) also less than "reloadValue".
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/filtering-object-having-max-value-tp4024055p4024069.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
>
More information about the rules-users
mailing list