[Zope-CMF] DCWorkflow Problem

John Morton jwm@plain.co.nz
Thu, 4 Jul 2002 11:59:11 +1200


On Wed, 03 Jul 2002 23:12, Ashish Gautam wrote:
> I have DCWorkflow installed on my PC.
> I have used its default_workflow (Web-configurable workflow [Classic]) and
> it is working perfectly.
> This Classic is in-built in it.
> Now i am trying to define my own workflow by using "dc_workflow
> (Web-configurable workflow)" option.
> In this I am trying to exactly copy the work flow as it is Classic one.
> But i am receiving following error :
> Error Type: WorkflowException
> Error Value: No workflow provides "review_state" information.

This is one of the gotcha's when using an empty dcworkflow as a starting 
point for building your own new workflows - it sets the state variable to 
'state', by default, but the classic and revision 2 workflows use 
'review_state', and there are a few things that depend on it, I think. At the 
very least, you should set up a field index in the catalog for every state 
variable name you want to use.

> I have defined a worklist,and inside this worklist i have written following
> value for URL(formatted) : %(portal_url)s/search?review_state=pending
> I have copied this value as it is from Classic.So ,the error above might be
> related to this.

It is - you'll need to use the name of the state variable you're using for 
this workflow to find items set to a given state :-)

> My intention is to exactly copy Classic and then learn from it.

In that case you'll want to go to the variables tab, and at the bottom, set 
the state varaible to 'review_state'. It says 'Be careful!' next to it, 
because if you reset the name of the varaible that stores the state on a 
workflow used by existing content, they'll all loose state and revert to the 
initial state (but sometime in the future I might patch this to migrate the 
state from the old name to the new, if I can figure out how to). 

Of course, you can just select the 'dcworkflow (Classic)' option when 
creating a new workflow, which is exactly the same as the built in one, and 
look at that :-)

John