rosemarYuan opened a new issue, #754:
URL: https://github.com/apache/flink-agents/issues/754

   ### Search before asking
   
   - [x] I searched in the 
[issues](https://github.com/apache/flink-agents/issues) and found nothing 
similar.
   
   ### Description
   
   ## Summary
   
   This umbrella issue tracks the CEL (Common Expression Language) action 
condition filtering work across the design discussion and follow-up pull 
requests. The change introduces an `EventType` constants/registry, unifies the 
`@action` / `@Action` trigger entry, and adds an `ActionRouter` that combines 
typed routing with CEL evaluation in both Java and Python.
   
   ## Design Discussion
   
   - Discussion: [Discussion] Trigger action by Event Field Values #726
   
   ## Pull Requests
   
   The work ships as a four-PR stack and must merge in order (PR1 → PR2 → PR3 → 
PR4).
   
   - EventType constants and unified trigger entry: `[api][plan][python] 
Introduce EventType constants and unify @Action / @action trigger entry` 
#TBD-PR1
   - Java CEL implementation: `[plan][runtime][java] Add CEL Action condition 
filtering` #TBD-PR2
   - Python CEL implementation: `[plan][runtime][python] Add CEL Action 
condition filtering` #TBD-PR3
   - Documentation: `[docs] Document CEL Action condition filtering` #TBD-PR4
   
   ## Current Status
   
   - All four PRs are pending (will be opened sequentially as each parent 
merges).
   
   ## Scope
   
   - Public API rename: `@Action(listenEventTypes = …)` → `@Action(…)`; 
`@action(*listen_events)` → `@action(*trigger_conditions)`
   - New `EventType` constants and runtime registry for built-in and 
user-defined event types (Java + Python)
   - CEL plan-time classifier (`PlanCelClassifier`): bare-ident → `TypeMatch`, 
otherwise → `CelExpression`
   - CEL whitelist: only the `has` macro is allowed; `exists` / `exists_one` / 
`all` / `filter` / `map` are rejected
   - AST rewriter that folds `EventType.X`, normalises type-equality aliases, 
qualifies bare identifiers under `attributes.`, and rebuilds `has` calls
   - `CelExpressionFacade` (Java) / `cel_facade` (Python) compile pipeline with 
a process-wide LRU program cache
   - `ActionRouter` two-phase routing: typed-index fast path + CEL slow path, 
deduped across the union
   - Wiring into `ActionExecutionOperator` (Java) and `LocalRunner` (Python)
   - JSON serialization: `listen_event_types` → `trigger_conditions`, with 
backward-compat fallback in both deserializers
   - Cross-language conformance fixture (`cel_conformance_cases.json`, 
`disallowed-macros.txt`) plus a CI workflow that diffs them and runs both 
evaluators
   - User documentation in `docs/content/docs/development/workflow_agent.md`
   
   ## Notes
   
   - This issue is intended as a tracking umbrella for the work split across 
discussion and the four PRs above.
   - Detailed design rationale (why CEL over alternatives, the supported 
expression subset, the macro whitelist) lives in #726 and should not be 
duplicated in each PR.
   - This is an API-breaking change: `@Action(listenEventTypes = …)` no longer 
compiles. Migration is mechanical and covered in the PR1 description and the 
migrated examples.
   
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


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