[Zope-CMF] Re: [Plone-users] DCWorkflow "cheat" question
Tres Seaver
tseaver at zope.com
Fri Aug 20 17:33:18 EDT 2004
Dmitry S. Makovey wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On August 17, 2004 12:47 pm, Dieter Maurer wrote:
>
>>You can cheat with the "{get|set}StatusOf" WorkflowTool methods.
>>Note that cheating is potentially dangerous.
>
>
> those are "private" anyway -no cheating :)
>
>
>>>Or any other alternatives with the same functionality?
>>
>>I use automatic transitions for a similar purpose.
>
>
> Thanks for suggestion it did work for me although automatic transition are
> kind of strange in a way that those are not "executed as soon as guardian
> conditions met" but "executed right after another workflow transition
> finished and if guardian conditions set" unless I'm missing something I had
> to adjust to that model rather than just modify part of an object and have
> transition activated automaticaly :(
Right; the workflow system is "reactive", and needs to be notified that
an object might need to transit. E.g., imagine the case where your
guard condition for the "expire" transition is "object.expired() <
ZopeTime()". Unless you trigger the workflow mechanism, the transition
won't occur.
You could also arrange to trigger workflow transitions during your
"edit" handling scripts; this is what the old, now-deprecated
WorkflowMethod wrapper did.
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope-CMF
mailing list