Correct way to get workflow status in Plone 2.5

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.

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 :slight_smile:

2 Likes

Awesome! Thank you :slight_smile: