Mark,
   
  I am exteremely sorry. 
   
  I am new to Drools 3.0 (JbossRules). I had also mailed the same question to 
user groups but did not get any response thus far.
  I just wanted to know if it is possible to make function calls which do not 
have a boolean return type in LHS. If it is not possible in current 
implementation will it be addressed in future. I understand that as we are 
using AST parser providing this feature should be possible.
   
  Thanks & Regards,
  Sriram
  
Mark Proctor <[EMAIL PROTECTED]> wrote:
  This is the developers mailing list, where we talk about the development of 
Drools/JBoss Rules - please use the user mailing list for your question.

Mark
sriram wrote:     Hi,
   
  I have the following queries regarding implementation using JBoss Rules.
   
  In the LHS part how does one make function calls? I understand that one can 
use the eval( function-call ). But this i guess is applicable to only those 
functions which have a boolean return type. Say i need to call methods which 
need not have a boolean return type in the LHS part, then how do i implement it?
   
  Sample Example
  Consider a business/data object "County" with attribute "countryName". 
Suppose i need to check if the countryName should match with a predefined name 
which will be picked up from the application database :-
   
  rule "DMC validation on chapter value"
    when
        $country: DataModuleBusinessObject(chapter == Dao.getCountryName());
    then
        System.out.println("Country does not start with A");
  end
   
  Here Dao.getCountryName() is the call to get countryName from database. This 
method would return a String value. The above rule does not seem to work.
   
  Please guide me and let me know how to solve this problem and any possible 
workarounds. Let me know if the following are possible -
  1. To make method calls which do not have a boolean return type.
  2. Should all method calls be presented inside eval() ?
   
  Thanks & Regards,
  Sriram
  
  
---------------------------------
  Find out what India is talking about on - Yahoo! Answers India 
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it 
NOW 


                                
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it 
NOW

Reply via email to