Skip to content

add asyncComplete support to sdk Task base class - #136

Open
klouds27 wants to merge 1 commit into
conductor-oss:mainfrom
klouds27:fix/task-async-complete
Open

add asyncComplete support to sdk Task base class#136
klouds27 wants to merge 1 commit into
conductor-oss:mainfrom
klouds27:fix/task-async-complete

Conversation

@klouds27

Copy link
Copy Markdown

asyncComplete exists on WorkflowTask but is not exposed through the sdk, making it impossible to define async http or event tasks without subclassing as a workaround.

adds the field to Task<T> alongside optional and startDelay, wires it through toWorkflowTask() and restores it from the WorkflowTask constructor. any task type can now call .asyncComplete(true).

asyncComplete was present on WorkflowTask but not exposed through
the sdk, making it impossible to create async http or event tasks
without subclassing as a workaround.

adds the field to Task<T> alongside optional and startDelay, wires
it through toWorkflowTask() and restores it from the WorkflowTask
constructor. any task type can now call .asyncComplete(true).

Signed-off-by: klouds27 <adalwolf@gmail.com>
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ Complexity Δ
...netflix/conductor/sdk/workflow/def/tasks/Task.java 63.44% <100.00%> (+2.07%) 23.00 <2.00> (+2.00)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@v1r3n v1r3n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The base task builder now preserves asyncComplete when converting both to and from WorkflowTask, and the added round-trip test verifies the public HTTP task path. I found no correctness, security, or test-coverage issue requiring changes.

@v1r3n

v1r3n commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@klouds27 make it ready for review when ready.

@klouds27
klouds27 marked this pull request as ready for review August 1, 2026 13:08
Copilot AI review requested due to automatic review settings August 1, 2026 13:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

The Task(WorkflowTask) constructor still drops existing base fields (startDelay, optional) when rebuilding tasks via TaskRegistry, which breaks conversion round-trips in the same code path being updated.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Exposes asyncComplete on the SDK Task<T> base class (previously only available on WorkflowTask), enabling async HTTP/event-style tasks without requiring task subclassing workarounds.

Changes:

  • Add asyncComplete state + fluent setter/getter to Task<T>.
  • Wire asyncComplete through Task.toWorkflowTask() and restore it when constructing a Task from a WorkflowTask.
  • Add a conversion test to validate Http task asyncComplete round-tripping through WorkflowTask.
File summaries
File Description
conductor-client/src/main/java/com/netflix/conductor/sdk/workflow/def/tasks/Task.java Adds asyncComplete support and maps it to/from WorkflowTask.
conductor-client/src/test/java/com/netflix/conductor/sdk/workflow/def/TaskConversionsTests.java Adds coverage to ensure asyncComplete is preserved across conversions for Http.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment on lines 69 to 75
protected Task(WorkflowTask workflowTask) {
this(workflowTask.getTaskReferenceName(), TaskType.valueOf(workflowTask.getType()));
this.input = workflowTask.getInputParameters();
this.description = workflowTask.getDescription();
this.name = workflowTask.getName();
this.asyncComplete = Boolean.TRUE.equals(workflowTask.isAsyncComplete());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants