quick search:
 

Peer to peer workflows

Submitted by: andyv
Last Edited: 2004-10-14

Category: CMF

Average rating is: 4.5 out of 5 (2 ratings)

Description:
A customer wanted a peer-to-peer workflow, i.e. instead of having a group of authors and
a group of reviewers they wanted to have one staff group all authors and reviewers. But
the reviewer has to be someone different from the author.

Thanks to Dieter Maurer who pointed me in the right direction.


Source (Text):
Set the 'Guard' in the portal_workflow to:

python: user.getUserName() != container.portal_workflow.getInfoFor(here, 'actor')

Explanation:
Simple! Note that the variable availables for guards are slightly different from the variables available for ordinary DCWorkflow scripts which threw me at first.

This expression just makes sure the presently logged in user is not the last person to have acted on the object (which will have been to submit it). The more I work with DCWorkflow the more impressed I am with it.


Comments:

No Comments