public Optional<TaskDef> getTaskDefinition() {
        return Optional.ofNullable(this.getWorkflowTask()).map(WorkflowTask::getTaskDefinition);
    }
@return {@link Optional} containing the task definition if available
common/src/main/java/com/netflix/conductor/common/metadata/tasks/Task.java