[Zope-CMF] Workflow, Events & Indexing

seb bacon seb@jamkit.com
Wed, 18 Jul 2001 15:41:40 +0100


* Tres Seaver <tseaver@palladion.com> [010718 14:39]:
> On Tue, 17 Jul 2001, Chris Withers wrote:
> 
> > 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.

< snip >

> This discussion started because of a failure in code which
> attempts to guess when it would be appropriate to reindex an
> object;  guaranteeing that the reindex happens at the right time
> is *way* more important than "programmer convenience".

I agree with Tres here.  Something, somewhere has to take
responsibility for reindexing, and the object itself would seem to be
the correct place.  

However, I'd just like to point out again that the failure in the code
is nothing to do with reindexing, although that was my own symptom;
the code is broken w.r.t. wrapped workflow methods being called
'with notification'.  It just so happens that the WorkflowCore also
reindexes objects at the 'with notification' point.  

I fixed my symptoms as you suggested, but if anyone is using the
notification features of the workflow, it won't work with CMF1.1.  It
strikes me this is a fairly serious bug; am I right?

seb