[Zope-CMF] DCWorkflow using workflow variables in guards
Luca Olivetti
luca at wetron.es
Mon Aug 18 18:48:06 EDT 2003
mvans at xs4all.nl wrote:
> hi all,
>
> Im trying to make a workflow that is able to assign an object to a person
> instead of a role. I'm trying to accomplish this by setting a workflow
> variable 'assigned' and doing checks on this variable in the guard
> conditions.
>
> I read the docs that are available. and came to the following guard
> conditions to reference the variable with python expressions.
>
> python:status_change.state.assigned == 'somename'
> This does not work.
>
> python:state.assigned == 'somename'
> this also doesn't work.
>
> Does anyone has any ideas how to accomplish this?
In the transition where you assign the assigned variable also change
ownership (by using a script) of the object to that user, then in the
guard use "Role(s)=Owner".
In order for the object to show up in the worklist for that user, you
have to add a catalog variable for "assigned" and then match that to
"%(user_id)s".
BEWARE: it's been a while I hadn't time to work on zope/cmf/plone, so
things may have changed and there could be a simpler/better way to
achieve the same result.
Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004 Fax +34 93 5883007
More information about the Zope-CMF
mailing list