public Map<String, ? extends Iterable<WorkflowDefSummary>> getWorkflowNamesAndVersions() {
        List<WorkflowDef> workflowDefs = metadataDAO.getAllWorkflowDefs();

        Map<String, TreeSet<WorkflowDefSummary>> retval = new HashMap<>();
        for (WorkflowDef def : workflowDefs) {
            String workflowName = def.getName();
            WorkflowDefSummary summary = fromWorkflowDef(def);

            retval.putIfAbsent(workflowName, new TreeSet<WorkflowDefSummary>());

            TreeSet<WorkflowDefSummary> versions = retval.get(workflowName);
            versions.add(summary);
        }

        return retval;
    }
@param event name of the event
@param activeOnly if true, returns only the active handlers
@return Returns the list of all the event handlers for a given event
core/src/main/java/com/netflix/conductor/service/MetadataServiceImpl.java