Event-to-State Projection
Derive historical business state deterministically from an ordered event stream.
Events explain what happened. State projections transform those events into point-in-time business state for reporting and analytics.
Reporting usually needs state, not raw events.
Event streams describe business changes, but most analytical questions ask for the state that was valid at a reporting date.
A raw stream does not automatically define intervals, resolve conflicting events or explain how late-arriving events change historical state.
The projection therefore needs explicit event ordering, transition rules and temporal semantics.
A contract lifecycle is projected from creation, approval and activation events.
Compare deterministic replay with a missing transition and a late-arriving event.
Create, approve and activate events are replayed in deterministic business order, producing a stable Active state.
Every derived state interval should be explainable by one accepted event and one deterministic transition rule.
A state projection is a deterministic replay of accepted business events.
Event-to-State Projection converts discrete changes into historized intervals that answer which state was active at any point in time.
The same event stream must always produce the same state history. Raw events remain the source evidence; the projection is the reportable interpretation.
Events are discrete, while reporting state is continuous.
Business events occur at moments in time. State represents the interval between one accepted transition and the next.
Duplicate events, late ingestion, missing transitions and simultaneous timestamps make that conversion non-trivial.
Project events through explicit transition and interval rules.
ORDER BY event_time, business_priority DESC, ingestion_time, event_id
Validate replay, transitions and derived intervals.
Event-to-State Projection turns change history into reportable history.
Without a controlled projection, analytical state can depend on accidental event order or ad-hoc query logic.
With explicit replay rules, each state interval is explainable by the event that created it.
This supports point-in-time reporting, lifecycle analytics and reproducible historical reconstruction.
How Event-to-State Projection connects to other historical patterns
Event-to-State Projection bridges event history and state history. It depends on event semantics and produces the state used by downstream reporting.
Review an event-to-state projection.
Use the Historical Data Assistant to reason about event ordering, transition rules, late events and derived state intervals.
Open Historical Data Assistant →