Re: [rules-users] Need drl help for arraylist
no did not tried that as i was not getting contains option by default. Thanks a lot laune. its working now. :) -- View this message in context: http://drools.46999.n3.nabble.com/Need-drl-help-for-arraylist-tp3883683p3883736.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Need drl help for arraylist
Did you try: Person( $name: name ) Values( nameList contains $name ) -W On 04/04/2012, arup 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@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Need drl help for arraylist
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@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users