[Zope-CMF] How to create a transition that should only be triggeredprogrammatically?

Sune Brondum Woller sune at syntetisk.dk
Fri Jan 23 17:46:52 EST 2004



-----Original Message-----
From: Sune Brondum Woller [mailto:sune at syntetisk.dk]
Sent: 23. januar 2004 23:46
To: Gerry Kirk
Subject: RE: [Zope-CMF] How to create a transition that should only be
triggeredprogrammatically?


Hi,
You could write a script to be triggered when the originating object
changes state. 
In this script you could execute the transition you want on the second
object, like its done in content_status_modify.

Check http://www.zope.org/Members/hathawsh/DCWorkflow_docs
for info about writing a script to be triggered by a transition.

Hope this helps you,

Sune B. Woller


> -----Original Message-----
> From: zope-cmf-bounces at zope.org [mailto:zope-cmf-bounces at zope.org]On
> Behalf Of Gerry Kirk
> Sent: 23. januar 2004 23:34
> To: zope-cmf at zope.org
> Subject: [Zope-CMF] How to create a transition that should only be
> triggeredprogrammatically?
> 
> 
> Working with DCWorkflow, I want to change the state of one object when 
> the state of another changes. This state change should only happen when 
> this occurs - I don't want users to have the option of doing it.
> 
> Automatic transitions only work when object first enters a state, so 
> that is no good for me. The only other option is DCWorkflowMethod, but 
> I'm not sure how that works, nor does it seem to do what I want. Here is 
> are the definitions:
> 
>      - Automatic transitions are executed any time other workflow
>      events occur; so if a user action results in the content moving
>      to a state that has automatic transitions, they will be executed.
>      (You should use mutually exclusive guards to prevent indeterminate
>      behavior.)
> 
>      - WorkflowMethod initiate actions occur as a side effect when
>      a method of the content object with the same name as the
>      transtion, and that has been wrapped in the WorkflowMethod class
>      is called.  DCWorkflow executes the body of the method just before
>      the workflow transition.
> 
> I can do this if I allow user-initiated actions as well, so I'll do that 
> if there is no other option.
> 
> Cheers,
> Gerry
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF at zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
> 
> See http://collector.zope.org/CMF for bug reports and feature requests
> 



More information about the Zope-CMF mailing list