Workflows Overview
Causet handles multi-step processes through sagas (state machines on one entity) and submit chains (op: submit across entities). Both are event-driven and fully functional today — no separate orchestration runtime.
This section replaces the former standalone Sagas docs — sagas are one workflow mechanism, not a separate product surface.
Using Causet with an existing app? Start with Retrofit an Existing App to learn how to move an API route from inline synchronous work to an async workflow. If your workflow depends on third-party callbacks, see Use Webhooks to Update Existing Flows.
Two workflow mechanisms
| Mechanism | Tracks progress on | Fan-out |
|---|---|---|
| Saga | Single entity (_tmp/saga_step) | No |
| Submit chain | Each entity’s own state | Yes |
Declaring sagas
# app.causet
includes:
sagas: [./sagas/**/*.sagas.causet]sagas:
ticket_import_flow:
state: ticket_import
state_path: _tmp/import_saga
steps:
- name: idle
set: { step: 0 }
- name: parsing
on: TICKET_PARSE_STARTED
set: { step: 1 }In this section
| Page | What it covers |
|---|---|
| Concept | Sagas vs submit chains, durability, vs Temporal |
| Defining Sagas | Full saga DSL — steps, _tmp/, preflight gates |
| Steps | Saga transitions and submit chains |
| Timers & Scheduling | op: schedule |
| Side Effects | emit, submit, schedule |
| Error Handling | Stalls and recovery |
| Best Practices | When to use sagas vs submit |
| Examples | Ticket import and purchase flows |
Next steps
- Defining Sagas — DSL reference
- Ticket Import Example — end-to-end walkthrough
- Intents — Rules — where
submitandemitlive