@VisibleForTesting
    boolean isLazyEvaluateWorkflow(WorkflowDef workflowDef, TaskModel task) {
        if (task.isLoopOverTask()) {
            return false;
        }

        String taskRefName = task.getReferenceTaskName();
        List<WorkflowTask> workflowTasks = workflowDef.collectTasks();

        List<WorkflowTask> forkTasks =
                workflowTasks.stream()
                        .filter(t -> t.getType().equals(TaskType.FORK_JOIN.name()))
                        .collect(Collectors.toList());

        List<WorkflowTask> joinTasks =
                workflowTasks.stream()
                        .filter(t -> t.getType().equals(TaskType.JOIN.name()))
                        .collect(Collectors.toList());

        if (forkTasks.stream().anyMatch(fork -> fork.has(taskRefName))) {
            return joinTasks.stream().anyMatch(join -> join.getJoinOn().contains(taskRefName))
                    && task.getStatus().isSuccessful();
        }

        return workflowTasks.stream().noneMatch(t -> t.getTaskReferenceName().equals(taskRefName))
                && task.getStatus().isSuccessful();
    }
Determines if a workflow can be lazily evaluated, if it meets any of these criteria

<ul>
  <li>The task is NOT a loop task within DO_WHILE
  <li>The task is one of the intermediate tasks in a branch within a FORK_JOIN
  <li>The task is forked from a FORK_JOIN_DYNAMIC
</ul>

@param workflowDef The workflow definition of the workflow for which evaluation decision is
    to be made
@param task The task which is attempting to trigger the evaluation
@return true if workflow can be lazily evaluated, false otherwise
core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java