Skills · Coding

Workflow Orchestration Patterns

Unverified30/40

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.

Originally by wshobson · MIT

Claude CodePartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
CursorPartialPlain prose you can paste in — but no Cursor rules file
CodexPartialPlain prose you can paste in — but no AGENTS.md
Gemini CLIPartialPlain prose you can paste in
CopilotPartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add workflow-orchestration-patterns

This command does not work yet — the CLI is still being built. Until then, use Raw in the reader below to take the file.

Who 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

No sign-in, no blur, nothing truncated
workflow-orchestration-patterns/SKILL.md99 lines3.4 KBRawView on GitHub
Frontmatter — 2 properties
nameworkflow-orchestration-patterns
descriptionDesign 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---
2name: workflow-orchestration-patterns
3description: 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---A5No allowed-tools declared — no way to tell what this skill may touch
5 
6# Workflow Orchestration Patterns
7 
8Master 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 
32Detailed 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 
381. **Keep workflows focused** - Single responsibility per workflow
392. **Small workflows** - Use child workflows for scalability
403. **Clear boundaries** - Workflow orchestrates, activities execute
414. **Test locally** - Use time-skipping test environment
42 
43### Activity Design
44 
451. **Idempotent operations** - Safe to retry
462. **Short-lived** - Seconds to minutes, not hours
473. **Timeout configuration** - Always set timeouts
484. **Heartbeat for long tasks** - Report progress
495. **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 
941. Workflows = orchestration, Activities = external calls
952. Determinism is non-negotiable for workflows
963. Idempotency is critical for activities
974. State preservation is automatic
985. Design for failure and recovery
99 

Reviews

Installed this one?Write the first review and take the Trailblazer badge.

Reviews only open after a real install, so this is empty — and we leave it empty rather than invent one.

Alternatives

Also in Coding