[Zope-CMF] Re: Bug when removing state in DCWorkflow

Florent Guillaume fg at nuxeo.com
Thu Jan 5 07:07:07 EST 2006


Raphael Ritz wrote:
>> Objects which have a no-longer-sane review_state have *never* had
>> reasonable behavior:  the workflow engine *can't* compute what to do
>> with them.  They have no transitions (which is why the workflow actions
>> are gone), and they can't be fixed by the "Update Security" button,
>> because there *is no state* to whose permission map they can be 
>> conformed.
>>
>> With respect, this is a "Doctor! Doctor!" problem, to which the
>> appropriate response is "Take the spoon out of the glass before
>> drinking" (i.e., write the simple script which repairs the broken
>> instances *before* deleting the state).
> 
> 
> Not really following the topic, so this might be too naive, sorry:
> 
> Falling back to the workflow's initial state (like it's
> done on imports and when changing the workflow assigned
> to a type) in such cases wouldn't be an option?

That's been the intent of the code all along: when you query the workflow 
tool and ask it for the state of an object, this is passed along to 
DCWorkflow, and if the object doesn't have a state anymore the initial state 
is returned.

However if you remove a valid state, nothing queries and recatalogs all the 
objects, so they still have an old review_state in the catalog.

"Update security settings" is for a different use case, I'm not sure it 
should be retrofitted into doing this.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the Zope-CMF mailing list