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

Gerry Kirk gerry at faithonline.com
Fri Jan 23 17:33:46 EST 2004


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




More information about the Zope-CMF mailing list