Skip to main content

Durable Functions

Durable Functions let you write stateful workflows in Azure Functions. You can chain, fan out, and wait for external events in a serverless environment.

Key Capabilities

  • Orchestrate complex workflows with code
  • Chain and fan-out/fan-in function calls
  • Wait for human interaction or external events
  • Track state and progress automatically

When to Use

Use Durable Functions when you need to:

  • Implement long-running workflows
  • Coordinate multiple Azure Functions
  • Wait for external events or approvals

Example: Orchestrator Function

[FunctionName("E1_HelloSequence")]
public static async Task<List<string>> Run(
[OrchestrationTrigger] IDurableOrchestrationContext context)
{
var outputs = new List<string>();
outputs.Add(await context.CallActivityAsync<string>("E1_SayHello", "Tokyo"));
outputs.Add(await context.CallActivityAsync<string>("E1_SayHello", "Seattle"));
outputs.Add(await context.CallActivityAsync<string>("E1_SayHello", "London"));
return outputs;
}

Resources