temporalio/temporal
Workflow execution
A workflow execution is one durable run of a workflow definition, identified by (NamespaceID, WorkflowID, RunID).
| Aspect | Detail |
|---|---|
| Identity | (NamespaceID, WorkflowID, RunID). WorkflowID is user-supplied; RunID is a UUID. |
| Owner | Exactly one History shard at a time, picked by hash(NamespaceID, WorkflowID) mod NumShards. |
| State sources | Workflow History Events (append-only), Mutable State (summary), History Tasks (work to do). |
| Durability | Every state transition is committed atomically across the three above. |
| Lifecycle | Created → Running → one of {Completed, Failed, Cancelled, Terminated, ContinuedAsNew}. |
| Reuse | WorkflowID can be reused after the previous execution closes (subject to reuse policy). |
Code references
- Mutable State implementation:
service/history/workflow/mutable_state_impl.go. - Public API surface:
temporal.api.workflowservice.v1.WorkflowService. - History RPC handler:
service/history/handler.go. - Reset logic:
service/history/workflow_rebuilder.go. - Lifecycle diagrams:
docs/architecture/workflow-lifecycle.md.
Where to read more
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.