Check out the new "slot-specific" declaration for deftemplates; it does exactly what you want.
See http://www.jessrules.com/docs/70/rules.html#slot-specific .


On Feb 8, 2007, at 11:39 PM, Michael Smith wrote:

Hey,

In Jess, is there any way to trigger a change to a single property and have only those rules that reference the property be affected?

With property change listeners and dynamic shadow facts it appears the entire shadow fact is updated and all rules referencing the object are deactivated and reactivated. I had hoped that the property change listener would *only* trigger updates to the properties named (at least as a default behavior).

I can see the desire to have the whole bean updated when any property changes (since some of the properties might be computed or virtual), however there's a lot of value in not forcing all the de-/ re-activations that seem to follow (even if more careful consideration of property updating might be necessary). If the whole bean is affected on effectively any property change and all rules that reference every bean have to re-evaluate -- regardless of the particular property updating, then shadow facts have a much narrower role than I'd hoped they could have.

Is there a way to change the behavior to only "tickle" the rules that reference the properties being updated? Manual updates of static shadow facts allow for control over updating, but are documented as driving updates on all properties. My naive expectation was that there was a way to have only the rules that reference properties named in a change event result in an update. Is that a capability available?

Any discussion of this is welcomed. I don't have a nice toy example to present -- but if the issue isn't clear from this post, I suppose I can contrive both a Java/Jess example and a corresponding COOL/CLIPS example.

Thanks,

- Mike Smith


--------------------------------------------------------------------
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 owner-jess- [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://www.jessrules.com

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