review_state set to initial state rather than current state

Allen Thomerson athomerson at
Sun Oct 21 22:42:26 UTC 2007

I am running Plone 2.5.3 on Zope 2.9.7 with membrane 1.0
In the code snippet below I am trying to restrict the list of members to
only those who are in the active state, but when I run it the initial state
of all the members is returned rather than the current state.  I traced
through with the debugger and workflow is looking for the 'workflow_history'
which it doesn't find and sets the return value to the initial state.  I
think it may have something to do with where I am storing members (in the
Members folder rather than acl_users), but I don't know where to go from

    def getMembers(self):
        "caseless sorted list of [(memberId, fullname)]"
        mtool = getToolByName(self, 'portal_membership')
        mb = getToolByName(self, 'membrane_tool')
        wf = getToolByName(self, 'portal_workflow')
        wfmapper = ICategoryMapper(mb)
        decorated = []
        for member in members:
            memberId = member.getMemberId()
            fullname = member.getProperty('fullname', '')
            reviewState = wf.getInfoFor(member, 'review_state',
            categories = generateCategorySetIdForType('MyMember')
            if wfmapper.isInCategory(categories, ACTIVE_STATUS_CATEGORY,
                decorated.append( (memberId, fullname))
        return DisplayList(decorated)

View this message in context:
Sent from the Product Developers mailing list archive at

More information about the Product-Developers mailing list