[Zope3-dev] workflow and python-created objects

Dominik Huber dominik.huber at projekt01.ch
Tue Jan 18 03:51:43 EST 2005


Hi Markus,
The content workflow uses an event subscriber for its post-creation 
handling. An IObjectCreatedEvent causes workflow instances to be added 
to content objects when they are created. Therefore you may have to 
invoke this handler notifying an IObjectCreatedEvent explicitely.

from zope.app.event.objectevent import ObjecCreatedEvent
from zope.event import notify

newHost = zapi.createObject(None, 'ikom.ikhost.IkHost')
notify(ObjectCreatedEvent(newHost))

Within the container framework, this job is done regularly by the adding 
views.

Regards,
Dominik Huber

Projekt01 GmbH
_____________________________
END OF MESSAGE





More information about the Zope3-dev mailing list