I think Michael Knapik wrote: > > (defrule report-subject-and-event-status > ?s <- (subject (subjectId ?sId) (caseStatusId ?csId)) > ?e <- (event (eventId ?eId) (conditionCodeId ?ccId)(eventDescriptor ?evtDescriptor)) > => > (modify ?e (conditionCodeId 9999)) > (printout t "* Event " ?eId " has a condition code: " ?ccID crlf) > > produces > > Event 100017 has a condition code: 1008 > > which is the original value. >
Imagine a JavaBean class Foo with a property X. Now, what does this print? Foo f = new Foo(); f.setX(23); int x = f.getX(); f.setX(37); System.out.println(x); It prints 23, right? Even though the X property of the Foo bean is 37, because you read the property, changed it, and then printed the value you read earlier. That's exactly what you're doing in your Jess code. The variable ?eId gets bound on the rule LHS; then you modify the value of that property in the bean; then you print the value of the variable which, not surprisingly, still has the same value. If you want to see the new value, you need to read it back from the object. --------------------------------------------------------- Ernest Friedman-Hill Science and Engineering PSEs Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------