To retrieve a Java object, instead of vv.get(1).stringValue(context), you'd use vv.get(2).javaObjectValue(context) . If your Userfunction is seeing a String instead of the object you expect, you're probably calling the function wrong; can you show us the real function call on the right-hand-side of this rule, instead of the pseudocode below?

On Jan 9, 2008, at 6:10 AM, manos wrote:


Happy new year to everyone.

I have created a defrule:

(deftemplate JessUser (declare (from-class JessUser)))
(load-function JessCaller)

(defrule lockRule
    "Testing the rule."
     ( JessUser { reportsLock == TRUE } )=> (calling DynamicReplanning
specificUser )
)

and from my JessCaller.java file i want to call DynamicReplanning function
with argument 'specificUser'.
I get 'DynamicReplanning' as a string with:
vv.get(1).stringValue(context),but i don't know how to get 'specificUser'
which is a java object of a class that I've created(User Class).
specificUser is also a bean
in JessUser.java so that jess can access it.In all my attempts I get it as a
string.

Thanks for your time,
Manolis

--
View this message in context: http://www.nabble.com/Userfunction- arguments-tp14709740p14709740.html
Sent from the Jess mailing list archive at Nabble.com.

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify owner-jess- [EMAIL PROTECTED]
--------------------------------------------------------------------

---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550                 http://www.jessrules.com

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to