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.)
-W
On 20 August 2011 01:36, dvsnmurty <murty.devarakonda(a)teamaol.com> wrote:
Hello all,
I am having trouble with the following drools file:
===========================================================
rule "vam"
when
$pfMapType : MapType( name == "vam" )
$inputKey : InputKey( email == true )
$ldapResponseMap : Map()
then
$pfMapType.setQueryFilterCheck(true);
end
rule "transport"
when
$pfMapType : MapType( name == "transport" )
$inputKey : InputKey( email == true )
$ldapResponseMap : Map()
eval(
($ldapResponseMap.get("zimbraMailDeliveryAddress").equals($inputKey)) ||
(($ldapResponseMap.containsKey("zimbraDomainName") == true)
&& ($ldapResponseMap.get("zimbraDomainName").equals($inputKey))) )
then
$pfMapType.setQueryFilterCheck(true);
end
===========================================================
In the above, the rule "vam" works fine. But the rule "transport"
never
works. Could it be because of the use of containsKey() function?
Alternatively, I tries replacing the rule "transport" with the following
with no luck still:
===========================================================
rule "transport"
when
$pfMapType : MapType( name == "transport" )
$inputKey : InputKey( email == true )
$ldapResponseMap : Map()
eval(
($ldapResponseMap.get("zimbraMailDeliveryAddress").equals($inputKey)) ||
(($ldapResponseMap.keySet().contains("zimbraDomainName"))
&&
($ldapResponseMap.get("zimbraDomainName").equals($inputKey))) )
then
$pfMapType.setQueryFilterCheck(true);
end
===========================================================
Appreciate your kind attention on this.
Regards,
Murty.
--
View this message in context:
http://drools.46999.n3.nabble.com/Do-really-support-the-containsKey-funct...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users