Files
git.stella-ops.org/docs/workflow/tutorials/02-service-tasks/README.md
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

1.1 KiB

Tutorial 2: Service Tasks

Call external services (microservices, HTTP APIs, GraphQL, RabbitMQ) from within a workflow. Handle failures and timeouts gracefully.

Concepts Introduced

  • .Call() — invoke a transport with payload and optional response capture
  • Address types — LegacyRabbit, Microservice, Http, Graphql, Rabbit
  • resultKey — store the service response in workflow state
  • whenFailure / whenTimeout — recovery branches
  • WorkflowHandledBranchAction.Complete — shorthand for "complete on error"
  • timeoutSeconds — per-step timeout override (default: 1 hour)

Key Points

  • Each Call step executes synchronously within the workflow
  • The per-step timeout wraps the entire call including transport-level retries
  • Transport timeouts (30s default) control individual attempt duration
  • If no failure/timeout handler is defined, the error propagates and the signal pump retries

Variants

Next

Tutorial 3: Decisions — branch workflow logic based on conditions.