On 2009-03-12, Hedley Roos <[email protected]> wrote:
> I would use an event subscriber:
>
> <subscriber
> for="Products.todo.content.interfaces.ITodo
> Products.DCWorkflow.interfaces.IAfterTransitionEvent"
> handler=".events.afterTransitionTodo"
> />
>
> def afterTransitionTodo(todo, event):
> wf = getToolByName(todo, 'portal_workflow')
> new_state = wf.getInfoFor(todo, 'review_state') # xxx: the state is
> probably if the event parameter, not sure
> for obj in todo.getFolderContents(full_objects=True):
> obj.doActionFor(obj, new_state)
This is great! Thanks, Hedley (and all, for the replies).
I'm very close but hitting some annoying roadblock, any thoughts on:
- http://paste.plone.org/27262
With code:
- http://tinyurl.com/chm3f9
?
I'm starting to suspect my workflow is broken, after poking around
Module Products.DCWorkflow.DCWorkflow, line 283, in doActionFor
it raises:
raise WorkflowException(_(u'Object is in an undefined state.'))
which makes no sense to me.
> Hedley
--
Alex Clark ยท http://aclark.net
Buy Practical Plone 3: http://tinyurl.com/practical-plone
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers