Class CompleteUserTaskCommandImpl
java.lang.Object
io.camunda.zeebe.client.impl.command.CompleteUserTaskCommandImpl
- All Implemented Interfaces:
CompleteUserTaskCommandStep1
,FinalCommandStep<CompleteUserTaskResponse>
public final class CompleteUserTaskCommandImpl
extends Object
implements CompleteUserTaskCommandStep1
This command implementation currently does not extend
CommandWithVariables
since we would
have to handle a String-ified JSON variables object. The request object itself expects a Map
though. In the future, we might extend this to also allow all options from CommandWithVariables
here.-
Constructor Summary
ConstructorsConstructorDescriptionCompleteUserTaskCommandImpl
(HttpClient httpClient, JsonMapper jsonMapper, long userTaskKey) -
Method Summary
Modifier and TypeMethodDescriptionSet the custom action to complete the user task with.requestTimeout
(Duration requestTimeout) Sets the request timeout for the command.send()
Sends the command to the Zeebe broker.Set the variables to complete the user task with.
-
Constructor Details
-
CompleteUserTaskCommandImpl
-
-
Method Details
-
requestTimeout
Description copied from interface:FinalCommandStep
Sets the request timeout for the command. The default request timeout can be configured usingZeebeClientBuilder.defaultRequestTimeout(Duration)
.- Specified by:
requestTimeout
in interfaceFinalCommandStep<CompleteUserTaskResponse>
- Parameters:
requestTimeout
- the request timeout- Returns:
- the configured command
-
send
Description copied from interface:FinalCommandStep
Sends the command to the Zeebe broker. This operation is asynchronous. In case of success, the future returns the event that was generated by the Zeebe broker in response to the command.Call
ZeebeFuture.join()
to wait until the response is available.Future<JobEventinvalid input: '>' future = command.send(); JobEvent event = future.join();
- Specified by:
send
in interfaceFinalCommandStep<CompleteUserTaskResponse>
- Returns:
- a future tracking state of success/failure of the command.
-
action
Description copied from interface:CompleteUserTaskCommandStep1
Set the custom action to complete the user task with.- Specified by:
action
in interfaceCompleteUserTaskCommandStep1
- Parameters:
action
- the action value- Returns:
- the builder for this command. Call
FinalCommandStep.send()
to complete the command and send it to the broker.
-
variables
Description copied from interface:CompleteUserTaskCommandStep1
Set the variables to complete the user task with.- Specified by:
variables
in interfaceCompleteUserTaskCommandStep1
- 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.
-