Ernest Friedman-Hill
Sun, 29 Nov 2009 09:49:27 -0800
"get" works on JavaBeans properties; you pass the name of the property ("foo") and Jess calls the accessor method ("getFoo") to get the value.
So presumably your bean class "B" does not have a public member variable "sB" -- not at all surprising!
On Nov 29, 2009, at 7:59 AM, Marco Zappatore wrote:
I answer to myself:if you substitute "get-member" with "get" in myRule1 (see quotation) itworks. Marco Zappatore wrote:Dear JESS users, I'm working with shadow facts and my question is the following: let's suppose I have 3 java beans 1) A (with slot sA) 2) B (with slot sB) 3) Cthe type for the sA slot is the java bean B itself and the type for the sBslot is C.First I definstanced C, then I definstanced B. I used the OBJECT slot ofthe shadow fact C as content for sB and I retracted C.Finally I definstanced A. I filled again the sA slot with the OBJECT slotof the shadow fact B and I retracted B too.Now I have to write a rule that has to verify directly in A whether or notC is in sB. My trials: (defrule myRule1 ?f <- (A (sA ?a &: (instanceof (get-member ?a sB) C)) => ;do something) (defrule myRule2 ?f <- (A (sA ?a)) (B (OBJECT ?a) (sB ?b &: (instanceof ?b C))) => ;do something) didn't work... Any idea? Many thanks in advance Marco Zappatore -- View this message in context: http://old.nabble.com/Multiple-shadow-facts-tp26558321p26558321.html Sent from the Jess mailing list archive at Nabble.com. --------------------------------------------------------------------To unsubscribe, send the words 'unsubscribe jess-users y...@address.com 'in the BODY of a message to majord...@sandia.gov, NOT to the list(use your own address!) List problems? Notify owner-jess-us...@sandia.gov .---------------------------------------------------------------------- View this message in context: http://old.nabble.com/JESS%3A-Multiple-shadow-facts-tp26558518p26560670.html Sent from the Jess mailing list archive at Nabble.com. --------------------------------------------------------------------To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'in the BODY of a message to majord...@sandia.gov, NOT to the list(use your own address!) List problems? Notify owner-jess-us...@sandia.gov .--------------------------------------------------------------------
--------------------------------------------------------- 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 y...@address.com' in the BODY of a message to majord...@sandia.gov, NOT to the list (use your own address!) List problems? Notify owner-jess-us...@sandia.gov. --------------------------------------------------------------------