Langsung ke konten
Skillpedia
Otomatisasi48k · #6201

workflow-orchestration-patterns

Fungsinya

Skill ini membantu Anda memahami cara mengatur dan mengelola proses kompleks yang melibatkan banyak langkah atau layanan. Skill ini mengajarkan pola-pola agar proses tersebut tetap berjalan andal, meskipun ada yang gagal.

Kapan dipakai

  • ✓Ketika perlu mengatur tugas-tugas yang saling bergantung.
  • ✓Untuk memastikan proses yang panjang tidak gagal total jika satu langkah error.
  • ✓Ketika membangun sistem di mana beberapa bagian harus bekerja sama secara andal.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/workflow-orchestration-patterns/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/workflow-orchestration-patterns/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Bagaimana cara memastikan proses pemesanan online tetap berjalan meskipun sistem inventaris sempat gagal?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill ini menjelaskan konsep 'workflow' (logika orkestrasi) dan 'activity' (tugas eksternal). Dengan mengikuti pola seperti 'Saga' atau 'Entity Workflows', Anda dapat membangun sistem yang tangguh dan pulih dari kegagalan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Workflow Orchestration Patterns

Master workflow orchestration architecture with Temporal, covering fundamental design decisions, resilience patterns, and best practices for building reliable distributed systems.

Use this skill when

  • Working on workflow orchestration patterns tasks or workflows
  • Needing guidance, best practices, or checklists for workflow orchestration patterns

Do not use this skill when

  • The task is unrelated to workflow orchestration patterns
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.

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)

Critical Design Decision: Workflows vs Activities

The Fundamental Rule (Source: temporal.io/blog/workflow-engine-principles):

  • Workflows = Orchestration logic and decision-making
  • Activities = External interactions (APIs, databases, network calls)

Workflows (Orchestration)

Characteristics:

  • Contain business logic and coordination
  • MUST be deterministic (same inputs → same outputs)
  • Cannot perform direct external calls
  • State automatically preserved across failures
  • Can run for years despite infrastructure failures

Example workflow tasks:

  • Decide which steps to execute
  • Handle compensation logic
  • Manage timeouts and retries
  • Coordinate child workflows

Activities (External Interactions)

Characteristics:

  • Handle all external system interactions
  • Can be non-deterministic (API calls, DB writes)
  • Include built-in timeouts and retry logic
  • Must be idempotent (calling N times = calling once)
  • Short-lived (seconds to minutes typically)

Example activity tasks:

  • Call payment gateway API
  • Write to database
  • Send emails or notifications
  • Query external services

Design Decision Framework

Does it touch external systems? → Activity
Is it orchestration/decision logic? → Workflow

Core Workflow Patterns

1. Saga Pattern with Compensation

Purpose: Implement distributed transactions with rollback capability

Pattern (Source: temporal.io/blog/compensating-actions-part-of-a-complete-breakfast-with-sagas):

For each step:
  1. Register compensation BEFORE executing
  2. Execute the step (via activity)
  3. On failure, run all compensations in reverse order (LIFO)

Example: Payment Workflow

  1. Reserve inventory (compensation: release inventory)
  2. Charge payment (compensation: refund payment)
  3. Fulfill order (compensation: cancel fulfillment)

Critical Requirements:

  • Compensations must be idempotent
  • Register compensation BEFORE executing step
  • Run compensations in reverse order
  • Handle partial failures gracefully

2. Entity Workflows (Actor Model)

Purpose: Long-lived workflow representing single entity instance

Pattern (Source: docs.temporal.io/evaluate/use-cases-design-patterns):

  • One workflow execution = one entity (cart, account, inventory item)
  • Workflow persists for entity lifetime
  • Receives signals for state changes
  • Supports queries for current state

Example Use Cases:

  • Shopping cart (add items, checkout, expiration)
  • Bank account (deposits, withdrawals, balance checks)
  • Product inventory (stock updates, reservations)

Benefits:

  • Encapsulates entity behavior
  • Guarantees consistency per entity
  • Natural event sourcing

3. Fan-Out/Fan-In (Parallel Execution)

Purpose: Execute multiple tasks in parallel, aggregate results

Pattern:

  • Spawn child workflows or parallel activities

…

Pertanyaan umum

Apa perbedaan Workflow dan Activity?

Workflow adalah logika yang memutuskan apa yang harus dilakukan dan dalam urutan apa. Activity adalah aksi konkret, seperti memanggil layanan eksternal atau menyimpan data ke database.

Apa itu pola Saga?

Saga adalah cara untuk mengelola transaksi panjang. Jika satu langkah gagal, sistem mencoba membatalkan langkah-langkah sebelumnya agar semuanya tetap konsisten.

Mengapa Workflow harus bersifat deterministik?

Agar sistem bisa membuat ulang kondisi proses yang tepat setelah kegagalan, sehingga proses dapat dilanjutkan dari titik terakhir tanpa error.

Detail

Deskripsi asli dari pembuat

Master workflow orchestration architecture with Temporal, covering fundamental design decisions, resilience patterns, and best practices for building reliable distributed systems.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#6201
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa