Skip to main content

Module selector

Module selector 

Source
Expand description

Server-side workflow-type/status selector filtering. Server-side selector filtering for filtered subscriptions.

FilteredSubscription advertises optional workflow_type and status selectors. The engine’s EventFilter has no type or status dimension, so the selection runs at the socket seam, after the namespace gate proved ownership and resolved the workflow’s recorded type from the same durable read.

Selector semantics (documented in docs/API.md):

  • workflow_type matches when the event’s workflow has that recorded type at the time the namespace gate resolved it: the initial durable read returns the head-of-history WorkflowStarted type at read time, which on a continue-as-new chain can briefly run ahead of an older delivered event (a one-event-loop forward-skew window) until the stream’s own WorkflowStarted refresh self-heals the cached type. A workflow whose history records no started run never matches a type selector.
  • status matches per event kind: each terminal lifecycle event matches exactly its projected status (WorkflowCompletedCompleted, WorkflowFailedFailed, WorkflowCancelledCancelled, WorkflowTimedOutTimedOut, WorkflowContinuedAsNewContinuedAsNew); every non-terminal event — including WorkflowStarted — matches Running.
  • When both selectors are present they AND together.

Structs§

SubscriptionSelector
Validated subscription selectors applied before frame encoding.