| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
FlowSynx.Client is a modern, extensible C# SDK designed to integrate seamlessly with the FlowSynx Workflow Automation Engine, providing a streamlined way to interact with its powerful REST API. This SDK enables developers to manage workflows, plugins, executions, configurations, and more through a simple, fluent .NET API.
You can install the SDK via NuGet:
dotnet add package FlowSynx.Client
Make sure the blow package are added to you project:
dotnet add package Microsoft.Extensions.DependencyInjection dotnet add package Microsoft.Extensions.Hosting
Then use the FlowSynx Client like following:
IAuthenticationStrategy authStrategy = new BasicAuthenticationStrategy("admin", "admin");
using IHost host = Host.CreateDefaultBuilder(args)
.ConfigureServices((_, services) =>
{
services.AddHttpClient();
services.AddSingleton<IFlowSynxServiceFactory, FlowSynxServiceFactory>();
services.AddSingleton(authStrategy);
services.AddSingleton<IFlowSynxClient, FlowSynxClient>();
})
.Build();
var client = host.Services.GetRequiredService<IFlowSynxClient>();
var result = await _flowSynxClient.Workflows.ListAsync(cancellationToken);
var workflows = result.Payload;
foreach (var workflow in workflows)
{
Console.WriteLine($"{workflow.Id}: {workflow.Name}");
}
Guid workflowId = Guid.Parse("YOUR-WORKFLOW-ID");
var workflowRequest = new ExecuteWorkflowRequest { WorkflowId = workflowId };
var result = await _flowSynxClient.Workflows.ExecuteAsync(workflowRequest, cancellationToken);
| Back | FazBrowse Home | New Git URL |