[Zope-CMF] [dev] .zexp imports and notifyWorkflowCreated
y.2009 at wcm-solutions.de
Wed Feb 18 07:04:50 EST 2009
Moving the notifyWorkflowCreated call from _finishConstruction to the
IObjectAddedEvent subscriber changed the behavior of .zexp imports: The
workflow state is now always reset to the initial state. AFAICT that's
no useful behavior for imports.
This is caused by the fact that the notifyCreated method of WorkflowTool
always resets the workflow states.
Is that a feature or a bug of notifyCreated? Is anybody using
notifyCreated for resetting workflow states?
Where is the best place to fix this? Should IObjectAddedEvent be
triggered on imports? Should the subscriber call notifyWorkflowCreated
if the object already has a workflow history? Should
notifyWorkflowCreated call WorkflowTool.notifyCreated if the object
already has a workflow history? Should WorkflowTool.notifyCreated call
notifyCreated of workflows that already have a state? Should
notifyCreated of workflows keep existing states untouched?
AFAICS the easiest way to fix this is changing
WorkflowTool.notifyCreated, making sure it only calls notifyCreated for
workflows without a state in the workflow history.
Any objections or better ideas?
More information about the Zope-CMF