[Zope-CMF] Idiots Guide to Workflow in CMF ?

seb bacon seb@jamkit.com
Tue, 26 Jun 2001 09:46:27 +0100

I'm sorry I don't have more time to help at the moment, but here's
some pointers that might get you started...

There's two ways of making a workflow at the moment: using the
DefaultWorkflow and the DCWorkflow.  To use the former you have to
write a python module which conforms to the workflow interface - look
in the interfaces folder in CMFCore for the interface specification,
and look at CMFDefault/DefaultWorkflow for an example.  DCWorkflow is
a new through the web version, which emphasises the State Machine
aspect of workflow.  You create states and transitions, and attach
behaviours to them using a simple set of python parameters and
function calls.

Whichever you use, the underlying concept is of a state machine, where
a transition between states results in changing the permissions on an 
object.  In the DefaultWorkflow the states are private, public, and
pending.  The transitions are retract, publish, and submit.  If you
look at updateMappingsFor in DefaultWorkflow, you'll see that
permissions get set dependent on state, following a transition.

The starting point in designing a workflow should be to write a state
machine diagram.  There's more pointers in the DCWorkflow docs.
However, it sounds to me like the DefaultWorkflow already does what
you want.  People with the Member role get to author content, people
with the Reviewer role get to review and publish content, and
anonymous users get to view only published content.

That's all for now :-) 


* Georg Hoermann <schorsch@ecology.uni-kiel.de> [010625 17:22]:
> Hello world,
> i am stuck in the complexities of the cmf: I want
> to establish a simple workflow for several items,
> several people can post/write, someone would
> check the postings and permit everyone to
> view it (give it free to the public) .
> I did a search for "workflow" on CMF, found a 
> new product (CD-Workflow) but absolutely no links to something
> like an "idiots guide to CMF workflow". If someone could
> help me I promise write it 8-).
> Thanks & Gruss
> Georg


   [] j a m k i t 
        seb bacon
T:  020 7749 7218
F:  020 7739 8683
M:  07968 301 336
W: www.jamkit.com