[rules-users] Function Call in LHS

Kris Verlaenen kris.verlaenen at cs.kuleuven.be
Fri Aug 17 10:14:13 EDT 2007


You should also use the parentheses for functions, as in normal Java code:

    eval ( teste() )

Of course you can add parameters etc. to your functions like this as well.

Kris

  ----- Original Message ----- 
  From: Rafael Alcemar 
  To: rules-users at lists.jboss.org 
  Sent: Friday, August 17, 2007 4:02 PM
  Subject: [rules-users] Function Call in LHS


  Hello guys! This is my first question for the list. I've defined a function in my DRL file to evaluate if a user can do a specific operation in my system. This function returns a boolean result. My question is if I can use this function in the test of LHS. 

  For example:

  rule "Cliente pode alugar"
      when
          eval(teste)
      then
          System.out.println("XXXXXX");
   end


  function boolean teste( ) {
      return true; 
  }


  Please, if anybody has some help, send me.

  Thanks!
  Rafael Alcemar



------------------------------------------------------------------------------


  _______________________________________________
  rules-users mailing list
  rules-users at lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070817/ee789751/attachment.html 


More information about the rules-users mailing list