[rules-users] Can I do a Collection contains Collection?

Greg Barton greg_barton at yahoo.com
Sat Feb 20 02:07:13 EST 2010


Absolutely you can use eval.  

--- On Fri, 2/19/10, EdenAEL20 <eden_mondragon at ml.com> wrote:

> From: EdenAEL20 <eden_mondragon at ml.com>
> Subject: Re: [rules-users] Can I do a Collection contains Collection?
> To: rules-users at lists.jboss.org
> Date: Friday, February 19, 2010, 10:31 AM
> 
> I have considered doing a custom operator contains all too.
> Can't I use the
> eval for this though like the example below? I haven't
> tried it yet.  
> 
> class SampleObject{
>    List IDs;
> }
> 
> 
> rule "test"
> no loop
>   when 
>         $h3: Set() from
> RefData.getIDs()
>         r1: SampleObject()
>         eval ( $h3.containsAll( r1.IDs)
> )
>    then
>         error()
> end
> 
> -- 
> View this message in context: http://n3.nabble.com/Can-I-do-a-Collection-contains-Collection-tp217546p217655.html
> Sent from the Drools - User 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