[Zope-CMF] More DC workflow questions
Florent Guillaume
fg@nuxeo.com
Mon, 13 May 2002 18:14:32 +0000 (UTC)
John Morton <jwm@plain.co.nz> wrote:
> But I'm still confused about when it all happens, and other things related to
> workflows:
>
> - When are the so called 'automatic' transitions triggered, and in what order
> are they processed?
They are checked and triggered after an other transition has been
followed. So to start the whole process you need a manual transition or
a workflow method.
> - What are 'WorkflowMethod' trigger?
A workflow-wrapped method is a normal method that has the side effect of
executing a workflow transition (or raising Unauthorized if the guard fails).
You get one using for instance:
from Product.CMFCore.WorkflowCore import WorklflowMethod
def blah(...):
...
blah = WorkflowMethod(blah)
> - When do scripts execute? What happens if they fail and raise an exception?
That depends on the kind of script. Before- and after- transition
scripts are executed just before or after a transition is followed. The
difference between the two is that they take place before or after the
new variables, permissions... are set.
Scripts can also be called from an TAL expression in guards.
If an exception other than a ObjectMoved or ObjectDeleted exception is
raised, everything is aborted, like always.
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com