Package io.zeebe.client.impl.command
Class CreateProcessInstanceWithResultCommandImpl
- java.lang.Object
-
- io.zeebe.client.impl.command.CreateProcessInstanceWithResultCommandImpl
-
- All Implemented Interfaces:
CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1
,FinalCommandStep<ProcessInstanceResult>
public final class CreateProcessInstanceWithResultCommandImpl extends Object implements CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1
-
-
Constructor Summary
Constructors Constructor Description CreateProcessInstanceWithResultCommandImpl(JsonMapper jsonMapper, GatewayGrpc.GatewayStub asyncStub, GatewayOuterClass.CreateProcessInstanceRequest.Builder builder, Predicate<Throwable> retryPredicate, Duration requestTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1
fetchVariables(String... fetchVariables)
Set a list of variables names which should be fetched in the response.CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1
fetchVariables(List<String> fetchVariables)
Set a list of variables names which should be fetched in the response.FinalCommandStep<ProcessInstanceResult>
requestTimeout(Duration requestTimeout)
Sets the request timeout for the command.ZeebeFuture<ProcessInstanceResult>
send()
Sends the command to the Zeebe broker.
-
-
-
Constructor Detail
-
CreateProcessInstanceWithResultCommandImpl
public CreateProcessInstanceWithResultCommandImpl(JsonMapper jsonMapper, GatewayGrpc.GatewayStub asyncStub, GatewayOuterClass.CreateProcessInstanceRequest.Builder builder, Predicate<Throwable> retryPredicate, Duration requestTimeout)
-
-
Method Detail
-
requestTimeout
public FinalCommandStep<ProcessInstanceResult> requestTimeout(Duration 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<ProcessInstanceResult>
- Parameters:
requestTimeout
- the request timeout- Returns:
- the configured command
-
send
public ZeebeFuture<ProcessInstanceResult> 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<JobEvent> future = command.send(); JobEvent event = future.join();
- Specified by:
send
in interfaceFinalCommandStep<ProcessInstanceResult>
- Returns:
- a future tracking state of success/failure of the command.
-
fetchVariables
public CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1 fetchVariables(List<String> fetchVariables)
Description copied from interface:CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1
Set a list of variables names which should be fetched in the response.- Specified by:
fetchVariables
in interfaceCreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1
- Parameters:
fetchVariables
- set of names of variables to be included in the response- Returns:
- the builder for this command. Call
FinalCommandStep.send()
to complete the command and send * it to the broker
-
fetchVariables
public CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1 fetchVariables(String... fetchVariables)
Description copied from interface:CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1
Set a list of variables names which should be fetched in the response.- Specified by:
fetchVariables
in interfaceCreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1
- Parameters:
fetchVariables
- set of names of variables to be included in the response- Returns:
- the builder for this command. Call
FinalCommandStep.send()
to complete the command and send * it to the broker
-
-