Build Durable Functions orchestration patterns with activities and sub-orchestrations.
Last verified: May 2026
Build Durable Functions orchestration configs with activities, sub-orchestrations, timers, and retry policies.
Required Fields
orchestrationNamefunctionAppNametaskHubNameorchestration.patternorchestration.activitiesOutput will appear here...Your team is building an order processing workflow: validate payment, reserve inventory, charge card, send confirmation, schedule fulfillment. With Logic Apps, this required visual designer + JSON. With Step Functions, it required ASL. With Durable Functions, you write C# code that reads top-to-bottom: each step is an activity function, error handling is try/catch, retries are configured per-call. The builder generates the boilerplate (orchestrator skeleton, activity stubs, retry policies). Migration from a 200-line Logic App to ~80 lines of C# Durable Functions code with cleaner error handling.
Azure Durable Functions is an extension of Azure Functions that lets you write stateful, long-running workflows in code using orchestrator functions. Instead of managing state machines or queues yourself, you define orchestration logic in C#, JavaScript, Python, or Java, and the Durable Task Framework handles state persistence, checkpointing, and replay. The framework supports patterns like function chaining, fan-out/fan-in, async HTTP APIs, monitoring (polling), and human interaction (approval workflows). The Durable Functions Builder helps you configure orchestration patterns with activity functions, sub-orchestrations, timers, and external event handling.
The builder generates Durable Functions orchestrator code templates for common patterns: function chaining (sequential activity calls), fan-out/fan-in (Task.WhenAll over parallel activities), monitor (loop with timer until condition met), human interaction (WaitForExternalEvent with timeout), and saga (compensation logic on failure). Output is C#, JavaScript, or Python orchestrator code with corresponding activity function signatures and host.json configuration.
ALL non-determinism MUST go in activity functions, never in orchestrator code. The most common bug: calling DateTime.Now or Guid.NewGuid in orchestrator code — works fine on first execution, breaks on replay because the value differs. Use context.CurrentUtcDateTime and context.NewGuid() in orchestrator code.
Sub-orchestrations are the right abstraction unit for reusable workflow segments. A 'process order' workflow that calls 'validate-payment', 'reserve-inventory', 'send-confirmation' sub-orchestrations is dramatically more maintainable than one giant orchestrator with all logic inline. Each sub-orchestration is independently testable and can be reused across parent workflows.
Fan-out/fan-in patterns scale beautifully with Durable Functions but watch the 10K-task limit per orchestration in some plans. For massive fan-outs (100K+ tasks), use ContinueAsNew to chunk work across multiple orchestration instances or use Azure Batch instead.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.