Skip to content

Add Java SDK interface-design ADRs for mixed-lang and native Dags - #72019

Open
jason810496 wants to merge 2 commits into
apache:mainfrom
jason810496:docs/java-sdk/adr-interface-design
Open

Add Java SDK interface-design ADRs for mixed-lang and native Dags#72019
jason810496 wants to merge 2 commits into
apache:mainfrom
jason810496:docs/java-sdk/adr-interface-design

Conversation

@jason810496

Copy link
Copy Markdown
Member

Write the design for TaskFlow and native Dag for the Java-SDK up front, to settle the design early and surface as much context as possible for reviewers on the actual implementation PRs.


Was generative AI tooling used to co-author this PR?

@jason810496
jason810496 requested a review from uranusjr as a code owner August 24, 2026 07:45
@jason810496 jason810496 self-assigned this Aug 24, 2026
@jason810496 jason810496 added this to the Java SDK 1.0 GA milestone Aug 24, 2026
Comment on lines +90 to +101
### 4. Interface based with `TaskArgs` getter

```java
public static class Transform implements InputTask<TaskArgs> {
public void execute(@NotNull Context context, Client client, TaskArgs args) {
var extracted = args.require(0, Long.class);
var threshold = args.get(1, Double.class); // null when it resolves to nothing
log.log(INFO, "Got extracted value from the bound argument: {0}", extracted);
// ...
}
}
```

@jason810496 jason810496 Aug 24, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Remove TaskArgs.

Support context.arg_bindings instead of TaskArgs and provide example of pulling XCom via client with arg_bindings.

e.g.

arguments = []
for arg in context.arg_bindings:
     if arg.type == XCom:
          arguments.append(client.getXCom(arg.taskId));
     else:
          arguments.append(arg.value)

@jason810496 jason810496 added the type:doc-only Changelog: Doc Only label Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant