'Get the latest Workflow for the StoredWorkflow identified by `id` and
encode it as a json string that can be read by the workflow editor
web interface.'

@web.json
def load_workflow(self, trans, id):

    trans.workflow_building_mode = True
    stored = self.get_stored_workflow(trans, id, check_ownership=True, check_accessible=False)
    workflow_contents_manager = workflows.WorkflowContentsManager(trans.app)
    return workflow_contents_manager.workflow_to_dict(trans, stored, style='editor')
