Application State
Application State is the data the domain keeps as its authoritative record.
It holds the facts: what has happened and what currently holds.
A capability reads the facts it needs from the Application State, decides, and records the facts it produces back into it.
In this knowledge base, Application State and domain state name the same thing. Some pages use the informal term "domain state". Application State is the defined name.
What It Holds
The Application State holds facts.
A fact is what is true in the domain: a stored decision, a current status, a recorded event.
The Application State is the accumulated facts, independent of the form that stores them.
Shared by All Capabilities
All capabilities work on the same Application State.
It is what they share.
They do not share a mutable object model. Each capability projects the facts it needs into its own context.
A capability reaches the Application State through its own reads and writes, not through another capability.
Storage Is a Separate Decision
The term names the role, not the technology.
Relational tables can hold the facts currently true.
An event store can hold the events and derive the current facts from them.
A combination is possible.
Storage is chosen deliberately. The choice does not change what the Application State is.
Consistency
The Application State carries the mechanisms a decision relies on to stay valid when it commits.
In a relational store: transactions, row locks, and constraints.
In an event store: the conditional append defined by Command Context Consistency.
The store protects the Application State. It does not define the business meaning of the facts.
Access
An RPU reaches the Application State inside its imperative shell. It reads the facts into a context before deciding and records the consequences after.
The access path to the Application State is an Application State Provider. It supplies the facts and records the results. It does not make the decision.
Not Runtime State
Application State is not the runtime state of a process.
A session or a cache can be lost and rebuilt without the domain losing what it knows.
Application State is what the domain must not lose, because every later decision reads from it.
Summary
Application State is:
- the domain's authoritative record, held as facts
- the same thing some pages call domain state
- shared by all capabilities, and the only thing they share
- independent of how it is stored
- where a decision's consistency is protected when it commits
- not the runtime state of a process