[Zope-CMF] More DCworkflow troubles.

John Morton jwm@plain.co.nz
Tue, 11 Jun 2002 19:20:19 +1200


I've built a couple of workflows for a site I'm developing and I've run into 
some grief with permissions and workflow actions in the more complex of the 
two. Here's a rundown:

complexObjectWorkflow is your basic private/pending/visible publishing cycle.  
Transitions are projected by role, with the Editor role replacing Reviewer, 
but still having the equivalent permissions (more about that below). At 
'visible', the Owner loses edit permissions, and there is a single 'pending' 
worklist that's accessable to both Owner and Editor roles.

simpleObjectWorkflow is a more complex workflow intended to allow members with 
certain roles to circumvent the usual 'pending' state and publish straight to 
visible, however, it allows the Editor to move those items to 'rejected' if 
there is a problem with them. There are two worklists for this one, one for 
'pending' items and another for 'rejected' items.

(I've used the role 'Editor', rather than 'Reviewer' as I eventually want to 
use several different editor roles for different types of content and assign 
them to different members, and I wanted to be sure there was nothing 
'magical' about the Review role name.)

I've tested the first workflow, and it did exactly what I expected it to do - 
in particular, the editor role could see 'view' actions at all times, it's 
workflow actions behaved themselves, and the 'Pending review' worklist showed 
up for the Owner and Editor at the expected times and with the right number 
beside it. 

Unfortunately, the same isn't true for simpleObjectWorkflow. Pending and 
rejected worklist actions never show up for the Owner, in spite of the fact 
that the worklist settings are equivalent to the ones used in the first 
workflow. When the content is moved to pending by the Owner, the Editor 
doesn't see a 'view' action for some reason (I was testing against a 
different content type, I admit) and while the 'reject' action shows up, it's 
URL is missing the content_reject_form part, and when access the form 
directly and submit it, I get a traceback complaining that the 'reject' state 
doesn't exist in the workflow. 

So what am I missing here? _Is_ there something magical about Reviewer? Is 
there some obvious permission I'm not managing properly?

Some details:

 - Zope 2.4.2
 - CMF checked out from CVS head on June 4
 - I used Document as the content for the first workflow, and both Link and 
 News Item for the second.
 - I'm managing 'Access content information', 'Modify Portal Content' and 
 'View' with the state permissions.

Any help is greatly appreciated,
John