Class CreateProcessInstanceWithResultCommandImpl
- All Implemented Interfaces:
CommandWithCommunicationApiStep<CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1>,CommandWithTenantStep<CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1>,CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1,FinalCommandStep<ProcessInstanceResult>
-
Field Summary
Fields inherited from interface io.camunda.client.api.command.CommandWithTenantStep
DEFAULT_TENANT_IDENTIFIER -
Constructor Summary
ConstructorsConstructorDescriptionCreateProcessInstanceWithResultCommandImpl(JsonMapper jsonMapper, GatewayGrpc.GatewayStub asyncStub, GatewayOuterClass.CreateProcessInstanceRequest.Builder grpcRequestObject, Predicate<CredentialsProvider.StatusCode> retryPredicate, Duration requestTimeout, HttpClient httpClient, boolean preferRestOverGrpc, ProcessInstanceCreationInstruction httpRequestObject) -
Method Summary
Modifier and TypeMethodDescriptionfetchVariables(String... fetchVariables) Set a list of variables names which should be fetched in the response.fetchVariables(List<String> fetchVariables) Set a list of variables names which should be fetched in the response.requestTimeout(Duration requestTimeout) Sets the request timeout for the command.send()Sends the command to the Camunda gateway.Specifies the tenant that will own any entities (e.g. process definition, process instances, etc.) resulting from this command, or that owns any entities (e.g. jobs) referred to from this command.useGrpc()Experimental: This method is under development, and as such using it may have no effect on the command builder when called.useRest()Experimental: This method is under development, and as such using it may have no effect on the command builder when called.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.client.api.command.FinalCommandStep
execute
-
Constructor Details
-
CreateProcessInstanceWithResultCommandImpl
public CreateProcessInstanceWithResultCommandImpl(JsonMapper jsonMapper, GatewayGrpc.GatewayStub asyncStub, GatewayOuterClass.CreateProcessInstanceRequest.Builder grpcRequestObject, Predicate<CredentialsProvider.StatusCode> retryPredicate, Duration requestTimeout, HttpClient httpClient, boolean preferRestOverGrpc, ProcessInstanceCreationInstruction httpRequestObject)
-
-
Method Details
-
requestTimeout
Description copied from interface:FinalCommandStepSets the request timeout for the command. The default request timeout can be configured usingCamundaClientBuilder.defaultRequestTimeout(Duration).- Specified by:
requestTimeoutin interfaceFinalCommandStep<ProcessInstanceResult>- Parameters:
requestTimeout- the request timeout- Returns:
- the configured command
-
send
Description copied from interface:FinalCommandStepSends the command to the Camunda gateway. This operation is asynchronous. In case of success, the future returns the event that was generated by the Camunda gateway in response to the command.Call
CamundaFuture.join()to wait until the response is available.Future<JobEventinvalid input: '>' future = command.send(); JobEvent event = future.join();- Specified by:
sendin 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.CreateProcessInstanceWithResultCommandStep1Set a list of variables names which should be fetched in the response.- Specified by:
fetchVariablesin 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.CreateProcessInstanceWithResultCommandStep1Set a list of variables names which should be fetched in the response.- Specified by:
fetchVariablesin 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
-
tenantId
public CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1 tenantId(String tenantId) Description copied from interface:CommandWithTenantStepSpecifies the tenant that will own any entities (e.g. process definition, process instances, etc.) resulting from this command, or that owns any entities (e.g. jobs) referred to from this command.Multi-tenancy
Multiple tenants can share a Camunda cluster. Entities can be assigned to a specific tenant using an identifier. Only that tenant can access these entities.
Any entities created before multi-tenancy has been enabled in the Camunda cluster, are assigned to the
CommandWithTenantStep.DEFAULT_TENANT_IDENTIFIER.If no tenant is explicitly specified, then the command is rejected.
- Specified by:
tenantIdin interfaceCommandWithTenantStep<CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1>- Parameters:
tenantId- the identifier of the tenant to specify for this command, e.g."ACME"- Returns:
- the builder for this command with the tenant specified
-
useRest
Description copied from interface:CommandWithCommunicationApiStepExperimental: This method is under development, and as such using it may have no effect on the command builder when called. While unimplemented, it simply returns the command builder instance unchanged. This method already exists for software that is building support for a REST API in Camunda, and already wants to use this API during its development. As support for REST is added to Camunda, each of the commands that implement this method may start to take effect. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Sets REST as the communication API for this command. If this command doesn't support communication over REST, it simply returns the command builder instance unchanged. The default communication API can be configured using
CamundaClientBuilder.preferRestOverGrpc(boolean).- Specified by:
useRestin interfaceCommandWithCommunicationApiStep<CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1>- Returns:
- the configured command
-
useGrpc
Description copied from interface:CommandWithCommunicationApiStepExperimental: This method is under development, and as such using it may have no effect on the command builder when called. While unimplemented, it simply returns the command builder instance unchanged. This method already exists for software that is building support for a REST API in Camunda, and already wants to use this API during its development. As support for REST is added to Zeebe, each of the commands that implement this method may start to take effect. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Sets gRPC as the communication API for this command. If this command doesn't support communication over gRPC, it simply returns the command builder instance unchanged. The default communication API can be configured using
CamundaClientBuilder.preferRestOverGrpc(boolean).- Specified by:
useGrpcin interfaceCommandWithCommunicationApiStep<CreateProcessInstanceCommandStep1.CreateProcessInstanceWithResultCommandStep1>- Returns:
- the configured command
-