Automatic Journaling
Automatic journaling is the foundation of Orcher's durable execution model. Every step in a workflow is recorded to PostgreSQL, enabling workflows to survive crashes and resume exactly where they left off — without re-executing completed steps.
When a workflow runs, Orcher records every step's result to two storage layers:
- Execution Log — A step-level idempotency cache keyed by
(workflow_id, step_name). Stores the result, status, and attempt count for each step. - Workflow Execution Journal — An append-only event log ordered by
event_id. Records the full history of the workflow execution as a sequence of typed entries.
On replay (after a crash, timeout, or server restart), the SDK receives the journal entries, converts them into cached results, and injects them before the workflow handler runs. Completed steps return their cached result instantly — the original code never re-executes.
Key Benefits
- Zero Data Loss — All progress is persisted to PostgreSQL
- No Repeated Steps — Completed tasks return their journaled result instead of re-running on replay; make external calls idempotent, since a task retried before it records its result can run again
- Crash Recovery — Workflows resume from the last checkpoint
Explore Journaling
How It Works
Understand journaling in action — first execution vs replay, storage layers, entry types, and the in-memory cache
Replay Safety
Learn the determinism rules, safe vs unsafe operations, how to view the journal, and practical examples
Versioning
Pin an in-flight execution to the code release that started it, and roll out new workflow code safely
Best Practices
Performance tuning, best practices for step design, and troubleshooting common journal issues