[Zope-CMF] DCWorkFlow Guard Expressions?

Florent Guillaume fg@nuxeo.com
Fri, 25 Oct 2002 10:53:14 +0000 (UTC)


An automatic transition is a transition that is automatically followed
after another transition, if it's allowed to (by its guard).

A guard is composed of the roles, permissions, and guard expressions.
All that are present must validate. For a role and permission,
validating means that the user has one of the roles or one of the
permissions mentionned. For a guard expression, validating means that
the expression must evaluate to true.

For your problem you don't need automatic transitions, simply complex
guard expressions (they can call python scripts).

Florent

Paul Winkler  <pw_lists@slinkp.com> wrote:
> i'm cooking up a workflow in which 
> some states may be triggered by a combination of factors,
> e.g. "if foo is true and bar is 
> false we are in state A, but if foo and bar
> are both true we are in state B."
> foo and/or bar may be the state of something
> outside the control of the user,
> or even outside the entire CMF instance.
> 
> I suspect this is what Automatic transitions
> are for, but how does an automatic transition
> get triggered? That's what the guard expression
> is, right?  But how do you write a guard expression?
> I don't see any docs about it - 
> the PDF at 
> http://www.zope.org/Members/hathawsh/DCWorkflow_docs/
> doesn't say, neither does anything in the wikis
> that I can find.
> 
> Alternatively, anybody have examples of DCWorkFlow 
> automatic transitions with Guard Expressions that 
> I can look at? the CMFDefault example workflows 
> don't have any, and I can't seem
> to find anything in the PDF docs except basically
> "you can have guard expressions". OK, but I don't
> know what kind of expressions, or what triggers
> a test of the expression, or anything.
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com