[Zope-CMF] [dev] WorkflowMethod (aka WorkflowAction)

Florent Guillaume fg at nuxeo.com
Wed Oct 22 09:31:08 EDT 2003


> In CMFDefault the WorkflowMethod machinery is broken in many ways:
> 
> 1.) Only a random selection of methods is wrapped:
> Event.edit(), File.edit(), Image.edit(), Link.edit() and 
> Document.setFormat()

One could add other methods yet.

> 2.) WorkflowMethod (=WorkflowAction) doesn't seem to work well with 
> WebDAV. There are some comments like that:
>          """
>          used to be:  editMetadata = WorkflowAction(_editMetadata)
>          Need to add check for webDAV locked resource for TTW methods.
>          """

Dunno.

> 3.) WorkflowMethod doesn't seem to work well with Interfaces:
> The wrapper modifies the interface so verifyClass doesn't work.
> 
> 4.) Some broken use cases were discussed in this thread:
> <http://mail.zope.org/pipermail/zope-cmf/2003-January/016843.html>
> 
> Is there a way to fix that machinery (and does it make sense) or could 
> we just remove the wrappers from the methods listed above?

Note that Tres provided an important use case in
  http://mail.zope.org/pipermail/zope-cmf/2003-January/017123.html
which means that the current behavior has to stay.
The wrappers are meant to provide examples, CMFDefault is an example
after all. Do they do any harm? It's very nice to get lists of 'edit'
actions in the workflow history if you have an edit action designed
for this.

On the other hand you could fix the methods that are not yet wrapped

What I'd do is add a new triggger type to DCWorkflow,
TRIGGER_WORKFLOW_METHOD_MANDATORY, a new wrapper, and a way to deal with
it from CMFCore...

In this way parametrization of the transition could be done simply from
DCWorkflow, assuming the method is wrapped.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg at nuxeo.com



More information about the Zope-CMF mailing list