[Zope-CMF] Re: DCWorkflow question...
Shane Hathaway
shane@ZOPE.COM
Tue, 29 Apr 2003 16:08:42 -0400
Braun Brelin wrote:
> I've posted to the mailing lists but I haven't had much luck, so I figured that
> I'd drop you an e-mail to ask...
>
> I'm trying to figure out how to use DCWorkflow to only allow a reviewer to see a
> "published" document based on a specific criteria. For example, if I have a
> form that needs to be submitted to a supervisor, I only want the supervisor to
> be able to review the form, not everyone who has the 'reviewer' role or who has
> the appropriate permissions. I'm assuming that I can use the "guard" expression
> property in workflow worklists, but there's almost no documentation on how to
> make this work.
No, you shouldn't use a guard expression for this. The guard expression
controls whether the review link is visible at all. It doesn't have any
effect on which items reviewers should see.
What you need to do is construct a catalog query that matches your
criteria. Then you need to re-create that catalog query using variable
matches in the worklist definition. The worklist will use the variable
matches as catalog query criteria and show only the items that match the
criteria.
I admit this isn't very clear. That's because I really don't like the
way it works, but no one has come up with anything better.
Shane