[Zope-CMF] Workflow first cut is ready

Shane Hathaway shane@digicool.com
Wed, 23 May 2001 07:45:53 -0400 (EDT)


On Wed, 23 May 2001, seb bacon wrote:

> Well, it looks great.  Really useful feedback will only come from me
> when I've had a chance to use it on a real project, but it seems
> pretty complete.  I found one bug - you forgot to supply a
> content_hide_form,

The idea is that content_hide_form would be a skin method.  It would be in
CMFDefault or a skin in DCWorkflow.

> and one query: why expose the 'state variable name'
> in the UI?  I couldn't really think of a good reason.

Just so it could be changed.  Normally it's simply "state", but to be
backward compatible with DefaultWorkflow.py it needed to be possible to
rename it to "review_state".

> Also, any chance you could explain a bit more about the triggers?

A transition can either be triggerred automatically, by a UI action, or a
wrapped workflow method.  doActionFor() indicates UI actions.  Executing
any WorkflowMethod (see WorkflowCore.py) indicates workflow methods.  In
the future I envision adding timeout triggers and external event triggers,
similar to ACS 4.

In practice, normally the ID of a transition matches either a UI action ID
or a workflow method name, which I didn't foresee.

> The one type of state which I can't see it covering is a use case
> that's been discussed before, here:  a kind of 're-editing' state.
> By this I mean a document which has been published, and the owner
> wants to change.  Really the owner should be editing a new document
> which must be resubmitted, but when published it must overwrite the
> old document.
>
> The re-edit transition would therefore create a copy, and the
> re-editing state should have the ability to display the original
> version as well as the new version.
>
> This could be acheived in the skins, with scripts in the workflow
> performing each operation.  I was just wondering if there should be
> support for calling a chain of scripts as part of a transition.
>
> So, two questions:
> Do you think the new WorkFlow could meet the above requirement without
> any changes?

I don't know.  I've been pondering that myself and I haven't found the
*right* way to fit it in.  Certainly it can be wedged in but I think
there must be some way that would fit nicely.

> Do you think transitions should have the ability to call scripts?

Yes.  I was hoping you'd ask that.  I think it should be possible to
specify a script that gets executed just before the transition occurs.  Is
that what you're looking for?

Shane