Workflow Orchestration Patterns
Unverified●30/40Claude Code◐PartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
Cursor◐PartialPlain prose you can paste in — but no Cursor rules file
Codex◐PartialPlain prose you can paste in — but no AGENTS.md
Gemini CLI◐PartialPlain prose you can paste in
Copilot◐PartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add workflow-orchestration-patternsWho is stuck, and on what
Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.
The whole source
Frontmatter — 2 properties
| name | workflow-orchestration-patterns |
|---|---|
| description | Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration. |
| 1 | --- |
| 2 | name: workflow-orchestration-patterns |
| 3 | description: Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration. |
| 4 | ---A5 — No allowed-tools declared — no way to tell what this skill may touch |
| 5 | |
| 6 | # Workflow Orchestration Patterns |
| 7 | |
| 8 | Master workflow orchestration architecture with Temporal, covering fundamental design decisions, resilience patterns, and best practices for building reliable distributed systems. |
| 9 | |
| 10 | ## When to Use Workflow Orchestration |
| 11 | |
| 12 | ### Ideal Use Cases (Source: docs.temporal.io) |
| 13 | |
| 14 | - **Multi-step processes** spanning machines/services/databases |
| 15 | - **Distributed transactions** requiring all-or-nothing semantics |
| 16 | - **Long-running workflows** (hours to years) with automatic state persistence |
| 17 | - **Failure recovery** that must resume from last successful step |
| 18 | - **Business processes**: bookings, orders, campaigns, approvals |
| 19 | - **Entity lifecycle management**: inventory tracking, account management, cart workflows |
| 20 | - **Infrastructure automation**: CI/CD pipelines, provisioning, deployments |
| 21 | - **Human-in-the-loop** systems requiring timeouts and escalations |
| 22 | |
| 23 | ### When NOT to Use |
| 24 | |
| 25 | - Simple CRUD operations (use direct API calls) |
| 26 | - Pure data processing pipelines (use Airflow, batch processing) |
| 27 | - Stateless request/response (use standard APIs) |
| 28 | - Real-time streaming (use Kafka, event processors) |
| 29 | |
| 30 | ## Detailed patterns and worked examples |
| 31 | |
| 32 | Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient. |
| 33 | |
| 34 | ## Best Practices |
| 35 | |
| 36 | ### Workflow Design |
| 37 | |
| 38 | 1. **Keep workflows focused** - Single responsibility per workflow |
| 39 | 2. **Small workflows** - Use child workflows for scalability |
| 40 | 3. **Clear boundaries** - Workflow orchestrates, activities execute |
| 41 | 4. **Test locally** - Use time-skipping test environment |
| 42 | |
| 43 | ### Activity Design |
| 44 | |
| 45 | 1. **Idempotent operations** - Safe to retry |
| 46 | 2. **Short-lived** - Seconds to minutes, not hours |
| 47 | 3. **Timeout configuration** - Always set timeouts |
| 48 | 4. **Heartbeat for long tasks** - Report progress |
| 49 | 5. **Error handling** - Distinguish retryable vs non-retryable |
| 50 | |
| 51 | ### Common Pitfalls |
| 52 | |
| 53 | **Workflow Violations**: |
| 54 | |
| 55 | - Using `datetime.now()` instead of `workflow.now()` |
| 56 | - Threading or async operations in workflow code |
| 57 | - Calling external APIs directly from workflow |
| 58 | - Non-deterministic logic in workflows |
| 59 | |
| 60 | **Activity Mistakes**: |
| 61 | |
| 62 | - Non-idempotent operations (can't handle retries) |
| 63 | - Missing timeouts (activities run forever) |
| 64 | - No error classification (retry validation errors) |
| 65 | - Ignoring payload limits (2MB per argument) |
| 66 | |
| 67 | ### Operational Considerations |
| 68 | |
| 69 | **Monitoring**: |
| 70 | |
| 71 | - Workflow execution duration |
| 72 | - Activity failure rates |
| 73 | - Retry attempts and backoff |
| 74 | - Pending workflow counts |
| 75 | |
| 76 | **Scalability**: |
| 77 | |
| 78 | - Horizontal scaling with workers |
| 79 | - Task queue partitioning |
| 80 | - Child workflow decomposition |
| 81 | - Activity batching when appropriate |
| 82 | |
| 83 | ## Additional Resources |
| 84 | |
| 85 | **Official Documentation**: |
| 86 | |
| 87 | - Temporal Core Concepts: docs.temporal.io/workflows |
| 88 | - Workflow Patterns: docs.temporal.io/evaluate/use-cases-design-patterns |
| 89 | - Best Practices: docs.temporal.io/develop/best-practices |
| 90 | - Saga Pattern: temporal.io/blog/saga-pattern-made-easy |
| 91 | |
| 92 | **Key Principles**: |
| 93 | |
| 94 | 1. Workflows = orchestration, Activities = external calls |
| 95 | 2. Determinism is non-negotiable for workflows |
| 96 | 3. Idempotency is critical for activities |
| 97 | 4. State preservation is automatic |
| 98 | 5. Design for failure and recovery |
| 99 |
Reviews
Installed this one?Write the first review and take the Trailblazer badge.
Alternatives
Subagent Driven DevelopmentUse when executing implementation plans with independent tasks in the current session◐◐◐◐◐●36/40Python Code Style & DocumentationPython code style, linting, formatting, naming conventions, and documentation standards. Use when writing new code, reviewing style, configuring linters, writing docstrings, or establishing project standards.◐····●35/40Competitor Price Analysis 💲Competitor pricing strategy analysis and market positioning. Price mapping, pricing gaps identification, elasticity signals evaluation, and strategic pricing optimization. Use when the user asks about competitor pricing, price analysis, pricing strategy, or co◐····●34/40Competitor Price Tracker 📊Set up competitor price tracking and monitoring workflows. Track price changes, detect promotions, analyze pricing patterns, and get alerts for competitive price movements.◐····●34/40