private void repairSubWorkflowTask(TaskModel task, WorkflowModel subWorkflow) {
        switch (subWorkflow.getStatus()) {
            case COMPLETED:
                task.setStatus(TaskModel.Status.COMPLETED);
                break;
            case FAILED:
                task.setStatus(TaskModel.Status.FAILED);
                break;
            case TERMINATED:
                task.setStatus(TaskModel.Status.CANCELED);
                break;
            case TIMED_OUT:
                task.setStatus(TaskModel.Status.TIMED_OUT);
                break;
        }
        task.addOutput(subWorkflow.getOutput());
        executionDAO.updateTask(task);
    }
Verify if ExecutionDAO and QueueDAO agree for the provided task.

@param task the task to be repaired
@return true - if the task was queued for repair
core/src/main/java/com/netflix/conductor/core/reconciliation/WorkflowRepairService.java