---
library: "bootstrap"
slug: "StateTransition"
name: "StateTransition"
ref: "StateTransition#bdc0"
hash: "sema:StateTransition#mh:SHA-256:bdc0c1988a26e15a4e90bb79b214e4bebe630bc53f758ca67c6e1148aa802686"
type: "Primitives"
layer: "Infrastructure"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/StateTransition"
---

# StateTransition

Explicit finite-state machine governance

Infrastructure · Primitives

## Mechanism

Finite State Machine. A [Transition](https://semahash.org/vocabularies/bootstrap/patterns/Transition.md) is defined as T: S x Event -> S. Only valid transitions allowed. Current [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) determines available actions.

## Invariants

- Only declared transitions are permitted; an event with no transition from the current [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) is refused, not improvised.
- The available actions are a function of the current [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) alone.

## Failure modes

- Undeclared event: an event arrives that the machine has no transition for, and a caller treats the refusal as a failure of the event rather than of the model.
- Unreachable state: a state is declared with no transition leading to it.

## Where this came from

—

## Builds on

- [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) (references)
- [Transition](https://semahash.org/vocabularies/bootstrap/patterns/Transition.md) (references)

## Used by

- [LatticeCommit](https://semahash.org/vocabularies/bootstrap/patterns/LatticeCommit.md) (references)
- [StateAudit](https://semahash.org/vocabularies/bootstrap/patterns/StateAudit.md) (references)
- [TaskLifecycle](https://semahash.org/vocabularies/bootstrap/patterns/TaskLifecycle.md) (composes_with)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: StateTransition#bdc0
- Hash: sema:StateTransition#mh:SHA-256:bdc0c1988a26e15a4e90bb79b214e4bebe630bc53f758ca67c6e1148aa802686

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/StateTransition
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/StateTransition.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
