public List<WorkflowTask> collectTasks() {
        List<WorkflowTask> tasks = new LinkedList<>();
        for (WorkflowTask workflowTask : this.tasks) {
            tasks.addAll(workflowTask.collectTasks());
        }
        return tasks;
    }
@param variables the set of global workflow variables to set
common/src/main/java/com/netflix/conductor/common/metadata/workflow/WorkflowDef.java