Package io.camunda.client.api.command
Interface ThrowErrorCommandStep1.ThrowErrorCommandStep2
- All Superinterfaces:
CommandWithVariables<ThrowErrorCommandStep1.ThrowErrorCommandStep2>,FinalCommandStep<ThrowErrorResponse>,JobCallbackFinalCommandStep<ThrowErrorResponse>
- All Known Implementing Classes:
ThrowErrorCommandImpl
- Enclosing interface:
ThrowErrorCommandStep1
public static interface ThrowErrorCommandStep1.ThrowErrorCommandStep2
extends JobCallbackFinalCommandStep<ThrowErrorResponse>, CommandWithVariables<ThrowErrorCommandStep1.ThrowErrorCommandStep2>
-
Method Summary
Modifier and TypeMethodDescriptionerrorMessage(String errorMsg) Provide an error message describing the reason for the non-technical error.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
-
errorMessage
Provide an error message describing the reason for the non-technical error. If the error is not caught by an error catch event, this message will be a part of the raised incident.- Parameters:
errorMsg- error message- 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.
newThrowErrorCommand(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<ThrowErrorCommandStep1.ThrowErrorCommandStep2>- 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<ThrowErrorCommandStep1.ThrowErrorCommandStep2>- 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<ThrowErrorCommandStep1.ThrowErrorCommandStep2>- 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<ThrowErrorCommandStep1.ThrowErrorCommandStep2>- 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<ThrowErrorCommandStep1.ThrowErrorCommandStep2>- 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.
-