Escendit.Extensions.Workflows
0.1.0-rc.1
dotnet add package Escendit.Extensions.Workflows --version 0.1.0-rc.1
NuGet\Install-Package Escendit.Extensions.Workflows -Version 0.1.0-rc.1
<PackageReference Include="Escendit.Extensions.Workflows" Version="0.1.0-rc.1" />
<PackageVersion Include="Escendit.Extensions.Workflows" Version="0.1.0-rc.1" />
<PackageReference Include="Escendit.Extensions.Workflows" />
paket add Escendit.Extensions.Workflows --version 0.1.0-rc.1
#r "nuget: Escendit.Extensions.Workflows, 0.1.0-rc.1"
#:package Escendit.Extensions.Workflows@0.1.0-rc.1
#addin nuget:?package=Escendit.Extensions.Workflows&version=0.1.0-rc.1&prerelease
#tool nuget:?package=Escendit.Extensions.Workflows&version=0.1.0-rc.1&prerelease
NuGet Package: Escendit.Extensions.Workflows
This NuGet package provides a streamlined integration with Temporal.io for .NET applications, offering simplified configuration and dependency injection setup for building robust, distributed workflow applications. It wraps Temporal's .NET SDK with opinionated defaults and convenient extension methods.
Key features:
- Simplified Temporal client and worker configuration
- Built-in dependency injection integration
- Pre-configured JSON serialization with System.Text.Json
- OpenTelemetry tracing support out of the box
- Worker versioning and deployment management
- Keyed service registration for multi-tenant scenarios
- Production-ready defaults for common use cases
Installation
To install this package, use the NuGet Package Manager Console:
shell PM> Install-Package Escendit.Extensions.Workflows
Or you can search for "Escendit.Extensions.Workflows" in the NuGet Package Manager UI and install it from there.
Usage
Basic Setup
Register Temporal services in your Program.cs
or Startup.cs
:
// Add Temporal hosted service with minimal configuration
builder
.Services
.AddTemporalHostedService("<task queue>")
.ConfigureWorkerOptions(builder =>
{
builder
.AddWorkflow<OrderWorkflow>()
.AddActivity<CreateOrderActivity>()
.AddActivity<ProcessOrderActivity>();
});
Advanced Configuration
Configure Temporal with custom settings:
builder
.Services
.AddTemporalHostedService("<task queue>", "<target host>", "<namespace>", "<build id>")
.ConfigureWorkerOptions(builder =>
{
builder
.AddWorkflow<OrderWorkflow>()
.AddActivity<CreateOrderActivity>()
.AddActivity<ProcessOrderActivity>();
});
Using Keyed Services
For multi-tenant applications or multiple Temporal connections:
// Register multiple Temporal clients
builder
.Services
.AddKeyedTemporalClient("<name>", "<target host?>", "<namespace?>");
builder
.Services
.AddKeyedTemporalClient("<name>", "<target host?>", "<namespace?>");
// Use in your services
public class OrderService
{
private readonly ITemporalClient _clientA;
private readonly ITemporalClient _clientB;
public OrderService(
[FromKeyedServices("<name 1>")] ITemporalClient clientA,
[FromKeyedServices("<name 2>")] ITemporalClient clientB)
{
_clientA = clientA;
_clientB = clientB;
}
}
Configuration
Default Settings
The package uses the following defaults:
Setting | Default Value | Description |
---|---|---|
ClientTargetHost |
localhost:7233 |
Temporal server address |
ClientNamespace |
default |
Temporal namespace |
UseWorkerVersioning |
false |
Enable worker versioning (true if buildId provided) |
DataConverter |
System.Text.Json | JSON serialization using System.Text.Json |
Tracing |
Enabled | OpenTelemetry tracing interceptors |
Customizing Client Options
You can further customize the Temporal client after registration:
builder
.Services
.AddTemporalHostedService("<name>")
.ConfigureClientOptions(options =>
{
options.RetryConfig = new RetryConfig { InitialInterval = TimeSpan.FromSeconds(1), MaximumInterval = TimeSpan.FromMinutes(1), BackoffCoefficient = 2.0, MaximumAttempts = 3 };
});
Worker Versioning
Enable worker versioning for safe deployments:
builder
.Services
.AddTemporalHostedService( "<task queue>", buildId: Environment.GetEnvironmentVariable("BUILD_ID"))
.ConfigureWorkerOptions(builder =>
{
builder
.AddWorkflow<OrderWorkflow>()
.AddActivity<CreateOrderActivity>()
.AddActivity<ProcessOrderActivity>();
});
Dependencies
This package depends on:
Temporalio.Extensions.Hosting
- Temporal .NET SDK hosting extensionsTemporalio.Extensions.OpenTelemetry
- OpenTelemetry integration for Temporal
These dependencies are automatically installed when you install this package.
Contributing
If you find a bug or have a feature request, please create an issue in the GitHub repository.
To contribute code, fork the repository and submit a pull request. Please ensure that your code follows the project's coding standards and is thoroughly tested.
License
Licensed under Apache License 2.0. See the LICENSE file for the complete license text.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Temporalio.Extensions.Hosting (>= 1.7.0)
- Temporalio.Extensions.OpenTelemetry (>= 1.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.1.0-rc.1 | 118 | 8/19/2025 |