[Zope-CMF] Workflow: Two 'Pending review' entries in actions

Raphael Ritz r.ritz@biologie.hu-berlin.de
Thu, 13 Feb 2003 12:57:23 +0100

Rainer Thaden wrote:

>when there are objects in the 'pending' state i as Administrator or
>Reviewer see two 'Pending' worklists in the actions box.
>One comes out of my own workflow (i know that because of the Name,
>appearing in the box), the other one is called 'Pending review' and
>seems to come frome the default_workflow (i found the words 'Pending
>review' in the CMFDefault.DefaultWorkflow.listGlobalActions().
>The object is definitely only subjected to one workflow (i tried
>getWorkflowsFor() and it returns only my DCWorkflow instance).
>So why does the DefaultWorkflow mess with my objects.
Because each workflow in compiling its worklist queries the catalog
ONLY based on 'review_state' (per default at least). So if you use the
state name 'pending' in different workflows you will get this behavior.
Personally I consider this a bug in the design of DC Workflow since
each workflow COULD know which content types he is responsible
for but obviously doesn't care.

The dirtiest hack around would be to use different names for the
pending state in different workflows (not recommended).
More cleanly you could add a 'Guard' where in the expression you
specify the approprite content type(s) - or whatever.