This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 5. Working Memory 26 process. You can also actively tell Jess to refresh its knowledge of the properties of individual objects using the jess.Rete.updateObject(java.lang.Object) method. This behaviour is what you get for objects that don't support property change notification. In practice, this is fine. Most rule-based programs reason about static "value" objects whose properties don't change over time, or change only occasionally or at well-defined times. But if your objects will be changed often from outside of Jess, then it would be nice to have updates happen automatically. If you want to have your shadow facts stay continuously up to date, Jess needs to be notified whenever a Bean property changes. For this to happen, the Bean has to support the use of java.beans.PropertyChangeListener s. For Beans that fulfill this requirement Jess will automatically arrange for working memory to be updated every time a property of the Bean changes. We can modify our Account class to support this feature like this: property of the Bean changes....
View Full Document
This note was uploaded on 03/02/2010 for the course COMP 102 taught by Professor Smith during the Spring '10 term at California State University , Monterey Bay.
- Spring '10