Beyond Background Jobs: Building Durable Workflows with Temporal and .NET 10
Описание и применение
В статье описывается, как заменить последовательный вызов функций в ASP.NET Core на долговечный workflow Temporal, обеспечивая устойчивость к сбоям и возможность повторных попыток.
Задача
Handling failures, retries, and long‑running steps in a .NET order‑processing pipeline is complex and error‑prone.
Результат
The example demonstrates how Temporal turns a fragile sequential method into a durable, retryable workflow that can survive crashes and external delays.
Рабочий процесс
- Create ASP.NET Core project
- Add Temporal .NET SDK
- Define OrderRequest model
- Implement activities (ChargePaymentAsync, RequestManagerApprovalAsync, SendEmailAsync)
- Define workflow logic with conditional manager approval
- Register worker and start Temporal server
Доказательства
Temporal is a durable workflow execution platform that helps applications reliably execute long-running and failure-prone workflows.
Create a new ASP.NET Core application: dotnet new web -n TemporalDemo
dotnet add package Temporalio
- Дата записи: 2026-10-05T04:41:10.155Z