Package io.zeebe.client.impl.command
Class CreateWorkflowInstanceWithResultCommandImpl
- java.lang.Object
-
- io.zeebe.client.impl.command.CreateWorkflowInstanceWithResultCommandImpl
-
- All Implemented Interfaces:
CreateWorkflowInstanceCommandStep1.CreateWorkflowInstanceWithResultCommandStep1
,FinalCommandStep<WorkflowInstanceResult>
public final class CreateWorkflowInstanceWithResultCommandImpl extends Object implements CreateWorkflowInstanceCommandStep1.CreateWorkflowInstanceWithResultCommandStep1
-
-
Constructor Summary
Constructors Constructor Description CreateWorkflowInstanceWithResultCommandImpl(ZeebeObjectMapper objectMapper, GatewayGrpc.GatewayStub asyncStub, GatewayOuterClass.CreateWorkflowInstanceRequest.Builder builder, Predicate<Throwable> retryPredicate, Duration requestTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateWorkflowInstanceCommandStep1.CreateWorkflowInstanceWithResultCommandStep1
fetchVariables(String... fetchVariables)
Set a list of variables names which should be fetched in the response.CreateWorkflowInstanceCommandStep1.CreateWorkflowInstanceWithResultCommandStep1
fetchVariables(List<String> fetchVariables)
Set a list of variables names which should be fetched in the response.FinalCommandStep<WorkflowInstanceResult>
requestTimeout(Duration requestTimeout)
Sets the request timeout for the command.ZeebeFuture<WorkflowInstanceResult>
send()
Sends the command to the Zeebe broker.
-
-
-
Constructor Detail
-
CreateWorkflowInstanceWithResultCommandImpl
public CreateWorkflowInstanceWithResultCommandImpl(ZeebeObjectMapper objectMapper, GatewayGrpc.GatewayStub asyncStub, GatewayOuterClass.CreateWorkflowInstanceRequest.Builder builder, Predicate<Throwable> retryPredicate, Duration requestTimeout)
-
-
Method Detail
-
requestTimeout
public FinalCommandStep<WorkflowInstanceResult> 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<WorkflowInstanceResult>
- Parameters:
requestTimeout
- the request timeout- Returns:
- the configured command
-
send
public ZeebeFuture<WorkflowInstanceResult> 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<WorkflowInstanceResult>
- Returns:
- a future tracking state of success/failure of the command.
-
fetchVariables
public CreateWorkflowInstanceCommandStep1.CreateWorkflowInstanceWithResultCommandStep1 fetchVariables(List<String> fetchVariables)
Description copied from interface:CreateWorkflowInstanceCommandStep1.CreateWorkflowInstanceWithResultCommandStep1
Set a list of variables names which should be fetched in the response.- Specified by:
fetchVariables
in interfaceCreateWorkflowInstanceCommandStep1.CreateWorkflowInstanceWithResultCommandStep1
- 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 CreateWorkflowInstanceCommandStep1.CreateWorkflowInstanceWithResultCommandStep1 fetchVariables(String... fetchVariables)
Description copied from interface:CreateWorkflowInstanceCommandStep1.CreateWorkflowInstanceWithResultCommandStep1
Set a list of variables names which should be fetched in the response.- Specified by:
fetchVariables
in interfaceCreateWorkflowInstanceCommandStep1.CreateWorkflowInstanceWithResultCommandStep1
- 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
-
-