[Zope-CMF] Wokflow and roles question

John Morton jwm@plain.co.nz
Fri, 19 Jul 2002 18:00:44 +1200


On Fri, 19 Jul 2002 10:26, Pawel Lewicki wrote:
> Hallo,
>
> I have a problem with my workflow design. The issue is to distribute the
> objects among users with a specific role. I want them to know that there
> are some new elements to check (like Pending(3) for reviewers). Is there
> any way to set the state of the object separately for each user or I have
> to create the instances for all? In that case each should have some kind of
> repository - but then all play with workflow is not necessary - I would
> just check the specific folder. I want to create the instance (copy) only
> for those users who are interested. Any suggestions?

The latest CVS version of DCWorkflow alters the worklists to allow you to 
specify more complex catalog queries, and the example in the docs directory
talked about substitution in the user name, so that might be what you need - 
set the worklist for 'pending' or whatever to use the pending state and the 
user name, and do the same for the search page that the worklist action links 
to.

(Warning: I upgraded from 0.4.2 to this CVS version and it broke the 
worklists in my existing workflows. I don't know if there is a more recent 
patch.)

> And I would be glad to know the opinion about my solution about roles
> management. The issue is to have dynamic roles depending on the office
> structure. I made the simple mechanism to create/delete roles and set/unset
> those to specific users. Everything is based on local roles of the root
> folder of the portal. I wonder how to separate them from unchangeable roles
> like a member. For now I just remove it from list of roles to add/delete.
> Any suggestions?

You could set the roles that you don't want changed down a layer at the root
of the ZODB, and then only select roles that are locally defined in the site 
root, rather than inherited, but you'll (probably) have to delete and recreate
the Member and Reviewer roles by hand. I think you'll find that just setting 
a property on the site root that lists your 'mutable roles' is a lot easier.

John