[Zope-CMF] Re: Bug when removing state in DCWorkflow
Alexander Limi
limi at plone.org
Thu Jan 5 09:39:18 EST 2006
On Thu, 05 Jan 2006 13:07:07 +0100, Florent Guillaume
<fg at nuxeo.com> wrote:
Tres Seaver 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.
This always worked in earlier versions, and has always been the way to get
people who don't know how to script CMF to modify workflows. The rule was
simple: "If you remove a state and click the Update Security button, the
objects that are in the state that no longer exists will fall back to the
initial state".
This has stopped working. Whether it was intentional or not, this
behaviour was useful, consistent, and exists in a lot of documentation out
there, even a few of the Plone books, IIRC.
Raphael Ritz wrote:
>> 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 what it used to do. It no longer does.
Florent Guillaume:
> 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.
So why did it work in earlier CMF versions? I'm curious. :)
The reason why this is so important to me is that it removes the ability
for non-developers to do any sort of meaningful change to the workflow.
Removing a state and having the objects in that state fall back to the
initial state is extremely useful - whether it was intentional or not.
--
_____________________________________________________________________
Alexander Limi · Chief Architect · Plone Solutions · Norway
Consulting · Training · Development · http://www.plonesolutions.com
_____________________________________________________________________
Plone Co-Founder · http://plone.org · Connecting Content
Plone Foundation · http://plone.org/foundation · Protecting Plone
More information about the Zope-CMF
mailing list