[Zope3-dev] workflow and python-created objects

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Jan 19 08:49:29 EST 2005


On Tuesday 18 January 2005 02:37, Markus Leist wrote:
> isn't createObject an other kind of creation which will look for
> workflow-manager and automaticly add the process-definition
> to my instance.
>
> Is there a problem in my understanding?

Yes.

Workflow instances are added to a content object by the workflow manager. The 
workflow manager is a event subscriber to `IObjectCreatedEvent`s. 
`createObject()` does not generate such an event and thus no workflow 
instances are added. When adding objects programmatically, you need to do 
something like:

>>> from zope.app...? import objectevent
>>> from zope.event import notify
>>> event = objectevent.ObjectCreatedEvent(object)
>>> notify(event)

> Where is other documentation or examples in python-generated
> objects and workflow.

There is no other documentation.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-dev mailing list