workflow-orchestration-patterns

Orchestrates long-running, multi-service workflows with Temporal, including Saga compensation and Entity Workflows.

3|1|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/duanbiao2000/obsidianDoc26 --skill workflow-orchestration-patterns-duanbiao2000
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workflow-orchestration-patterns
Source: https://github.com/duanbiao2000/obsidianDoc26/tree/main/agents-main/plugins/backend-development/skills/workflow-orchestration-patterns
Command: npx skills add https://github.com/duanbiao2000/obsidianDoc26 --skill workflow-orchestration-patterns-duanbiao2000

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design durable, reliable workflows with Temporal to coordinate long-running, multi-service processes. It addresses the complexity of distributed transactions, error handling, and state management by providing deterministic execution and automatic persistence.

Core Features & Use Cases

  • Saga pattern with compensation: implement distributed transactions with compensating actions and rollback.
  • Entity Workflows (Actor Model): long-lived workflows per entity with signals and queries to reflect state changes.
  • Fan-Out/Fan-In: parallel execution of multiple tasks with results aggregation and partial-failure handling.
  • Async Callback: wait for external events or human approvals, resuming on signal.
  • State management and determinism: automatic state preservation, deterministic replay, and safe interaction boundaries via activities.
  • Versioning and backward compatibility: evolve workflows without breaking running executions.
  • Resilience and error handling: configurable retries, timeouts, and progress heartbeats to detect stalls.

Quick Start

Define a Temporal workflow type and its activities, deploy workers, and start a long-running orchestration.

Frequently Asked Questions about workflow-orchestration-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement the saga pattern with compensation logic in Temporal workflows?

Use Temporal workflows to orchestrate distributed transactions by defining compensating actions for each step, enabling automatic rollback on failure. This saga pattern approach coordinates multi-service processes reliably with state persistence and deterministic execution across your services.

How do I handle non-deterministic operations in durable workflow orchestration?

In durable workflow orchestration, keep workflows deterministic by isolating non-deterministic operations like API calls into activities. Activities run outside the deterministic workflow logic with idempotent patterns, configurable retries, and timeouts, ensuring safe interaction boundaries and reliable replay.

Can I use Temporal for long-running processes that wait for external events or human approvals?

Yes, Temporal supports async callback patterns for long-running processes that must wait for external events or human approvals. Workflows pause automatically and resume upon receiving signals, with state persistence ensuring no progress is lost during the waiting period.

What is the best way to execute parallel tasks and handle partial failures in distributed workflows?

Use the Fan-Out/Fan-In pattern in Temporal to execute parallel tasks across multiple services and aggregate results. It provides built-in partial-failure handling, allowing your distributed workflows to manage errors in individual tasks without failing the entire orchestration.

How do I version Temporal workflows without breaking currently running executions?

Version Temporal workflows by applying backward compatibility guidelines that isolate changes using patching APIs. This ensures running executions continue safely on their original logic while new executions use the updated workflow code, preventing determinism violations during replay.

When should I avoid using durable workflow orchestration for my distributed system?

Avoid durable workflow orchestration for short-lived, stateless requests where the overhead of state persistence and deterministic replay outweighs reliability benefits. It is designed for long-running, multi-service processes requiring complex compensation logic, state management, and reliable coordination.