public boolean isAsyncComplete(TaskModel task) {
        if (task.getInputData().containsKey("asyncComplete")) {
            return Optional.ofNullable(task.getInputData().get("asyncComplete"))
                    .map(result -> (Boolean) result)
                    .orElse(false);
        } else {
            return Optional.ofNullable(task.getWorkflowTask())
                    .map(WorkflowTask::isAsyncComplete)
                    .orElse(false);
        }
    }
@return True to keep task in 'IN_PROGRESS' state, and 'COMPLETE' later by an external
    message.
core/src/main/java/com/netflix/conductor/core/execution/tasks/WorkflowSystemTask.java