Zeebe C# Client 2.5.0
C# Client to communicate with an Zeebe Gateway
Loading...
Searching...
No Matches
Zeebe.Client.Api.Worker.IJobWorkerBuilderStep2 Interface Reference

Public Member Functions

IJobWorkerBuilderStep3 Handler (JobHandler handler)
 Set the handler to process the jobs. At the end of the processing, the handler can complete the job or mark it as failed. More...
 
IJobWorkerBuilderStep3 Handler (AsyncJobHandler handler)
 Set an async handler to process the jobs asynchronously. At the end of the processing, the handler can complete the job or mark it as failed. More...
 

Member Function Documentation

◆ Handler() [1/2]

IJobWorkerBuilderStep3 Zeebe.Client.Api.Worker.IJobWorkerBuilderStep2.Handler ( AsyncJobHandler  handler)

Set an async handler to process the jobs asynchronously. At the end of the processing, the handler can complete the job or mark it as failed.

Example JobHandler implementation:

var handler = async (client, job) =>
{
String json = job.Variables;
// modify variables
await client
.CompleteCommand(job.Key)
.Variables(json)
.Send();
};

The handler must be thread-safe.

Parameters
handlerthe handle to process the jobs
Returns
the builder for this worker

◆ Handler() [2/2]

IJobWorkerBuilderStep3 Zeebe.Client.Api.Worker.IJobWorkerBuilderStep2.Handler ( JobHandler  handler)

Set the handler to process the jobs. At the end of the processing, the handler can complete the job or mark it as failed.

Example JobHandler implementation:

var handler = (client, job) =>
{
String json = job.Variables;
// modify variables
client
.CompleteCommand(job.Key)
.Variables(json)
.Send();
};

The handler must be thread-safe.

Parameters
handlerthe handle to process the jobs
Returns
the builder for this worker

The documentation for this interface was generated from the following file: