[Zope-CMF] Worklist Question

John Morton jwm@plain.co.nz
Thu, 8 Aug 2002 15:12:10 +1200


On Thu, 08 Aug 2002 02:13, Rease Nash wrote:
> Hello Everyone:
>
> I have a question concerning a Workflow Worklist.
>
> I am trying to add a worklist which will display in the action box how
> many documents a user currently has in the private state (much like the
> worklist that shows a reviewer how many pending documents they have).  I
> think that I am having a problem with the guards.
>
> When I set the Guard to "role: Member", I get the display in the action
> box, but it shows the number of private documents in the whole site, not
> just the number of that member's private documents.
>
>  When I set the guard to "role: Owner" (logic being that all members are
> the owner of their own documents), nothing shows up in the action box at
> all.
>
> Anyone have any suggestions?

Worklists are set as global actions by default, and global actions are 
evaluated in the context of the site root, and as your members don't have
the owner local role on the site root, it just doesn't work.

You could try to switch the worklist's action box category to 'workflow' and 
use the owner permission as a guard, but I'm not certain if that will work 
properly everywhere. 

Usually it's better to rely on the catalog to filter search results based on
the users roles - so if you just dropped all the guards, anyone can see
private content if they have permission to. Unfortunately, if reviewers have 
view permission on private content, they'll get a worklist action listing all 
private content on the system!

The best solution is to grab the latest CVS of DCWorkflow, and use the new 
formatted catalog query syntax as Dieter and Florent describe in other 
postings. And you get some help files that explain this stuff in more detail.

John