title: Implement a for each loop in drools
body: <p>I want to implement a loop that will check every object in the list "then" return a boolean value.</p>
  
  <pre><code>function boolean anyActiveUsers(Application app, String params){
      if(app.getApplicantType().toString() == params) {
          for ( User user: app.getUsers()){
              if(user.getStatus() == "ACTIVE")
              return true;
          }
  
      }
      return false;
   }
  </code></pre>
  
  <p>But I'm getting an error:  &nbsp;</p>
  
  <blockquote>
    <p>Function Compilation error
    anyActiveUsers (line:7): File org/codehaus/groovy/grails/plugins/drools/example/anyActiveUsers.java, Line 15, Column 25: Operator ";" expected</p>
  </blockquote>
  
  <p>Can someone help me how to implement a for each loop in drools function?</p>