[rules-users] Need drl help for arraylist

Wolfgang Laun wolfgang.laun at gmail.com
Wed Apr 4 06:36:54 EDT 2012


Did you try:
    Person( $name: name )
    Values( nameList contains $name )

-W

On 04/04/2012, arup <arup4u2007 at gmail.com> wrote:
> Hi all,
>
> i need to write a rule to compare a String with a list of Strings (say
> String[] nameList).
>
> Person()
> {
> String name;
> }
>
> Values()
> {
> String[] nameList = new String[]{ "abc", "abcdef" }
> }
>
>
> how can i write the rule??
>
> when
> name of the person is same as any names in the nameList
> then
> do .....
>
>
> i have tried different rule but still not able to get the desired output.
> Thanks a lot in advance.... :) :) :)
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Need-drl-help-for-arraylist-tp3883683p3883683.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