[Zope-CMF] CMF Document afterCreate for workflow

Lynn Walton waltonl@franklin.edu
Wed, 12 Sep 2001 15:52:49 -0500


Tres, in your answer about Workflowcore.afterCreate being moved to
PortalContent.manage_afterAdd, I'm still not clear ... why CMFDefault
Document
doesn't call manage_afterAdd.   When should a CMF type call this or not?

Thanks,
Lynn

Florent Guillaume wrote:

> Hi,
>
> In CMFDefault/Document.py, in addDocument, afterCreate is not
> called whereas it's called for all other standard document
> types (Link, Image, File, Favorite, NewsItem).
>
> Is this an oversight ? How does the workflow get called ?

'afterCreate' is indeed called on the other content types;  the
interesting bit (in 'CMFCore.WorkflowCore') is that it is a NOOP;

the behavior formerly implemented in 'Workflowcore.afterCreate' has

been moved to 'CMFCore.PortalContent.manage_afterAdd'.

We should probably remove it from Image, Link, NewsItem, et aliae.


Tres.
--