[rules-users] Multiple conditions in a single BRL

Wolfgang Laun wolfgang.laun at gmail.com
Tue Jan 17 09:58:15 EST 2012


rule "25/30/50"
when
   Person( $age: age == 25 || == 30 || == 50 )
then
   System.out.println( $age );
end

Asking for "return" is futile.

-W

On 17/01/2012, srinivasasanda <srinivasasanda at gmail.com> wrote:
> Hi,
>
> Please suggest me in achieving my requirement.My requirement is.
>
> When
>
> Person age is equal to 25,Print 25 and return 25..else if Person age is
> equal to 30,Print 30 and return 30,else if Person age is equal to 50,print
> 50 return 50..
>
> How can I write these nested type of  if-else statements in a single
> BRL.Please suggest me.I tried by verifying docs bt couldnt find solution...
>
> Thanks
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Multiple-conditions-in-a-single-BRL-tp3666200p3666200.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