[Zope-CMF] substates in CMFWorkflow

Tres Seaver tseaver@zope.com
25 Aug 2002 12:02:56 -0400


On Sat, 2002-08-24 at 15:07, Robert Rottermann wrote:
> I need a workflow where a document must be approved by three people. If any
> of them rejects, the transition is not possible, and the state should change
> to rejected.
> Could anybody provide me with such an example.

Using DCWorkflow:

 - Start with a "classic" workflow.

 - Add a variable, "approvals_required", to the workflow.

 - Bind a script to the "after" slot for the "submit" transition; have
   this script set the value to the list of user IDs who must approve
   the content.

 - Have the "approve" transition (rename it from "publish") remove the
   current user from the list, but return to the "pending" state.

 - Add an automatic transition from "pending" state to "published", with
   a guard condition "not: approvals_required".

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com