'Displays a collection of workflows.
:param  show_published:      if True, show also published workflows
:type   show_published:      boolean
:param  missing_tools:       if True, include a list of missing tools per workflow
:type   missing_tools:       boolean'

def get_workflows_list(self, trans, kwd):

    show_published = util.string_as_bool(kwd.get('show_published', 'False'))
    missing_tools = util.string_as_bool(kwd.get('missing_tools', 'False'))
    rval = []
    filter1 = (trans.app.model.StoredWorkflow.user == trans.user)
    user = trans.get_user()
    if show_published:
        filter1 = or_(filter1, (trans.app.model.StoredWorkflow.published == true()))
    for wf in trans.sa_session.query(trans.app.model.StoredWorkflow).filter(filter1, (trans.app.model.StoredWorkflow.table.c.deleted == false())).order_by(desc(trans.app.model.StoredWorkflow.table.c.update_time)).all():
        item = wf.to_dict(value_mapper={'id': trans.security.encode_id})
        encoded_id = trans.security.encode_id(wf.id)
        item['url'] = url_for('workflow', id=encoded_id)
        item['owner'] = wf.user.username
        item['number_of_steps'] = len(wf.latest_workflow.steps)
        item['show_in_tool_panel'] = False
        for x in user.stored_workflow_menu_entries:
            if (x.stored_workflow_id == wf.id):
                item['show_in_tool_panel'] = True
                break
        rval.append(item)
    for wf_sa in trans.sa_session.query(trans.app.model.StoredWorkflowUserShareAssociation).filter_by(user=trans.user).join('stored_workflow').filter((trans.app.model.StoredWorkflow.deleted == false())).order_by(desc(trans.app.model.StoredWorkflow.update_time)).all():
        item = wf_sa.stored_workflow.to_dict(value_mapper={'id': trans.security.encode_id})
        encoded_id = trans.security.encode_id(wf_sa.stored_workflow.id)
        item['url'] = url_for('workflow', id=encoded_id)
        item['slug'] = wf_sa.stored_workflow.slug
        item['owner'] = wf_sa.stored_workflow.user.username
        item['number_of_steps'] = len(wf_sa.stored_workflow.latest_workflow.steps)
        item['show_in_tool_panel'] = False
        for x in user.stored_workflow_menu_entries:
            if (x.stored_workflow_id == wf_sa.id):
                item['show_in_tool_panel'] = True
                break
        rval.append(item)
    if missing_tools:
        workflows_missing_tools = []
        workflows = []
        workflows_by_toolshed = dict()
        for (key, value) in enumerate(rval):
            tool_ids = []
            workflow_details = self.workflow_contents_manager.workflow_to_dict(trans, self.__get_stored_workflow(trans, value['id']), style='instance')
            if ('steps' in workflow_details):
                for step in workflow_details['steps']:
                    tool_id = workflow_details['steps'][step]['tool_id']
                    if ((tool_id not in tool_ids) and self.app.toolbox.is_missing_shed_tool(tool_id)):
                        tool_ids.append(tool_id)
            if (len(tool_ids) > 0):
                value['missing_tools'] = tool_ids
                workflows_missing_tools.append(value)
        for workflow in workflows_missing_tools:
            for tool_id in workflow['missing_tools']:
                (toolshed, _, owner, name, tool, version) = tool_id.split('/')
                shed_url = self.__get_full_shed_url(toolshed)
                repo_identifier = '/'.join([toolshed, owner, name])
                if (repo_identifier not in workflows_by_toolshed):
                    workflows_by_toolshed[repo_identifier] = dict(shed=shed_url.rstrip('/'), repository=name, owner=owner, tools=[tool_id], workflows=[workflow['name']])
                else:
                    if (tool_id not in workflows_by_toolshed[repo_identifier]['tools']):
                        workflows_by_toolshed[repo_identifier]['tools'].append(tool_id)
                    if (workflow['name'] not in workflows_by_toolshed[repo_identifier]['workflows']):
                        workflows_by_toolshed[repo_identifier]['workflows'].append(workflow['name'])
        for repo_tag in workflows_by_toolshed:
            workflows.append(workflows_by_toolshed[repo_tag])
        return workflows
    return rval
