Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TechnoBerry/camunda-worker-dotnet
Ultimate solution to connect your ASP.NET Core application to Camunda external tasks
https://github.com/TechnoBerry/camunda-worker-dotnet
asp-net-core camunda csharp external-task
Last synced: 3 months ago
JSON representation
Ultimate solution to connect your ASP.NET Core application to Camunda external tasks
- Host: GitHub
- URL: https://github.com/TechnoBerry/camunda-worker-dotnet
- Owner: TechnoBerry
- License: mit
- Created: 2018-10-22T15:26:23.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-14T17:44:38.000Z (12 months ago)
- Last Synced: 2024-05-21T22:16:54.947Z (6 months ago)
- Topics: asp-net-core, camunda, csharp, external-task
- Language: C#
- Homepage:
- Size: 511 KB
- Stars: 73
- Watchers: 6
- Forks: 29
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Camunda.Worker
[![codecov](https://codecov.io/gh/AMalininHere/camunda-worker-dotnet/branch/master/graph/badge.svg)](https://codecov.io/gh/AMalininHere/camunda-worker-dotnet)
[![NuGet](https://img.shields.io/nuget/v/Camunda.Worker.svg)](https://www.nuget.org/packages/Camunda.Worker)## Example
```csharp
[HandlerTopics("sayHello", LockDuration = 10_000)]
[HandlerVariables("USERNAME")]
public class SayHelloHandler : IExternalTaskHandler
{
public async Task HandleAsync(ExternalTask externalTask, CancellationToken cancellationToken)
{
if (!externalTask.TryGetVariable("USERNAME", out var usernameVariable))
{
return new BpmnErrorResult("NO_USER", "Username not provided");
}var username = usernameVariable.Value;
await Task.Delay(1000, cancellationToken);
return new CompleteResult
{
Variables = new Dictionary
{
["MESSAGE"] = new StringVariable($"Hello, {username}!"),
["USER_INFO"] = JsonVariable.Create(new UserInfo(username, new List
{
"Admin"
}))
}
};
}
}
```