public List<Workflow> getPendingWorkflowsByName(String workflowName, int version) {
        return executionDAO.getPendingWorkflowsByType(workflowName, version).stream()
                .map(WorkflowModel::toWorkflow)
                .collect(Collectors.toList());
    }
Retrieve all workflow executions with the given correlationId and workflow type Uses the
{@link IndexDAO} to search across workflows if the {@link ExecutionDAO} cannot perform
searches across workflows.

@param workflowName, workflow type to be queried
@param correlationId the correlation id to be queried
@param includeTasks if true, fetches the {@link Task} data within the workflows
@return the list of {@link Workflow} executions matching the correlationId
core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java