Event-Sourced Architecture
Every state change is recorded as an immutable event, enabling replay and audit.
Event-Sourced Architecture
Every state change is recorded as an immutable event, enabling replay and audit.
Every state change in your workflow is recorded as an immutable event:
export default defineWorkflow('document approval', async (flow) => { // Each action is recorded as an event await flow.do('submit document', async () => { await submitDocument(flow.params); // Event: DocumentSubmitted });
// State changes are derived from events await flow.do('request approval', async () => { await requestApproval(flow.params); // Event: ApprovalRequested });
// Events can be replayed to reconstruct state await flow.do('process approval', async () => { await processApproval(flow.params); // Event: ApprovalProcessed });});Key Benefits:
This foundational pattern ensures that IdentityFlow workflows are transparent, traceable, and resilient.
Learn more about advanced concepts in our Deep Dive section.