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()
>    

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to