ServerlessWorkflow.Sdk
0.8.0.10
Prefix Reserved
See the version list below for details.
dotnet add package ServerlessWorkflow.Sdk --version 0.8.0.10
NuGet\Install-Package ServerlessWorkflow.Sdk -Version 0.8.0.10
<PackageReference Include="ServerlessWorkflow.Sdk" Version="0.8.0.10" />
<PackageVersion Include="ServerlessWorkflow.Sdk" Version="0.8.0.10" />
<PackageReference Include="ServerlessWorkflow.Sdk" />
paket add ServerlessWorkflow.Sdk --version 0.8.0.10
#r "nuget: ServerlessWorkflow.Sdk, 0.8.0.10"
#:package ServerlessWorkflow.Sdk@0.8.0.10
#addin nuget:?package=ServerlessWorkflow.Sdk&version=0.8.0.10
#tool nuget:?package=ServerlessWorkflow.Sdk&version=0.8.0.10
Serverless Workflow Specification - .NET SDK
Provides .NET 6.0 API/SPI and Model Validation for the Serverless Workflow Specification
With the SDK, you can:
- Read and write workflow JSON and YAML definitions
- Programmatically build workflow definitions
- Validate workflow definitions (both schema and DSL integrity validation)
Status
| Latest Releases | Conformance to spec version |
|---|---|
| 0.8.0.10 | v0.7 |
Getting Started
dotnet nuget add package ServerlessWorkflow.Sdk
services.AddServerlessWorkflow();
How to use
Building workflows programatically
var workflow = WorkflowDefinition.Create("MyWorkflow", "MyWorkflow", "1.0")
.StartsWith("inject", flow =>
flow.Inject(new { username = "test", password = "123456" }))
.Then("operation", flow =>
flow.Execute("fakeApiFunctionCall", action =>
{
action.Invoke(function =>
function.WithName("fakeFunction")
.SetOperationUri(new Uri("https://fake.com/swagger.json#fake")))
.WithArgument("username", "${ .username }")
.WithArgument("password", "${ .password }");
})
.Execute("fakeEventTrigger", action =>
{
action
.Consume(e =>
e.WithName("fakeEvent")
.WithSource(new Uri("https://fakesource.com"))
.WithType("fakeType"))
.ThenProduce(e =>
e.WithName("otherEvent")
.WithSource(new Uri("https://fakesource.com"))
.WithType("fakeType"));
}))
.End()
.Build();
Reading workflows
var reader = WorkflowReader.Create();
using(Stream stream = File.OpenRead("myWorkflow.json"))
{
var definition = reader.Read(stream, WorkflowDefinitionFormat.Json);
}
Writing workflows
var writer = WorkflowWriter.Create();
using(Stream stream = new MemoryStream())
{
writer.Write(workflow, stream);
stream.Flush();
stream.Position = 0;
using(StreamReader reader = new StreamReader(stream))
{
var yaml = reader.ReadToEnd();
Console.WriteLine(yaml);
Console.ReadLine();
}
}
Validating workflows
var validator = serviceProvider.GetRequiredService<IValidator<WorkflowDefinition>>();
var validationResult = validator.Validate(myWorkflow);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. net9.0 was computed. 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. |
-
net6.0
- CloudNative.CloudEvents (>= 2.2.0)
- FluentValidation.DependencyInjectionExtensions (>= 10.3.6)
- Iso8601DurationHelper (>= 1.0.5)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
- Microsoft.Extensions.Http (>= 6.0.0)
- Microsoft.Extensions.Options (>= 6.0.0)
- Neuroglia.Serialization.Json (>= 2.0.1.27)
- Neuroglia.Serialization.NewtonsoftJson (>= 2.0.1.27)
- Neuroglia.Serialization.Protobuf (>= 2.0.1.27)
- Neuroglia.Serialization.YamlDotNet (>= 2.0.1.27)
- Newtonsoft.Json (>= 13.0.1)
- Newtonsoft.Json.Schema (>= 3.0.14)
- Octokit (>= 0.50.0)
- protobuf-net.Core (>= 3.0.101)
- YamlDotNet (>= 11.2.1)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on ServerlessWorkflow.Sdk:
| Package | Downloads |
|---|---|
|
Synapse.Integration
This package contains everything you need to integrate Synapse WFMS and its APIs |
|
|
ServerlessWorkflow.Sdk.IO
Contains services used to read and write ServerlessWorkflow workflow definitions |
|
|
ServerlessWorkflow.Sdk.Builders
Contains services used to build ServerlessWorkflow workflow definitions programatically |
|
|
Synapse.Sdk
Contains the definitions for all resources used by Synapse |
|
|
ServerlessWorkflow.Sdk.Runtime.Abstractions
Contains the abstractions for the runtime services used to execute ServerlessWorkflow workflow definitions |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on ServerlessWorkflow.Sdk:
| Repository | Stars |
|---|---|
|
serverlessworkflow/synapse
Serverless Workflow Management System (WFMS)
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.2 | 140 | 4/15/2026 |
| 1.0.1 | 2,501 | 3/14/2025 |
| 1.0.0 | 1,188 | 1/30/2025 |
| 1.0.0-alpha6.3 | 379 | 1/16/2025 |
| 1.0.0-alpha6.2 | 161 | 1/10/2025 |
| 1.0.0-alpha6.1 | 150 | 1/10/2025 |
| 1.0.0-alpha6 | 198 | 1/10/2025 |
| 1.0.0-alpha5.4 | 161 | 12/19/2024 |
| 1.0.0-alpha5.3 | 141 | 12/19/2024 |
| 1.0.0-alpha5.2 | 303 | 11/20/2024 |
| 1.0.0-alpha5.1 | 967 | 10/25/2024 |
| 1.0.0-alpha5 | 467 | 10/22/2024 |
| 1.0.0-alpha4.1 | 170 | 10/22/2024 |
| 1.0.0-alpha4 | 276 | 10/18/2024 |
| 1.0.0-alpha3.1 | 161 | 10/18/2024 |
| 1.0.0-alpha3 | 606 | 10/11/2024 |
| 1.0.0-alpha2.16 | 643 | 10/1/2024 |
| 1.0.0-alpha2.15 | 705 | 9/8/2024 |
| 1.0.0-alpha2.14 | 163 | 9/6/2024 |
| 0.8.0.10 | 651 | 2/24/2022 |