Unless you assert the contents of the map into working memory, you are gonna have to use either an eval statement or from. For example using eval<br><br>when <br>    Cheese($type : type)<br>    Cheese(eval(map.get(&quot;foo&quot;).containsKey($type))<br>
then    <br><br><br><div class="gmail_quote">2009/4/21 Meny Kobel <span dir="ltr">&lt;<a href="mailto:meny.kobel@gmail.com">meny.kobel@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Hi,<br>One of the class member of the fact is map&lt;String,List&gt;.<br>In the DRL file I need to get list from the map(I know the map key) and set it to variable name $theList.<br>Then I need to check if some variable is memberof $theList<br>

Can you please advice how to get the list from the map and set the $theList variable?<br><br>For example :<br><br>public class Cheese <br>{<br>    private String type;<br>    private Map&lt;String,List&lt;Integer&gt;&gt; map;<br>

    <br><br>    public Cheese(String type) {<br>        this.type = type;<br>    }<br><br>    public String getType() {<br>        return type;<br>    }<br><br>    public void setType(String type) {<br>        this.type = type;<br>

    }<br><br>    public Map&lt;String, List&lt;Integer&gt;&gt; getMap()<br>    {<br>        return map;<br>    }<br><br>    public void setMap(Map&lt;String, List&lt;Integer&gt;&gt; map)<br>    {<br>        this.map = map;<br>

    }<br>    <br>    <br>    public List&lt;Integer&gt; getListFromMap(String name)<br>    {<br>        return map.get(name);<br>    }<br>}<br><br>DRL file - <br><br>rule &quot;Cheese_fans_18&quot;<br>  when<br>    Cheese($theList :<b> don&#39;t know how to get the list from the map</b>)<br>

    Cheese(type memberof $theList)<br>               <br>  then<br>    System.out.println(&quot;Cool&quot;);<br>end<br><br><br><br>Thanks,<br>Meny<br><br></div>
<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>
<br></blockquote></div><br>