DurableTask.Symphony 1.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DurableTask.Symphony --version 1.3.0                
NuGet\Install-Package DurableTask.Symphony -Version 1.3.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DurableTask.Symphony" Version="1.3.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DurableTask.Symphony --version 1.3.0                
#r "nuget: DurableTask.Symphony, 1.3.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DurableTask.Symphony as a Cake Addin
#addin nuget:?package=DurableTask.Symphony&version=1.3.0

// Install DurableTask.Symphony as a Cake Tool
#tool nuget:?package=DurableTask.Symphony&version=1.3.0                

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);
			});

		// Register all Orchestrations and Activities automatically: 
		services.AutoRegisterOrchestrationsAndActivities()

		// Register Orchestrations and Activities manually by listing Types: 
		services.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

NuGet version (DurableTask.Symphony)

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.3.5 91 10/24/2024
1.3.3 135 4/1/2024
1.3.2 127 3/21/2024
1.3.1 97 3/14/2024
1.3.0 130 3/8/2024
1.2.2 137 2/15/2024
1.2.1 260 11/28/2023
1.1.2 147 10/26/2023
1.1.1 184 8/28/2023 1.1.1 is deprecated because it has critical bugs.
1.1.0 176 8/3/2023

- Added an extension method to automatically find and register Orchestrations and Activities.