This fires once for each matching sub-list: ... $array: arrayOfString,... $listlist: List() # List of List of String $list: List() from $listlist eval( allContainedIn( $list, $array ) )
Inserting objects of type List and writing patterns "List()" is just as iffy as picking "George Smith" from the telephone book. But if the List<List<String>> is a field, it can be bound to a variable just the same. Surely you don't need help in coding function allContainedIn. -W On 5 January 2012 06:08, gg <[email protected]> wrote: > I have a List of List of String : List<List<String>> and an array of > strings: String []. > > I want to fire a rule each time the inside "List of String" is contained in > the array of String []. > > for example > > List<List<String>> : > (1,2,3) > (2,3) > (4,5,6) > > and String []: > (2,3,4) > > so this should fire 1 rule corresponding to (2,3) contained in (2,3,4) > > > Thanks, > --GG > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Lists-of-Lists-membership-tp3633943p3633943.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
