def get_workflow_actions_for(brain_or_object):
    """Returns a list with the actions (transitions) supported by the workflows
    the object pass in is bound to. Note it returns all actions, not only those
    allowed for the object based on its current state and permissions.
    """
    portal_type = api.get_portal_type(brain_or_object)
    actions = actions_by_type.get(portal_type, None)
    if actions:
        return actions

    # Retrieve the actions from the workflows this object is bound to
    actions = []
    wf_tool = api.get_tool("portal_workflow")
    for wf_id in get_workflow_ids_for(brain_or_object):
        workflow = wf_tool.getWorkflowById(wf_id)
        wf_actions = map(lambda action: action[0], workflow.transitions.items())
        actions.extend(wf_actions)

    actions = list(set(actions))
    actions_by_type[portal_type] = actions
    return actions
Returns a list with the actions (transitions) supported by the workflows
    the object pass in is bound to. Note it returns all actions, not only those
    allowed for the object based on its current state and permissions.