title: Drools functions
body: <p>Recently I'm working with drools and I want to make some special checks on some objects. I need to use functions in the <code>when</code> section of the rule, but I'm getting an error. Example:</p>
  
  <pre><code>function boolean newFunction(int a){
    if(a&gt;0)
      return true;
    else
      return false;
  }
  
  rule "new rule"
  salience 100
  dialect "mvel"
  when
    eval(newFunction(1))
  then
    System.out.println("OK");
  end
  </code></pre>
  
  <p>The error i get always is:</p>
  
  <pre><code>unable to resolve method using strict-mode: java.lang.Object.newFunction(java.lang.Integer)
  </code></pre>
  
  <p>Is there no support on drools for functions in <code>when</code>section?</p>
  
  <p>Thanks!</p>