lulukuo
(Lulu Kuo)
1
Is there a correct way to get the workflow status of a page in plone 2.5?
I am trying:
t=obj._getWorkflowTool()
path = obj.absolute_url()
t.getInfoFor(path,'review_state')
but that doesn't work. This is the error:
Products.CMFCore.WorkflowCore.WorkflowException: No workflow provides "review_state" information.
jaroel
(Roel Bruggink)
2
You're passing in the path, not the object.
Try t.getInfoFor(obj,'review_state')
.
Or,
from Products.CMFCore.utils import getToolByName
wft = getToolByName(obj, 'portal_workflow')
wft.getInfoFor(obj,'review_state')
If it's a catalog brain then you can just do brain.review_state
instead
2 Likes