public DeciderOutcome decide(WorkflowModel workflow) throws TerminateWorkflowException {

        // In case of a new workflow the list of tasks will be empty.
        final List<TaskModel> tasks = workflow.getTasks();
        // Filter the list of tasks and include only tasks that are not executed,
        // not marked to be skipped and not ready for rerun.
        // For a new workflow, the list of unprocessedTasks will be empty
        List<TaskModel> unprocessedTasks =
                tasks.stream()
                        .filter(t -> !t.getStatus().equals(SKIPPED) && !t.isExecuted())
                        .collect(Collectors.toList());

        List<TaskModel> tasksToBeScheduled = new LinkedList<>();
        if (unprocessedTasks.isEmpty()) {
            // this is the flow that the new workflow will go through
            tasksToBeScheduled = startWorkflow(workflow);
            if (tasksToBeScheduled == null) {
                tasksToBeScheduled = new LinkedList<>();
            }
        }
        return decide(workflow, tasksToBeScheduled);
    }
Decider evaluates the state of the workflow by inspecting the current state along with the
blueprint. The result of the evaluation is either to schedule further tasks, complete/fail the
workflow or do nothing.
core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java