Package io.zeebe.client.api.worker
Interface JobClient
-
- All Known Subinterfaces:
ZeebeClient
- All Known Implementing Classes:
JobClientImpl
,ZeebeClientImpl
public interface JobClient
A client with access to all job-related operation:- complete a job
- mark a job as failed
- update the retries of a job
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompleteJobCommandStep1
newCompleteCommand(long jobKey)
Command to complete a job.FailJobCommandStep1
newFailCommand(long jobKey)
Command to mark a job as failed.
-
-
-
Method Detail
-
newCompleteCommand
CompleteJobCommandStep1 newCompleteCommand(long jobKey)
Command to complete a job.long jobKey = ..; jobClient .newCompleteCommand(jobKey) .variables(json) .send();
If the job is linked to a workflow instance then this command will complete the related activity and continue the flow.
- Parameters:
jobKey
- the key which identifies the job- Returns:
- a builder for the command
-
newFailCommand
FailJobCommandStep1 newFailCommand(long jobKey)
Command to mark a job as failed.long jobKey = ..; jobClient .newFailCommand(jobKey) .retries(3) .send();
If the given retries are greater than zero then this job will be picked up again by a job subscription. Otherwise, an incident is created for this job.
- Parameters:
jobKey
- the key which identifies the job- Returns:
- a builder for the command
-
-