Hi every one,

I have a problem in sending java variables as parameters to jess functions and rules.  I have a jess script that has some functions and I want to call one of the functions by java variables, but the code that i am writing is not working.  The following is the java code segment:  

   ruleEngine.store("userName",new String(userID.getText()));
   ruleEngine.store("passWord",new String(passWD.getText()));
   Value v = ruleEngine.executeCommand("(ckeckUser (fetch userName) (fetch passWord))");


And this is the function that is in jess script and i want to use:

(defquery findUser (declare (variables ?userID ?passWD))
 (userIDInfo (userID ?userID) (passWD ?passWD)))

(deffunction ckeckUser (?u,?p)
 (bind ?r (count-query-results findUser ?u ?p))
        (return ?r))

I would appreciate any help,

Soheila.


Do You Yahoo!?
Yahoo! Auctions - Click and bid on cool stuff like Dave Matthews Band Tickets & more!

Reply via email to