Try rule "transport" without the eval and print all components of the boolean expression in the consequence. This will show you where it fails. (My money would be on the equals($inputKey) comparisons.)<br>-W<br><br>
<br><div class="gmail_quote">On 20 August 2011 01:36, dvsnmurty <span dir="ltr"><<a href="mailto:murty.devarakonda@teamaol.com">murty.devarakonda@teamaol.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello all,<br>
I am having trouble with the following drools file:<br>
===========================================================<br>
rule "vam"<br>
when<br>
$pfMapType : MapType( name == "vam" )<br>
$inputKey : InputKey( email == true )<br>
$ldapResponseMap : Map()<br>
then<br>
$pfMapType.setQueryFilterCheck(true);<br>
end<br>
<br>
rule "transport"<br>
when<br>
$pfMapType : MapType( name == "transport" )<br>
$inputKey : InputKey( email == true )<br>
$ldapResponseMap : Map()<br>
eval(<br>
($ldapResponseMap.get("zimbraMailDeliveryAddress").equals($inputKey)) ||<br>
(($ldapResponseMap.containsKey("zimbraDomainName") == true)<br>
&& ($ldapResponseMap.get("zimbraDomainName").equals($inputKey))) )<br>
then<br>
$pfMapType.setQueryFilterCheck(true);<br>
end<br>
===========================================================<br>
In the above, the rule "vam" works fine. But the rule "transport" never<br>
works. Could it be because of the use of containsKey() function?<br>
Alternatively, I tries replacing the rule "transport" with the following<br>
with no luck still:<br>
<br>
===========================================================<br>
<br>
rule "transport"<br>
when<br>
$pfMapType : MapType( name == "transport" )<br>
$inputKey : InputKey( email == true )<br>
$ldapResponseMap : Map()<br>
eval(<br>
($ldapResponseMap.get("zimbraMailDeliveryAddress").equals($inputKey)) ||<br>
(($ldapResponseMap.keySet().contains("zimbraDomainName")) &&<br>
($ldapResponseMap.get("zimbraDomainName").equals($inputKey))) )<br>
then<br>
$pfMapType.setQueryFilterCheck(true);<br>
end<br>
<br>
===========================================================<br>
<br>
<br>
Appreciate your kind attention on this.<br>
<br>
Regards,<br>
Murty.<br>
<font color="#888888"><br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Do-really-support-the-containsKey-function-on-maps-tp3269570p3269570.html" target="_blank">http://drools.46999.n3.nabble.com/Do-really-support-the-containsKey-function-on-maps-tp3269570p3269570.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>