[Zope-CMF] [dev] .zexp imports and notifyWorkflowCreated

Tres Seaver tseaver at palladion.com
Wed Feb 18 12:37:50 EST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

yuppie wrote:
> 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.

+1.

- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJnEdu+gerLs4ltQ4RAoMSAKCEyP2CN5EfonXqkZSIGjLfHLqM+wCfYtEC
/pYBguVEQhbri7sVoAtbJsM=
=AwXA
-----END PGP SIGNATURE-----



More information about the Zope-CMF mailing list