Skip to content

[Feature] Track Action by Event Field Values work #754

@rosemarYuan

Description

@rosemarYuan

Search before asking

  • I searched in the 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

Pull Requests

The work ships as a four-PR stack and must merge in order (PR1 → PR2 → PR3 → 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_typestrigger_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 [Discussion] Trigger action by Event Field Values #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?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature[Issue Type] New features or improvements to existing features.priority/majorDefault priority of the PR or issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions