luigidemasi commented on code in PR #24116:
URL: https://github.com/apache/camel/pull/24116#discussion_r3441862338


##########
components/camel-ai/camel-a2a/src/main/java/org/apache/camel/component/a2a/A2AConsumer.java:
##########
@@ -1208,12 +1210,20 @@ private SendMessageResponse 
processSendMessage(SendMessageRequest request, Excha
                                           + 
getEndpoint().getConfiguration().getMaxConcurrentTasks() + " concurrent tasks");
         }
         try {
+            if (createdTask) {

Review Comment:
   These changes are coupled to `a2aSubTask` for synchronous HTTP processing. 
`a2aSubTask().failIfNoTaskContext(true)` uses `A2AProgress.hasTaskContext()`, 
which requires the task id to resolve to an existing task-store entry before 
the route runs.
   
   Without creating the submitted task before `getProcessor().process()`, 
scoped progress emitted inside the route cannot reliably find an active task 
context. The failure status update and cleanup keep the task store consistent 
when route processing fails or returns a non-task response.



##########
core/camel-util/src/main/java/org/apache/camel/util/SimpleUtils.java:
##########
@@ -27,6 +27,7 @@ public class SimpleUtils {
             Arrays.asList(
                     // Generated by camel build tools - do NOT edit this list!
                     // SIMPLE-FUNCTIONS: START
+                    "a2a",

Review Comment:
   The A2A Simple function implementations were introduced earlier with 
CAMEL-23063. This PR does not add the runtime implementation of those 
functions; it exposes their metadata through `SimpleConstants` and the 
generated Simple function prefix list so catalog/tooling/LLM metadata can 
discover them.
   
   I kept it in this PR because CAMEL-23776 explicitly depends on Simple 
expressions for `emitBefore`, `emitAfter`, and `emitOnError`, and you also 
commented on the [JIRA 
issue](https://issues.apache.org/jira/browse/CAMEL-23776?focusedCommentId=18089721&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-18089721)
 that the A2A Simple functions should be documented through `SimpleConstants`.
   If you prefer to keep it on a separated change set, I can create a new jira 
issue and open a separete pull request.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to