title: Drools Search Map Values
body: <p>I'm trying to create a rule on Drools.
  My current code is:</p>
  
  <pre><code>rule "Test Rule #1"
  when
   obj1 : MyObject ( )
   map : ArrayList (size &lt; 1) from collect ( HashMap ( values ( House ( windows = 3) ) ) ) from obj1.getHouses()
  then
    // Do something
  end
  </code></pre>
  
  <p>What I am trying to do is: check if there are any Houses with 3 windows in the HashMap. If there aren't <code>// Do something</code>.
  To do that I'm trying to access obj1.getHouses() which is an HashMap &lt; String, List &lt; Houses>>. Then I'm checking this HashMap values, and filter it for Houses that have 3 windows.</p>
  
  <p>But there is something wrong with this code. I'm getting this error: </p>
  
  <blockquote>
    <p>Unable to Analyse Expression values ( House ( windows = 3) ):
    java.lang.Class cannot be cast to org.mvel2.util.MethodStub]</p>
  </blockquote>
  
  <p>Can someone help?
  Thanks in advance.</p>