<div>    Did you tried this?</div><div><br></div><div>    Client(  $lang : language[&quot;Japanese&quot;] != null )</div><div><br></div><div>    This will bind $lang to the value associated with the key &quot;Japanese&quot; on the &quot;languages&quot; map and at the same time check that the value is not null. If you want to explicit test if there is a key &quot;Japanese&quot; in the map, then you can do:</div>
<div><br></div><div><div>    Client( languages.keySet contains &quot;Japanese&quot;,  $lang : language[&quot;Japanese&quot;] )</div></div><div><br></div>    Edson<br><br><div class="gmail_quote">2010/8/11 Manav <span dir="ltr">&lt;<a href="mailto:manav7574@yahoo.com">manav7574@yahoo.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I am new to drools and currently using version 5.1 for my testing.<br>
<br>
I am facing an issue with retrieving a value from Map if a key is present<br>
<br>
In my drl if i do this<br>
<br>
$c : Client (language contains &quot;Japanese&quot; , lang : language -&gt;<br>
(language.get(&quot;Japanese&quot;).equals(&quot;Expert&quot;)))<br>
<br>
it works ...but if i want to retrieve the value of the key i am not sure how to<br>
go about it . I tried various approaches but none of them worked<br>
<br>
<br>
i would like to do something like<br>
<br>
$c : Client (language contains &quot;Japanese&quot;, $langValue :<br>
language.get(&quot;Japanese&quot;))<br>
<br>
<br>
Can some one please guide me how to go about it .<br>
<br>
Regards,<br>
<font color="#888888">Manav<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>