https://github.com/nikiforovall/flowable-sdk-dotnet
Flowable API SDK Client for .NET
https://github.com/nikiforovall/flowable-sdk-dotnet
bpmn dotnet flowable
Last synced: 13 days ago
JSON representation
Flowable API SDK Client for .NET
- Host: GitHub
- URL: https://github.com/nikiforovall/flowable-sdk-dotnet
- Owner: NikiforovAll
- License: mit
- Created: 2022-03-24T17:22:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-24T20:34:40.000Z (about 3 years ago)
- Last Synced: 2025-03-27T11:02:33.864Z (about 1 month ago)
- Topics: bpmn, dotnet, flowable
- Language: C#
- Homepage:
- Size: 185 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# flowable-sdk-dotnet
[](https://github.com/NikiforovAll/flowable-sdk-dotnet/actions/workflows/build.yml)
[](https://github.com/NikiforovAll/flowable-sdk-dotnet/actions/workflows/codeql-analysis.yml)
[](https://nuget.org/packages/Flowable.Sdk)
[](https://github.com/nikiforovall/flowable-sdk-dotnet)
[](https://conventionalcommits.org)
[](https://github.com/nikiforovall/flowable-sdk-dotnet/blob/main/LICENSE.md)[](https://github.com/NikiforovAll/flowable-sdk-dotnet/actions)
Flowable HTTP SDK Client for .NET
## Registration in Dependency Injection (DI) container
```csharp
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddFlowableHttpClients(
this IServiceCollection services, IConfiguration configuration)
{
var httpClientOptions = configuration
.GetSection(FlowableHttpClientOptions.FlowableClientSection)
.Get();services.AddOptions().Bind(configuration);
services.AddHttpClient(options =>
{
options.BaseAddress = new Uri(httpClientOptions.BaseUrlProcessApi);
});services.AddHttpClient(options =>
{
options.BaseAddress = new Uri(httpClientOptions.BaseUrlCmmnApi);
});
return services;
}public static IServiceCollection AddFlowableExternalWorkerHttpClient(
this IServiceCollection services, IConfiguration configuration)
{
var httpClientOptions = configuration
.GetSection(FlowableHttpClientOptions.FlowableClientSection)
.Get();services.AddOptions().Bind(configuration);
services.AddHttpClient(
options =>
{
options.BaseAddress = new Uri(httpClientOptions.BaseUrlExternalWorker);
}).AddPolicyHandler(GetCircuitBreakerPolicy());static IAsyncPolicy GetCircuitBreakerPolicy() =>
HttpPolicyExtensions
.HandleTransientHttpError()
.Or()
.CircuitBreakerAsync(5, TimeSpan.FromSeconds(60));return services;
}
}public class FlowableHttpClientOptions
{
public const string FlowableClientSection = "FlowableHttpClientOptions";public string BaseUrlExternalWorker { get; set; }
public string BaseUrlCmmnApi { get; set; }
public string BaseUrlProcessApi { get; set; }
}
```