https://github.com/flowable/flowable-external-client.net
https://github.com/flowable/flowable-external-client.net
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/flowable/flowable-external-client.net
- Owner: flowable
- License: apache-2.0
- Created: 2023-11-21T11:23:12.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-11-03T17:15:35.000Z (3 months ago)
- Last Synced: 2025-12-05T14:35:17.142Z (2 months ago)
- Language: C#
- Size: 20.5 KB
- Stars: 2
- Watchers: 8
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flowable External Worker Library for .NET
[](https://www.nuget.org/packages/Flowable.ExternalWorkerClient)
[](https://github.com/flowable/flowable-external-client.net/blob/main/LICENSE)

An _External Worker Task_ in BPMN or CMMN is a task where the custom logic of that task is executed externally to Flowable, i.e. on another server.
When the process or case engine arrives at such a task, it will create an **external job**, which is exposed over the REST API.
Through this REST API, the job can be acquired and locked.
Once locked, the custom logic is responsible for signalling over REST that the work is done and the process or case can continue.
This project makes implementing such custom logic in .NET easy by not having the worry about the low-level details of the REST API and focus on the actual custom business logic.
Integrations for other languages are available, too.
This project is still a work-in-progress client, expect that the API will change.
## Authentication
This library uses the [AuthenticationHeaderValue](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.headers.authenticationheadervalue.-ctor?view=net-9.0) class to provide the authentication.
This allows to provide a `Bearer` token as well as `Basic` authentication by providing the correct parameters.
## Installation
To install the external worker library, execute the following command:
```
dotnet add package Flowable.ExternalWorkerClient
```
## Sample
### Cloud
The usage with Flowable Cloud is simpler, since everything is pre-configured.
However, it's required to either use the user credentials or to pre-configure a personal access token.
```csharp
var auth = new AuthenticationHeaderValue("Bearer", "");
var externalWorkerClient = new ExternalWorkerClient(authentication: auth);
var subscription = externalWorkerClient.Subscribe("myTopic", new HandleJobs());
// ...
class HandleJobs : IExternalWorkerCallbackHandler
{
public IWorkResult Handle(ExternalWorkerAcquireJobResponse job, IWorkResultBuilder work)
{
Console.WriteLine("Handle job: " + job.Id);
return work
.Success()
.Variable("testVar", "Hello from C#");
}
}
```