Interface CompleteJobCommandStep1
- All Superinterfaces:
CommandWithCommunicationApiStep<CompleteJobCommandStep1>,CommandWithVariables<CompleteJobCommandStep1>,FinalCommandStep<CompleteJobResponse>,JobCallbackFinalCommandStep<CompleteJobResponse>
- All Known Implementing Classes:
CompleteJobCommandImpl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface -
Method Summary
Modifier and TypeMethodDescriptionSet a single variable to complete the job with.variables(InputStream variables) Set the variables to complete the job with.Set the variables to complete the job with.Set the variables to complete the job with.Set the variables to complete the job with.withBusinessId(String businessId) Assigns the given business id to the job's root process instance as part of completing the job, letting a worker derive the identifier from work it just performed.withLeaseToken(String leaseToken) Sets the lease token identifying the job's activation, fencing this command against a superseded activation of the same job.withResult(Function<CompleteJobCommandStep1.CompleteJobCommandJobResultStep, CompleteJobResult> consumer) Initializes the job result to allow followup actions to be configured.Methods inherited from interface io.camunda.client.api.command.CommandWithCommunicationApiStep
useGrpc, useRestMethods inherited from interface io.camunda.client.api.command.FinalCommandStep
execute, requestTimeout, send
-
Method Details
-
variables
Set the variables to complete the job with.- Specified by:
variablesin interfaceCommandWithVariables<CompleteJobCommandStep1>- 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 to complete the job with.- Specified by:
variablesin interfaceCommandWithVariables<CompleteJobCommandStep1>- 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 to complete the job with.- Specified by:
variablesin interfaceCommandWithVariables<CompleteJobCommandStep1>- 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 to complete the job with.- Specified by:
variablesin interfaceCommandWithVariables<CompleteJobCommandStep1>- 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 to complete the job with.- Specified by:
variablein interfaceCommandWithVariables<CompleteJobCommandStep1>- 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.
-
withResult
CompleteJobCommandStep1 withResult(Function<CompleteJobCommandStep1.CompleteJobCommandJobResultStep, CompleteJobResult> consumer) Initializes the job result to allow followup actions to be configured.- Returns:
- the builder for this command.
-
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.
newCompleteCommand(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.
-
withBusinessId
Assigns the given business id to the job's root process instance as part of completing the job, letting a worker derive the identifier from work it just performed.The assignment is single and irreversible and is only accepted while business id uniqueness is disabled. Only artifacts created after the assignment carry the business id; already-existing ones are not enriched. Completing with a business id that differs from one already assigned rejects the whole completion, leaving the job open; re-sending the identical business id is an idempotent no-op.
Passing
nullleaves the business id unset (no assignment is requested). A blank business id is rejected with anIllegalArgumentException.- Parameters:
businessId- the business id to assign to the root process instance- Returns:
- the builder for this command. Call
FinalCommandStep.send()to complete the command and send it to the broker. - Throws:
IllegalArgumentException- ifbusinessIdis blank
-