Skip to content

Cookbook

Use this cookbook when you want a working orchestration pattern instead of a reference description: microservice orchestration, dynamic parallelism, scheduled automation, retries, waits, gateways, and human review.

Recipe categories

  • Microservice orchestration

    HTTP service chains, conditional branching, parallel HTTP calls with Fork/Join.

  • Dynamic parallelism

    Dynamic forks — different tasks per branch, fan-out with the same task, parallel sub-workflows.

  • Wait and timer patterns

    Fixed delays, scheduled execution, external signals, and human-in-the-loop approvals.

  • Task timeouts and retries

    Exponential backoff, lease extension for long-running workers, hard SLA with totalTimeoutSeconds, and concurrency limiting.

  • Scheduled workflows

    Cron-triggered execution, catchup after downtime, bounded time windows, input parameterization, and concurrent execution handling.

  • Gateway tutorials

    Expose workflows as HTTP APIs and MCP tools backed by durable workflow execution.

  • Dynamic workflows as code

    Workflow as code in Python — sequential chains, conditional branching, parallel execution, loops, sub-workflows, and runtime-generated definitions.

  • Document Approval

    Route documents through review and approval steps with human-in-the-loop decisions.

  • Long-Running APIs

    Asynchronous execution and state persistence patterns for APIs that outlive a single request/response cycle.

  • PagerDuty Alert Workflow

    Monitor an endpoint on a schedule and trigger a PagerDuty alert when failures occur.

  • AI tutorials

    End-to-end AI and agentic workflow tutorials — translation, document classification, question answering, and fraud detection.

  1. Use Microservice orchestration or Gateway tutorials when coordinating APIs, services, and externally callable workflows.
  2. Use Dynamic parallelism and Dynamic workflows as code when the workflow shape depends on runtime input or application logic.
  3. Review Task timeouts and retries before production rollout so each workflow has explicit failure behavior.
  4. Use AI tutorials for end-to-end AI/agentic examples, or the standalone recipes above for a specific pattern like approvals, long-running APIs, or alerting.