Alex Clark wrote:
[..]
Strange, though, even if I pass the transition I get the same error:
Strange indeed :-(
Changing workflow state on /Plone/todo-list/do-stuff/do-this-first from
not_done to done.
'not_done' and 'done' are the ids of two states in that workflow, right?
> /srv/todo/Products/todo/events/handler.py(19)changeWorkflowStates()
-> wf.doActionFor(obj,review_state,wf_id='todo_list_workflow')
(Pdb) wf.doActionFor(obj,review_state,wf_id='todo_list_workflow')
2009-03-30 08:21:11 INFO Plone
Changing workflow state on /Plone/todo-list/do-stuff/do-this-first from not_done to done.
*** Unauthorized: You are not allowed to access 'done' in this context
(Pdb) wf.doActionFor(obj,'done',wf_id='todo_list_workflow')
*** Unauthorized: You are not allowed to access 'done' in this context
Do you also have a transition called 'done' in your workflow?
If so, maybe that's confusing the workflow tool? (just guessing)
Could it be that I don't have the right context?
As long as the context is acquisition aware or otherwise suited
to have 'getToolByName' find the tool you should be fine.
Since I'm trying to change wf state on
a child object… or because of how I acquired my wf tool maybe:
(Pdb) wf
<WorkflowTool at /Plone/portal_workflow used for /Plone/todo-list/do-stuff>
(Pdb) obj
<Todoitem at /Plone/todo-list/do-stuff/do-this-first>
Something's funny here.
Keep us posted on any further insights you may have.
Raphael
Alex
Raphael
?
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
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers