Durable Orchestration¶
Coordinate long-running workflows with Durable Functions in .NET isolated worker.
flowchart TD
A[Trigger] --> B[Function]
B --> C[Binding or SDK]
C --> D[Azure service] Topic/Command Groups¶
Orchestrator skeleton¶
[Function("OrderOrchestrator")]
public async Task<string> RunOrchestrator(
[OrchestrationTrigger] TaskOrchestrationContext context)
{
var id = context.GetInput<string>();
await context.CallActivityAsync("ReserveInventory", id);
await context.CallActivityAsync("ChargePayment", id);
return "completed";
}
HTTP starter¶
[Function("StartOrder")]
public async Task<HttpResponseData> StartOrder(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = "orders/start")] HttpRequestData req,
[DurableClient] DurableTaskClient client)
{
string instanceId = await client.ScheduleNewOrchestrationInstanceAsync("OrderOrchestrator");
return await client.CreateCheckStatusResponseAsync(req, instanceId);
}
Review Matrix¶
| Review area | Page-specific check |
|---|---|
| Scope | Confirm the guidance applies to Durable Orchestration. |
| Source basis | Validate the recommendation against the Microsoft Learn sources in this page. |
| Evidence | Capture command output, portal state, metrics, logs, or screenshots before treating the result as proven. |