[rules-users] Do really support the containsKey() function on maps?
Edson Tirelli
ed.tirelli at gmail.com
Sat Aug 20 11:29:56 EDT 2011
I think your data is somehow not matching, but you can try to simplify
your rule like this (assuming Drools 5.2):
rule "transport"
when
$pfMapType : MapType( name == "transport" )
$inputKey : InputKey( email == true )
$ldapResponseMap : Map( this["zimbraMailDeliveryAddress"]
== $inputKey ||
this["zimbraDomainName"] ==
$inputKey )
then
$pfMapType.setQueryFilterCheck(true);
end
Edson
2011/8/20 dvsnmurty <murty.devarakonda at teamaol.com>
> Hello Wolfgang,
> Thanks for the quick reply. So if equals($inputKey) is the culprit, how
> can
> I modify the rule to make it work? My best guess is to do something like
> this:
>
> rule "transport"
> when
> $pfMapType : MapType( name == "transport" )
> $inputKey : InputKey( email == true )
> $ldapResponseMap : Map()
> then
> updateTransportMap($pfMapType, $inputKey, $ldapResponseMap)
> end
>
> And then add the function updateTransportMap() to do the required checks
> that I am doing in the eval above. Do you think of any other way?
>
> Regards,
> Murty.
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Do-really-support-the-containsKey-function-on-maps-tp3269570p3270684.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110820/16cf85bb/attachment.html
More information about the rules-users
mailing list