Re: JESS: Updating only a single property for a shadow fact
Actually adding an overloaded updateObject method that took in a property name and updated one property would work perfectly if that is possible. Performing a single query instead of updating all the properties (which could be sometimes 20 or more) for each each object is definetly much better. The reason we need to do this is because of incomplete or sometimes inconsistent information in the PropertyChangeEvent itself. We interface with different systems and have no control on the information contained in the event. In the case of arrays, these events tend to contain partial information such as added value or removed value rather than the whole array for performance reasons. Thanks, Lakshmi [EMAIL PROTECTED] wrote: I think Lakshmi Vempati wrote: Is there a possiblity that in future it would be possible to update the fact alone passing in the new value without using modify? I can see adding an overloaded updateObject() method that took a property name and just updated one property -- but that would still want to query the object for the property. I dislike the option of having a way to deliberately put the shadow fact out-of-sync with the object, especially as there's no guarantee that in some not-too-far-off version of Jess, the shadow fact will become "virtual" -- it won't really exist. Since you want to manage updates at a fine-grained level, you might consider not using definstances at all, and simply creating plain old facts with their slots populated by information extracted from the CORBA objects. - Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National LabsFAX: (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]
Re: JESS: Updating only a single property for a shadow fact
I think Lakshmi Vempati wrote: > > Is there a possiblity that in future it would be possible to update the > fact alone passing in the new value without using modify? > I can see adding an overloaded updateObject() method that took a property name and just updated one property -- but that would still want to query the object for the property. I dislike the option of having a way to deliberately put the shadow fact out-of-sync with the object, especially as there's no guarantee that in some not-too-far-off version of Jess, the shadow fact will become "virtual" -- it won't really exist. Since you want to manage updates at a fine-grained level, you might consider not using definstances at all, and simply creating plain old facts with their slots populated by information extracted from the CORBA objects. - Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National LabsFAX: (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]
Re: JESS: Updating only a single property for a shadow fact
Thank you for the response. There could be a slight danger in doing that. If the remote object is modified meanwhile (a new event for the same attribute is in the queue) and setting the property again to the old value will trigger a new event in addition, resulting in two events that will result in a infinite loop situation. Is there a possiblity that in future it would be possible to update the fact alone passing in the new value without using modify? Thanks, Lakshmi [EMAIL PROTECTED] wrote: I think Lakshmi Vempati wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] When mapping javabean objects as "static" definstances to JESS, is it possible to update only a single given property value instead of the whole bean state? You emailed me a more detailed version of this in which you mentioned that the Bean is backed by a CORBA-connected object, no network latency is an issue. You could use (modify) to change the shadow fact directly, but that would also call setXXX() on the Bean; that call would be redundant. Still, it's cheaper than calling updateObject() and having Jess call *all* of the getters. - Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National LabsFAX: (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]
Re: JESS: Updating only a single property for a shadow fact
I think Lakshmi Vempati wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] > > When mapping javabean objects as "static" definstances to JESS, is it > possible to update only a single given property value instead of the > whole bean state? You emailed me a more detailed version of this in which you mentioned that the Bean is backed by a CORBA-connected object, no network latency is an issue. You could use (modify) to change the shadow fact directly, but that would also call setXXX() on the Bean; that call would be redundant. Still, it's cheaper than calling updateObject() and having Jess call *all* of the getters. - Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National LabsFAX: (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]