Skip to content

[Fix #1087] A2A implementation#1469

Draft
fjtirado wants to merge 1 commit into
serverlessworkflow:mainfrom
fjtirado:Fix_#1087
Draft

[Fix #1087] A2A implementation#1469
fjtirado wants to merge 1 commit into
serverlessworkflow:mainfrom
fjtirado:Fix_#1087

Conversation

@fjtirado

Copy link
Copy Markdown
Collaborator

Fix #1087

@fjtirado fjtirado force-pushed the Fix_#1087 branch 9 times, most recently from 85ef704 to baa443a Compare June 22, 2026 11:36
@fjtirado fjtirado marked this pull request as ready for review June 22, 2026 11:38
Copilot AI review requested due to automatic review settings June 22, 2026 11:38

Copilot AI 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.

Pull request overview

Adds initial A2A call support to the Serverless Workflow Java implementation (Fix #1087), introducing a new impl-a2a executor module and a basic “hello world” workflow + integration test to validate end-to-end execution via a mocked A2A endpoint.

Changes:

  • Introduces new serverlessworkflow-impl-a2a module with an A2A task executor and request dispatchers (message send/stream + task operations).
  • Registers the A2A callable task builder via Java SPI so the implementation can discover the executor at runtime.
  • Adds an integration test + sample workflow to validate A2A message/send behavior.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
impl/test/src/test/resources/workflows-samples/a2a/a2a-hello-world.yaml Adds a sample workflow exercising call: a2a with message/send.
impl/test/src/test/java/io/serverlessworkflow/impl/test/A2ADefinitionTest.java Adds an integration-style test using MockWebServer to validate A2A execution.
impl/test/pom.xml Pulls in the new serverlessworkflow-impl-a2a module for tests.
impl/pom.xml Adds the new a2a module + dependency management for the A2A SDK and Gson.
impl/core/src/main/java/io/serverlessworkflow/impl/WorkflowError.java Refactors stacktrace capture into a reusable getStackTrace(...) helper.
impl/a2a/src/main/resources/META-INF/services/io.serverlessworkflow.impl.executors.CallableTaskBuilder Registers A2AExecutorBuilder via SPI.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/MessageStreamConsumer.java Implements streaming event handling for message/task updates.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/MessageSendConsumer.java Implements non-stream message/task event handling.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/MessageDispatcher.java Builds/sends A2A messages and returns a future for the workflow result.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/MessageConsumerFactory.java Centralizes consumer creation and exception handling hookup.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/MessageConsumer.java Base consumer abstraction returning a CompletableFuture<WorkflowModel>.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/ListTaskParamsDispatcher.java Implements A2A tasks/list dispatch and model conversion.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/GetTaskParamsDispatcher.java Implements A2A tasks/get dispatch and model conversion.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/CancelTaskParamsDispatcher.java Implements A2A tasks/cancel dispatch and model conversion.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/A2AUtils.java Adds parameter extraction/coercion helpers + conversions to WorkflowModel.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/A2ARequestDispatcher.java Introduces the dispatcher functional interface used by the executor.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/A2AExecutorBuilder.java Wires CallA2A tasks to dispatcher implementations and endpoint resolution.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/A2AExecutor.java Creates the A2A SDK client and executes the selected dispatcher.
impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/A2AExceptionHandler.java Maps thrown errors into WorkflowException + WorkflowError details.
impl/a2a/pom.xml Adds the Maven module definition for serverlessworkflow-impl-a2a.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread impl/a2a/src/main/java/io/serverlessworkflow/impl/executors/a2a/A2AUtils.java Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 7 comments.

Comment thread impl/test/src/test/java/io/serverlessworkflow/impl/test/A2ADefinitionTest.java Outdated
Comment on lines +75 to +77
case TASKS_LIST -> new ListTaskParamsDispatcher();
case TASKS_GET -> new GetTaskParamsDispatcher();
case TASKS_CANCEL -> new CancelTaskParamsDispatcher();

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Right, I have to incorporate them

Copilot AI review requested due to automatic review settings June 22, 2026 15:51

Copilot AI 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.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.

Comment on lines +75 to +77
case TASKS_LIST -> new ListTaskParamsDispatcher();
case TASKS_GET -> new GetTaskParamsDispatcher();
case TASKS_CANCEL -> new CancelTaskParamsDispatcher();
@fjtirado fjtirado marked this pull request as draft June 22, 2026 20:37
Signed-off-by: fjtirado <ftirados@ibm.com>
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.

Add support to a2a

2 participants