
Workflow Orchestration Patterns
FreeDesign resilient workflows for distributed systems.
Free · Opens the source repo
What Workflow Orchestration Patterns does
Workflow Orchestration Patterns provides a comprehensive guide to designing workflows using Temporal, specifically aimed at developers and architects working with distributed systems. This skill emphasizes the importance of separating workflows from activities, which is crucial for effective orchestration. By understanding the fundamental design decisions, resilience patterns, and best practices outlined in this skill, users can build reliable and maintainable workflows that can withstand failures and ensure consistency across distributed transactions.
This skill is particularly beneficial for those involved in multi-step processes that span various machines, services, or databases. It addresses the challenges of long-running workflows, which may last from hours to years, by incorporating automatic state persistence and failure recovery mechanisms. The guidance provided includes practical use cases such as managing business processes, entity lifecycles, and infrastructure automation, making it a versatile resource for a wide range of applications.
In addition to theoretical concepts, the skill also highlights common pitfalls and operational considerations that developers should be aware of. For instance, it stresses the importance of idempotency in activities and offers strategies for monitoring workflow execution. By following the best practices and avoiding common mistakes, users can enhance the reliability and performance of their workflows, ensuring smooth operation in complex environments.
Overall, Workflow Orchestration Patterns serves as an essential resource for anyone looking to master workflow orchestration with Temporal, helping them to design systems that are both robust and efficient in handling distributed processes.
When to use it
Use this skill when developing long-running processes, distributed transactions, or microservice orchestration that require resilience and state management.
When not to use it
Avoid this skill for simple CRUD operations or stateless request/response scenarios, where direct API calls are more appropriate.
What you can build with it
Managing Business Processes
Utilize this skill to design workflows for managing complex business processes such as bookings and approvals.
Orchestrating Microservices
Implement this skill to orchestrate interactions between microservices, ensuring reliable communication and state management.
Automating CI/CD Pipelines
Leverage the patterns outlined in this skill to automate CI/CD pipelines, ensuring robust deployment processes.
How to install Workflow Orchestration Patterns
View source1. Install with the skills CLI
npx skills add wshobson/agents/workflow-orchestration-patterns --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by wshobsonWorkflow Orchestration Patterns
Master workflow orchestration architecture with Temporal, covering fundamental design decisions, resilience patterns, and best practices for building reliable distributed systems.
When to Use Workflow Orchestration
Ideal Use Cases (Source: docs.temporal.io)
- Multi-step processes spanning machines/services/databases
- Distributed transactions requiring all-or-nothing semantics
- Long-running workflows (hours to years) with automatic state persistence
- Failure recovery that must resume from last successful step
- Business processes: bookings, orders, campaigns, approvals
- Entity lifecycle management: inventory tracking, account management, cart workflows
- Infrastructure automation: CI/CD pipelines, provisioning, deployments
- Human-in-the-loop systems requiring timeouts and escalations
When NOT to Use
- Simple CRUD operations (use direct API calls)
- Pure data processing pipelines (use Airflow, batch processing)
- Stateless request/response (use standard APIs)
- Real-time streaming (use Kafka, event processors)
Detailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Best Practices
Workflow Design
- Keep workflows focused - Single responsibility per workflow
- Small workflows - Use child workflows for scalability
- Clear boundaries - Workflow orchestrates, activities execute
- Test locally - Use time-skipping test environment
Activity Design
- Idempotent operations - Safe to retry
- Short-lived - Seconds to minutes, not hours
- Timeout configuration - Always set timeouts
- Heartbeat for long tasks - Report progress
- Error handling - Distinguish retryable vs non-retryable
Common Pitfalls
Workflow Violations:
- Using
datetime.now()instead ofworkflow.now() - Threading or async operations in workflow code
- Calling external APIs directly from workflow
- Non-deterministic logic in workflows
Activity Mistakes:
- Non-idempotent operations (can't handle retries)
- Missing timeouts (activities run forever)
- No error classification (retry validation errors)
- Ignoring payload limits (2MB per argument)
Operational Considerations
Monitoring:
- Workflow execution duration
- Activity failure rates
- Retry attempts and backoff
- Pending workflow counts
Scalability:
- Horizontal scaling with workers
- Task queue partitioning
- Child workflow decomposition
- Activity batching when appropriate
Additional Resources
Official Documentation:
- Temporal Core Concepts: docs.temporal.io/workflows
- Workflow Patterns: docs.temporal.io/evaluate/use-cases-design-patterns
- Best Practices: docs.temporal.io/develop/best-practices
- Saga Pattern: temporal.io/blog/saga-pattern-made-easy
Key Principles:
- Workflows = orchestration, Activities = external calls
- Determinism is non-negotiable for workflows
- Idempotency is critical for activities
- State preservation is automatic
- Design for failure and recovery
Frequently asked questions about Workflow Orchestration Patterns
Similar skills
Turborepo
Optimized build system for JavaScript/TypeScript monorepos.
Azure Pipelines Validation
Streamline your Azure DevOps pipeline changes locally.
Azure Developer CLI
Streamline your Azure project workflows with best practices.
Azure Container Registry CLI
Manage Azure Container Registry resources with ease.
Aspire
Build and orchestrate polyglot distributed applications seamlessly.
Vercel CLI
Manage and deploy Vercel projects from the command line.
