Skip to main content

Examples

A curated set of examples that demonstrate common Zigflow patterns.

Beginner

ExampleDescriptionKey concepts
Hello WorldMinimal single-task workflowset, output.as
HTTP CallExternal HTTP requestcall: http, retries

Intermediate

ExampleDescriptionKey concepts
Error HandlingCatch errors and recovertry, catch, raise
Parallel TasksRun branches concurrentlyfork, compete
Signal-Driven WorkflowPause for an external signallisten, signal

Repository examples

The examples directory in the repository contains additional patterns:

  • basic: combined set, wait, fork and HTTP in one workflow
  • for-loop: iterating over arrays, maps and numbers
  • child-workflows: calling one workflow from another
  • query: exposing workflow state via Temporal queries
  • update: read/write handlers for running workflows
  • schedule: scheduled workflow triggers
  • money-transfer: compensating transaction logic
  • external-calls: HTTP and gRPC in a single fork