[Zope-CMF] Workflow, Events & Indexing
Chris Withers
chrisw@nipltd.com
Fri, 20 Jul 2001 08:19:39 +0100
Tres Seaver wrote:
>
> Who else is going to tell an object that its attributes have
> changed? The object's own methods are responsible for making
> those changes, and therefore for notifying interested observers
> of the changes.
Yup, I agree with that :-)
So, what's the standard CMF ways of:
- registering an interested observer? (how do you specify what, exactly, it's
interested in?)
- notifying all the interested observers from within you object's methods?
> > And what if (as I need to), you need to call something like
> > portal_discussion.updateDiscussion(object) when the object
> > changes? You need to go find all places the object could change
> > (how do you do that?)
>
> Grep for 'reindexObject'. :)
And how do I do that with third party python-based content types that I don't
know about? ;-)
> If / when we add an event channel, the responsibility for publishing
> events to it will still rest with the methods which are actually
> making changes to the objects; at that point, your event-based
> discussion tool would be a subscriber to the event channel.
Yup, that sounds reasonable :-)
cheers,
Chris