[Zope-CMF] Updating workflow variables from within scripts

Adam Fields fields@surgam.net
Thu, 20 Mar 2003 15:02:44 -0500


On Thu, Mar 20, 2003 at 08:11:54PM +0100, Florent Guillaume wrote:
> Yes I'd increment a variable in the transition looping back to the
> initial state. To increment a var you'd use something like (see more doc
> in doc/expressions.stx):
>    python:status.myvar + 1
> 
> (DCWorkflow.Expression.createExprContext has the full expression context
> definition if the doc is not enough.)

Thanks, I'll try that.

> > 2) When a child object completes its workflow, I'd like to have it set
> >    a flag in its parent object telling it that the content contained
> >    within is ready. So, for example, if I have an article and an
> >    image within it, I'd like for the article to know whether the image
> >    is "done" or not.
> 
> The child could provoke a given transition on the parent that changes a
> variable.

I'm not clear on the mechanism to invoke a transition in another
workflow. Can you elaborate on that some more? Do you mean something
like what happens in content_status_modify (which is the only
mechanism by which I've been able to execute a transition, other than
automatic triggers)?


-- 
				- Adam

-----
Adam Fields, Managing Partner, fields@surgam.net
Surgam, Inc. is a technology consulting firm with strong background in
delivering scalable and robust enterprise web and IT applications.
http://www.adamfields.com