Hi,
I'm having some trouble with value exchange between Jess and Java via
UserFunctions that are implemented in Java.First problem : A first UserFunction
receives 1 argument from Jess and doesn't know the exact type, so I use the
javaObjectValue method to extract in a Object variable. Problem occurs when the
value sent from Jess is a simple integer, for example the result of (+ 3 5).
Second Problem : A second UserFunction return a integer value by doing :
int x = ... ;
return new Value(x);
But my rule that compares this result with a simple integer doesn't work :
(test (eq 0 calltotheuserfunction))
My current solutions are :
1) (new Integer (+ 3 5))
2) (test (eq 0 (calltotheuserfunction intValue)))
But I don't like to add this "Java syntax" in my rules, is there a better way
to fix those problems ?Thanks again !
_________________________________________________________________
Soyez parmi les premiers à essayer Windows Live Mail.
http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d