What is a Workflow?
A workflow is a sequential data pipeline where each step's output feeds the next step's input. Unlike sagas, workflows don't have compensation actions — they're designed for data transformation, not transactions.
Workflow vs. Saga
| Feature | Workflow | Saga |
|---|---|---|
| Purpose | Data pipeline | Transaction |
| Compensation | No | Yes |
| Data passing | Output → Input | Limited |
| On failure | Stop or skip | Rollback |
How It Works
Step 1: Fetch data → output: raw_data
Step 2: Clean data → input: raw_data, output: clean_data
Step 3: Analyze → input: clean_data, output: analysis
Step 4: Generate report → input: analysis, output: report
Creating a Workflow
naos workflow create data-pipeline
naos workflow add-step data-pipeline fetch-data
naos workflow add-step data-pipeline clean-data
naos workflow add-step data-pipeline analyze
naos workflow add-step data-pipeline report