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

Ansgar Konermann ansgar.konermann at googlemail.com
Fri Feb 19 11:01:17 EST 2010


Hi,

untested guess (replace ZipCode by actual type name of your ZIP code data):

rule "example"
   when
     $validZipCodes: Set() from RefData.getValidZipCodes()
     Example( $actualZips: zips )
     exists( ZipCode( this not memberof $validZipCodes ) from $actualZips )
   then
    error()
end

Am 19.02.2010 16:38, schrieb EdenAEL20:
> I have an object coming in which contains a collection of id's. I want to
> verify these id's are in another collection. I'm looking for something like
> collection is a subset of another collection. any ideas??
>
> zips below is a collection, i want to verify that each zip is in $e1.
>
> rule "example"
>    when
>           e1: Set() from RefData.getConstantValues()
>           e2: Example( zips not in $e1)
>    then
>         error()
>    




More information about the rules-users mailing list