weiqingy commented on code in PR #977:
URL: https://github.com/apache/flink-agents/pull/977#discussion_r3788372193


##########
docs/content/docs/development/workflow_agent.md:
##########
@@ -320,14 +391,67 @@ public static void emitOutput(Event event, RunnerContext 
ctx) {
 {{< /tabs >}}
 
 {{< hint info >}}
-An `OutputEvent` is collected and emitted to the agent's downstream 
**immediately**, bypassing
-action routing, while other events (such as `ChatRequestEvent`) are routed to 
the actions that
-listen for them. Sending a `ChatRequestEvent` and an `OutputEvent` from the 
same action is valid
-API usage, but it produces both an immediate output and, once the chat 
response is handled, a
-later model-based output. For the normal chat request/response workflow, emit 
the `OutputEvent`
-from the action that handles the `ChatResponseEvent`, as shown above.
+`OutputEvent` is emitted directly downstream and bypasses action matching. 
Therefore, an
+`OutputEvent` trigger never invokes an action. Other events go through action 
matching as usual.
 {{< /hint >}}
 
+### Trigger Condition Reference
+
+#### Custom Event-Type Names
+
+A custom event type may be a bare name such as `order.created` or 
`order-created`. Each dot-separated
+segment must start with an ASCII letter or underscore and may then contain 
ASCII letters, digits,
+underscores, or hyphens. Quote a name that contains other punctuation or would 
otherwise be parsed as
+an expression, for example `'order:created'`, `'true'`, or 
`'EventType.custom'`. A quoted name matches
+the literal event-type string; it does not reference a built-in `EventType` 
constant. Quoted names
+must be non-empty and cannot contain whitespace, quotes, backslashes, or 
control characters.

Review Comment:
   In Java and Python you pass the condition as a string, so an event type that 
needs quotes ends up with two layers: `@Action("'order:created'")`. This 
paragraph shows `'order:created'` but never says the inner quotes belong in the 
string, and the example that made that clear came out in this commit. Drop a 
layer and `@Action("order:created")` looks right, but it gets read as an 
expression rather than an event type (`TriggerCondition.java:32` leaves `:` out 
of the bare-name pattern), so the plan fails to build. The YAML page still says 
it outright at `yaml.md:292`. Since this page owns the rule now, would one line 
here help? Maybe: "In Java and Python the quotes are part of the condition 
string, for example `@Action("'order:created'")`."



-- 
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