public TaskModel getTask(String taskId) {
        return Optional.ofNullable(executionDAOFacade.getTaskModel(taskId))
                .map(
                        task -> {
                            if (task.getWorkflowTask() != null) {
                                return metadataMapperService.populateTaskWithDefinition(task);
                            }
                            return task;
                        })
                .orElse(null);
    }
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