[Fix #1087] A2A implementation#1469
Draft
fjtirado wants to merge 1 commit into
Draft
Conversation
85ef704 to
baa443a
Compare
Contributor
There was a problem hiding this comment.
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-a2amodule 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/sendbehavior.
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 on lines
+75
to
+77
| case TASKS_LIST -> new ListTaskParamsDispatcher(); | ||
| case TASKS_GET -> new GetTaskParamsDispatcher(); | ||
| case TASKS_CANCEL -> new CancelTaskParamsDispatcher(); |
Collaborator
Author
There was a problem hiding this comment.
Right, I have to incorporate them
Comment on lines
+75
to
+77
| case TASKS_LIST -> new ListTaskParamsDispatcher(); | ||
| case TASKS_GET -> new GetTaskParamsDispatcher(); | ||
| case TASKS_CANCEL -> new CancelTaskParamsDispatcher(); |
Signed-off-by: fjtirado <ftirados@ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1087