diff --git a/common/src/main/java/com/netflix/conductor/common/metadata/tasks/Task.java b/common/src/main/java/com/netflix/conductor/common/metadata/tasks/Task.java index f51016340..fa8ed1906 100644 --- a/common/src/main/java/com/netflix/conductor/common/metadata/tasks/Task.java +++ b/common/src/main/java/com/netflix/conductor/common/metadata/tasks/Task.java @@ -24,6 +24,7 @@ import com.netflix.conductor.annotations.protogen.ProtoMessage; import com.netflix.conductor.common.metadata.workflow.WorkflowTask; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.google.protobuf.Any; import io.swagger.v3.oas.annotations.Hidden; @@ -629,6 +630,7 @@ public void setOutputMessage(Any outputMessage) { /** * @return {@link Optional} containing the task definition if available */ + @JsonIgnore public Optional getTaskDefinition() { return Optional.ofNullable(this.getWorkflowTask()).map(WorkflowTask::getTaskDefinition); } diff --git a/core/src/main/java/com/netflix/conductor/model/TaskModel.java b/core/src/main/java/com/netflix/conductor/model/TaskModel.java index 617b013da..62891ada3 100644 --- a/core/src/main/java/com/netflix/conductor/model/TaskModel.java +++ b/core/src/main/java/com/netflix/conductor/model/TaskModel.java @@ -571,6 +571,7 @@ public void incrementPollCount() { /** * @return {@link Optional} containing the task definition if available */ + @JsonIgnore public Optional getTaskDefinition() { return Optional.ofNullable(this.getWorkflowTask()).map(WorkflowTask::getTaskDefinition); }