title: Drools Rules: How can I use a method on "when" section?
body: <p>I need to execute a method on "when" section of a DSLR file and I´m not sure if it´s possible. Example:</p>
  
  <pre><code>rule "WNPRules_10"
    when
      $reminder:Reminder(source == "HMI")
      $user:User(isInAgeRange("30-100")==true)
      Reminder(clickPercentual &gt;= 10)
      User(haveAtLeastOptIns("1,2,3,4") == true)
    then
      $reminder.setPriority(1);update($reminder);
  end
  </code></pre>
  
  <p>(note: isInAgeRange() and haveAtLeastOptIns() are methods of User)</p>
  
  <p>I tried with eval() and no errors appeared, but it didn´t execute. Like this:</p>
  
  <pre><code>rule "WNPRules_10"
   when
    $reminder:Reminder(source == "HMI")
    $user:User(eval($user.isInAgeRange("30-100")==true))
    Reminder(clickPercentual &gt;= 10)
    User(eval($user.haveAtLeastOptIns("1,2,3,4") == true))
   then
    $reminder.setPriority(1);update($reminder);
  end
  </code></pre>
  
  <p>How can I resolve this problem?</p>