I think [EMAIL PROTECTED] wrote: > /** > * @param name The name to set. > */ > public void setName(String name) { > this.name = name; > } ... > I expected that the rule will modify the Java Object but it turn out to be > no modification at all.
Your class is broken; you accept PropertyChangeListeners but don't send PropertyChangeEvents. Jess handles your modify by calling setName() on your object (your object will actuall be changed) but then relies on receiving the PropertyChangeEvent to tell Jess to update working memory. Since that event never arrives, working memory is never updated. Your setName() method has to call firePropertyChange(), something like: public void setName(String name) { String oldValue = this.name; this.name = name; m_pcs.firePropertyChange("name", old, name); } Alternatively, you can simply remove all references to PropertyChangeEvents. Jess will then be able to modify the object and working memory will stay in sync, but of course if the object is changed outside of Jess, Jess won't know about it. --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research 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] --------------------------------------------------------------------