DurableTask.Symphony
1.2.2
See the version list below for details.
dotnet add package DurableTask.Symphony --version 1.2.2
NuGet\Install-Package DurableTask.Symphony -Version 1.2.2
<PackageReference Include="DurableTask.Symphony" Version="1.2.2" />
paket add DurableTask.Symphony --version 1.2.2
#r "nuget: DurableTask.Symphony, 1.2.2"
// Install DurableTask.Symphony as a Cake Addin #addin nuget:?package=DurableTask.Symphony&version=1.2.2 // Install DurableTask.Symphony as a Cake Tool #tool nuget:?package=DurableTask.Symphony&version=1.2.2
DurableTask.Symphony
This repo contains the library code to interact with Durable Task Framework (DTFx) using MS SQL as the Orchestration Hub backend.
About
It contains wrappers, services, extensions, and other helper methods to configure and use TaskHubClient
and TaskHubWorker
as injectable services, as well as reading state information from the configured OrchestrationServiceBase
, which configured to use SQL server as a task hub.
Usage
Database configuration
Run Create-DurableTables.sql
in the config/
directory of this repo. This will create the required tables and stored procedures for the Orchestration Hub.
Task Worker configuration
In the IHost
ConfigureServices()
configuration methods, use the extension methods to configure the Orchestration Hub and the Task Worker.
IHost.CreateDefaultBuilder(args)
.ConfigureServices((hostBuilderContext, services) =>
{
services.AddOrchestrationHub(options =>
{
// Adds the backing SQL connection for storage and persistence
options.ConnectionString = "DurableContextSQLConnectionString"
options.MaxActiveOrchestrations = 10;
})
.AddTaskWorker(options =>
{
// Adds the Task Worker hosted services
options.ErrorPropagationMode = ErrorPropagationMode.UseFailureDetails);
})
.WithRegisteredOrchestrations(new[]
{
// Adds Orchestrations as transient services and registers them with the Task Worker
typeof(SampleOrchestration),
typeof(AnotherOrchestration)
})
.WithRegisteredActivities(new[]
{
// Adds Activities and transient services and registers them with the Task Worker
typeof(SampleActivity),
typeof(AnotherActivity)
});
})
.Build();
Orchestrations must be classes that implement TaskOrchestration<TOutput, TInput>
. Activities must be classes that implement TaskActivity<TInput, TOutput>
or AsyncTaskActivity<TInput, TOutput>
.
Orchestrations and Activities must be registered on the task worker (server) to function.
Task Client configuration
In the IHost
ConfigureServices()
configuration methods, use the extension methods to configure the connection to the Orchestration Hub.
IHost.CreateDefaultBuilder(args)
.ConfigureServices((hostBuilderContext, services) =>
{
services.AddOrchestrationHub(options =>
{
// Adds the backing SQL connection for storage and persistence
options.ConnectionString = "DurableContextSQLConnectionString"
})
.AddTaskClient();
})
.Build();
To start an Orchestration, inject an instance of the ITaskClient
service and use the StartOrchestration
or ScheduleOrchestration
methods.
Download
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- Microsoft.DurableTask.SqlServer (>= 1.2.2)
- Microsoft.EntityFrameworkCore.Proxies (>= 7.0.16)
- Microsoft.EntityFrameworkCore.SqlServer (>= 7.0.16)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
- Update packages