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 Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to