On Apr 12, 2010, at 10:19 AM, Kumar, Amitesh wrote:

StD out
as you can see the result of the rule give me two facts with java.lang.String as the partyid
==> f-2 (MAIN::party1ID (partyId <Java-Object:java.lang.String>))
==> f-3 (MAIN::party2ID (partyId <Java-Object:java.lang.String>))





I think that's the problem right there. These are of RU.JAVA_OBJECT type instead of RU.STRING. Jess can work with String like this just fine in many contexts, but they're not considered equal for pattern matching. Generally, you want to write UserFunctions so that they return Jess types whenever possible. Change the Value object constructed by your UserFunction to explicitly use RU.STRING as the type, and you should be all set.


---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, 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