Hi,
One of the class member of the fact is map<String,List>.
In the DRL file I need to get list from the map(I know the map key) and set it to variable name $theList.
Then I need to check if some variable is memberof $theList
Can you please advice how to get the list from the map and set the $theList variable?

For example :

public class Cheese
{
    private String type;
    private Map<String,List<Integer>> map;
   

    public Cheese(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Map<String, List<Integer>> getMap()
    {
        return map;
    }

    public void setMap(Map<String, List<Integer>> map)
    {
        this.map = map;
    }
   
   
    public List<Integer> getListFromMap(String name)
    {
        return map.get(name);
    }
}

DRL file -

rule "Cheese_fans_18"
  when
    Cheese($theList : don't know how to get the list from the map)
    Cheese(type memberof $theList)
              
  then
    System.out.println("Cool");
end



Thanks,
Meny