![]() |
VOOZH | about |
dotnet add package Komsa.Camunda.Api.Client --version 2.8.0
NuGet\Install-Package Komsa.Camunda.Api.Client -Version 2.8.0
<PackageReference Include="Komsa.Camunda.Api.Client" Version="2.8.0" />
<PackageVersion Include="Komsa.Camunda.Api.Client" Version="2.8.0" />Directory.Packages.props
<PackageReference Include="Komsa.Camunda.Api.Client" />Project file
paket add Komsa.Camunda.Api.Client --version 2.8.0
#r "nuget: Komsa.Camunda.Api.Client, 2.8.0"
#:package Komsa.Camunda.Api.Client@2.8.0
#addin nuget:?package=Komsa.Camunda.Api.Client&version=2.8.0Install as a Cake Addin
#tool nuget:?package=Komsa.Camunda.Api.Client&version=2.8.0Install as a Cake Tool
After Jan Lucansky stopped maintaining the orginal version we started maintaining our own fork. It is a drop-in-replacement for the original version. Just use Komsa.Camunda.Api.Client nuget package instead of Camunda.Api.Client.
Camunda REST API Client for .NET platform
Each part listed below is fully covered according to https://docs.camunda.org/manual/latest/reference/rest specification.
The Camunda REST API Client is available on nuget.org
To install Camunda REST API Client, run the following command in the Package Manager Console
PM> Install-Package Komsa.Camunda.Api.Client
CamundaClient camunda = CamundaClient.Create("http://localhost:8080/engine-rest");
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("http://localhost:8080/engine-rest");
httpClient.DefaultRequestHeaders.Add("Authorization", "Basic ZGVtbzpkZW1v");
CamundaClient camunda = CamundaClient.Create(httpClient);
// build query
var externalTaskQuery = new ExternalTaskQuery() { Active = true, TopicName = "MyTask" };
// add some sorting
externalTaskQuery
.Sort(ExternalTaskSorting.TaskPriority, SortOrder.Descending)
.Sort(ExternalTaskSorting.LockExpirationTime);
// request external tasks according to query
List<ExternalTaskInfo> tasks = await camunda.ExternalTasks.Query(externalTaskQuery).List();
// get all external tasks without specifying query
List<ExternalTaskInfo> allTasks = await camunda.ExternalTasks.Query().List();
VariableResource vars = camunda.ProcessInstances["0ea218e8-9cfa-11e6-90a6-ac87a31e24fd"].Variables;
// set integer variable
await vars.Set("Var1", VariableValue.FromObject(123));
// set content of binary variable from file
await vars.SetBinary("DocVar", new BinaryDataContent(File.OpenRead("document.doc")), BinaryVariableType.Bytes);
var executionId = "290a7fa2-8bc9-11e6-ab5b-ac87a31e24fd";
// load all variables of specified execution
Dictionary<string, VariableValue> allVariables = await camunda.Executions[executionId]
.LocalVariables.GetAll();
// obtain strongly typed variable with name Var1
int myVar1 = allVariables["Var1"].GetValue<int>();
HttpContent fileContent = await camunda.Executions[executionId]
.LocalVariables.GetBinary("file1");
using (fileContent)
{
using (var outStream = File.OpenWrite("file1.doc"))
{
(await fileContent.ReadAsStreamAsync()).CopyTo(outStream);
}
}
var msg = new CorrelationMessage() { All = true, MessageName = "TestMsg" };
msg.ProcessVariables
.Set("Date", DateTime.Today)
.Set("ComplexVar", new { abc = "xyz", num = 123});
// correlate message with process variables
await camunda.Messages.DeliverMessage(msg);
// deploy new bpmn diagram with some attachment
await camunda.Deployments.Create("My Deployment 1",
new ResourceDataContent(File.OpenRead("C:\\diagram.bpmn"), "diagram.bpmn"),
new ResourceDataContent(File.OpenRead("C:\\document.doc"), "document.doc"));
// get all jobs owned by Process_1 with DueDate in the future
var jobQuery = new JobQuery() { ProcessDefinitionKey = "Process_1" };
jobQuery.DueDates.Add(new ConditionQueryParameter()
{
Operator = ConditionOperator.GreaterThan, Value = DateTime.Now
});
var jobs = await camunda.Jobs.Query(jobQuery).List();
This project is made available under the MIT license. See LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.8.0 | 46,313 | 11/11/2024 |
| 2.8.0-preview.2 | 138 | 11/8/2024 |
| 2.8.0-preview.1 | 152 | 11/8/2024 |
| 2.7.0 | 47,606 | 2/23/2022 |
| 2.6.1 | 3,008 | 11/19/2021 |
| 2.6.0 | 818 | 11/18/2021 |