[Zope-CMF] Raising a WorkflowException

Dan Fairs monster at spiderplant.net
Tue Sep 7 09:30:25 EDT 2004


Hi Florent,

Thanks for responding to this.

>> According to the documentation, you can raise
>
> What documentation says that ?

That's according to The Definitive Guide to Plone (Ch 8 p232). When I
looked last, the part on DCWorkflow seemed to be based quite heavily on
"The DCWorkflow PDF" which is floating around. (Though now I look at that
PDF again, it doesn't mention it...)

>
> What do you mean by neatly ? What do you expect to happen ?

Hm - good point, actually! I guess I was expecting the exception to be
caught by DCWorkflow, the and transition to be aborted, returning the
object to the state that it was in. Maybe I'm going about this the wrong
way...

>
>> Things like state_change.ObjectMoved work fine.
>
> They work fine because some part of the code takes care to catch it and
do appropriate work. You should do the same with your exception.
>

Understood, and I see where ObjectMoved is handled in DCWorkflow.py.

Now I delve deeper (and since I'm doing this in Plone) it's probably
easiest to hook into content_status_modify. It looks to me that DCWorkflow
expects the object to ber 'ready to transition'. Which is fair enough
really :)

Thanks for your reply!

Cheers,
Dan






More information about the Zope-CMF mailing list