I think Krasnigor, Scott L (N-AST) wrote:
> Sorry for being dense. I can see using transactions. However, I don't
> quite understand how the working memory would be updated with one
> update. The pcs.firePropertyChange() fires for each data member change
> when their set method is called. How would I be able to have just one
> firePropertyChange update all slots in working memory? Thanks.
> 

The PropertyChangeEvent contains a "property name" member. If that
value is null, then the receiver of the event is supposed to assume
that multiple properties have change, and look at all properties to
determine which. That's what Jess does: if it sees a null property
name, it checks all the properties for changes.

So starting a "transaction" would turn off event broadcasts, and
ending the transaction would send an event. If you wanted to be fancy,
the mechanism could track what properties changed during a
transaction, and endTransaction could use a property name if only one
property changed, or a null name if multiple ones did. But in the
simplest implementation, endTransaction() would always just send a
null PropertyChangeEvent with null parameters.



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of [EMAIL PROTECTED]
> Sent: Thursday, January 12, 2006 10:11 PM
> To: jess-users@sandia.gov
> Subject: Re: JESS: Shadow Fact Question
> 
> I think Krasnigor, Scott L (N-AST) wrote:
> > I have a JavaBean that is represented in working memory. Each update 
> > to the Bean object usually updates 9 of the 12 slots for that object.
> > Watching the facts, shows that for each update to the Bean object 
> > (outside of Jess), I see the fact updated for each changed slot. Is 
> > there a way to cause a modification to all changed slots of a fact at 
> > one time when multiple slots have changed outside of Jess? Thanks.
> > 
> 
> Either 1) you can change the Bean to batch events together (you'd have
> to have a "startTransaction()" and "endTransaction()" pair of methods),
> or 2) use static definstances, which ignore change events, and then
> manually use Rete.updateObject() to tell Jess when an object has
> changed.
> 
> 
> ---------------------------------------------------------
> 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]
> --------------------------------------------------------------------
> 
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------
> 



---------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to