[Zope-CMF] Workflow, Events & Indexing
Chris Withers
chrisw@nipltd.com
Tue, 17 Jul 2001 08:47:18 +0100
Tres Seaver wrote:
>
> The essence of my notion is that any method which changes catalogable
> attributes should call 'reindexObject', rather than relying on some
> underlying magic to get it called.
This does seem to violate the principle of 'only write the code once' :-S
If objects recieved a notification that they had changed, they could do this
re-indexing rather than other processes having to worry about this.
For example, what if the arguments to reindexObject change? You have find all
the places you call it and re-write them. 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?) and add the extra call.
This feels like something that belongs in a workflow or event model.
What do people think?
cheers,
Chris