Files
git.stella-ops.org/docs/workflow/tutorials/01-hello-world
master a6ffb38ecf Update module architecture docs and workflow tutorials
- Module dossiers: attestor, authority, cli, graph, scanner
- Policy assistant parameters guide
- UI v2-rewire navigation rendering policy
- Test suite overview update
- Workflow engine requirements and tutorial series (01-08)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 17:25:37 +03:00
..

Tutorial 1: Hello World

The simplest possible workflow: initialize state from a start request, activate a single human task, and complete the workflow when the task is done.

Concepts Introduced

  • IDeclarativeWorkflow<T> — the contract every workflow implements
  • WorkflowSpec.For<T>() — the builder entry point
  • .InitializeState() — transforms the start request into workflow state
  • .StartWith(task) — sets the first task to activate
  • WorkflowHumanTask.For<T>() — defines a human task
  • .OnComplete(flow => flow.Complete()) — terminal step

What Happens at Runtime

  1. Client calls StartWorkflowAsync with WorkflowName = "Greeting" and payload { "customerName": "John" }
  2. State initializes to { "customerName": "John" }
  3. Task "Greet Customer" is created with status "Pending"
  4. A user assigns the task to themselves, then completes it
  5. OnComplete executes .Complete() — the workflow finishes

Variants

Next

Tutorial 2: Service Tasks — call external services before or after human tasks.