Interface FailJobCommandStep1.FailJobCommandStep2
- All Superinterfaces:
CommandWithVariables<FailJobCommandStep1.FailJobCommandStep2>,FinalCommandStep<FailJobResponse>,JobCallbackFinalCommandStep<FailJobResponse>
- All Known Implementing Classes:
FailJobCommandImpl
- Enclosing interface:
FailJobCommandStep1
-
Method Summary
Modifier and TypeMethodDescriptionerrorMessage(String errorMsg) Provide an error message describing the reason for the job failure.retryBackoff(Duration backoffTimeout) Set the backoff timeout for failing this job.Set a single variable of this job.variables(InputStream variables) Set the variables of this job.Set the variables of this job.Set the variables of this job.Set the variables of this job.withLeaseToken(String leaseToken) Sets the lease token identifying the job's activation, fencing this command against a superseded activation of the same job.Methods inherited from interface io.camunda.client.api.command.FinalCommandStep
execute, requestTimeout, send
-
Method Details
-
retryBackoff
Set the backoff timeout for failing this job.If the backoff timeout is greater than zero and retries are greater than zero then this job will be picked up again after the given backoff timeout is expired.
- Parameters:
backoffTimeout- the backoff timeout of this job- Returns:
- the builder for this command. Call
FinalCommandStep.send()to complete the command and send * it to the broker.
-
errorMessage
Provide an error message describing the reason for the job failure. If failing the job creates an incident, this error message will be used as incident message.- Parameters:
errorMsg- error message to be attached to the failed job- Returns:
- the builder for this command. Call
FinalCommandStep.send()to complete the command and send it to the broker.
-
withLeaseToken
Sets the lease token identifying the job's activation, fencing this command against a superseded activation of the same job. Obtain it fromActivatedJob#getLeaseToken().For a leased job, the matching token must be supplied to prove the command comes from the worker that holds the current lease; a command with no token is rejected. A command carrying a stale token is likewise rejected, fencing the job against a superseded activation (e.g. after the job timed out or failed and was re-activated by another worker). A job that was activated without a lease requires no token.
When this command is created from an activated job (e.g.
newFailCommand(activatedJob)) the job's lease token is carried automatically, so this method is only needed when building the command from a job key.- Parameters:
leaseToken- the opaque lease token the worker received when the job was activated- Returns:
- the builder for this command. Call
FinalCommandStep.send()to complete the command and send it to the broker.
-
variables
Set the variables of this job.- Specified by:
variablesin interfaceCommandWithVariables<FailJobCommandStep1.FailJobCommandStep2>- Parameters:
variables- the variables (JSON) as String- Returns:
- the builder for this command. Call
FinalCommandStep.send()to complete the command and send it to the broker.
-
variables
Set the variables of this job.- Specified by:
variablesin interfaceCommandWithVariables<FailJobCommandStep1.FailJobCommandStep2>- Parameters:
variables- the variables as object- Returns:
- the builder for this command. Call
FinalCommandStep.send()to complete the command and send it to the broker.
-
variables
Set the variables of this job.- Specified by:
variablesin interfaceCommandWithVariables<FailJobCommandStep1.FailJobCommandStep2>- Parameters:
variables- the variables (JSON) as stream- Returns:
- the builder for this command. Call
FinalCommandStep.send()to complete the command and send it to the broker.
-
variables
Set the variables of this job.- Specified by:
variablesin interfaceCommandWithVariables<FailJobCommandStep1.FailJobCommandStep2>- Parameters:
variables- the variables as map- Returns:
- the builder for this command. Call
FinalCommandStep.send()to complete the command and send it to the broker.
-
variable
Set a single variable of this job.- Specified by:
variablein interfaceCommandWithVariables<FailJobCommandStep1.FailJobCommandStep2>- Parameters:
key- the key of the variable as stringvalue- the value of the variable as object- Returns:
- the builder for this command. Call
FinalCommandStep.send()to complete the command and send it to the broker.
-