Previously Thomas Dingeldey wrote:
> Hi,
> I have a question about the transitions of a workflow.
> In ZMI you could choose the option automatic in a transition. Does the option 
> only remove the action if you call "atool.listFilteredActionsFor(item)" or is 
> it intended to do some more?
> We start a process with a workflow which runs a long time, if the process 
> starts, we move the object into another state with a transition:
> wf = getToolByName(self.context, 'portal_workflow')
> wf.doActionFor(self.context, 'send', comment='send')
> If the process is finished we like to move the object automatically into 
> another state. Provides the workflow functions which assists this?


   # Trigger any automatic transitions, or else just make sure the role 
mappings are right
   auto_transition = new_wf._findAutomaticTransition(obj, 
   if auto_transition is not None:
       new_wf._changeStateOf(obj, auto_transition)

new_wf is the workflow used for this object. You can grab that from the workflow
chain configured for the object. You should probably make sure to do this for
every workflow in the chain to make support you handle objects with multiple
workflows correctly.


Wichert Akkerman <>    It is simple to make things.                   It is hard to make things simple.
Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to