WorkflowsOverview

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

MechanismTracks progress onFan-out
SagaSingle entity (_tmp/saga_step)No
Submit chainEach entity’s own stateYes

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

PageWhat it covers
ConceptSagas vs submit chains, durability, vs Temporal
Defining SagasFull saga DSL — steps, _tmp/, preflight gates
StepsSaga transitions and submit chains
Timers & Schedulingop: schedule
Side Effectsemit, submit, schedule
Error HandlingStalls and recovery
Best PracticesWhen to use sagas vs submit
ExamplesTicket import and purchase flows

Next steps