Class CorrelateMessageCommandImpl
- All Implemented Interfaces:
CommandWithTenantStep<CorrelateMessageCommandStep1.CorrelateMessageCommandStep3>,CommandWithVariables<CorrelateMessageCommandStep1.CorrelateMessageCommandStep3>,CorrelateMessageCommandStep1,CorrelateMessageCommandStep1.CorrelateMessageCommandStep2,CorrelateMessageCommandStep1.CorrelateMessageCommandStep3,FinalCommandStep<CorrelateMessageResponse>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.client.api.command.CorrelateMessageCommandStep1
CorrelateMessageCommandStep1.CorrelateMessageCommandStep2, CorrelateMessageCommandStep1.CorrelateMessageCommandStep3 -
Field Summary
Fields inherited from class io.camunda.client.impl.command.CommandWithVariables
objectMapperFields inherited from interface io.camunda.client.api.command.CommandWithTenantStep
DEFAULT_TENANT_IDENTIFIER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncorrelationKey(String correlationKey) Set the value of the correlation key of the message.messageName(String messageName) Set the name of the message.requestTimeout(Duration requestTimeout) Sets the request timeout for the command.send()Sends the command to the Camunda gateway.protected CorrelateMessageCommandImplsetVariablesInternal(String variables) 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.Skip specifying a correlation key for the message.Methods inherited from class io.camunda.client.impl.command.CommandWithVariables
variable, variables, variables, variables, variables
-
Constructor Details
-
CorrelateMessageCommandImpl
-
-
Method Details
-
messageName
Description copied from interface:CorrelateMessageCommandStep1Set the name of the message.- Specified by:
messageNamein interfaceCorrelateMessageCommandStep1- Parameters:
messageName- the name of the message- Returns:
- the builder for this command
-
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<CorrelateMessageCommandStep1.CorrelateMessageCommandStep3>- 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
-
correlationKey
public CorrelateMessageCommandStep1.CorrelateMessageCommandStep3 correlationKey(String correlationKey) Description copied from interface:CorrelateMessageCommandStep1.CorrelateMessageCommandStep2Set the value of the correlation key of the message.This value will be used together with the message name to find matching message subscriptions.
- Specified by:
correlationKeyin interfaceCorrelateMessageCommandStep1.CorrelateMessageCommandStep2- Parameters:
correlationKey- the correlation key value of the message- Returns:
- the builder for this command
-
withoutCorrelationKey
Description copied from interface:CorrelateMessageCommandStep1.CorrelateMessageCommandStep2Skip specifying a correlation key for the message.This method allows the message to be correlated without a correlation key, making it suitable for scenarios where the correlation key is not necessary (e.g. for the message start event). When used, this will create a new process instance without checking for an active instance with the same correlation key.
- Specified by:
withoutCorrelationKeyin interfaceCorrelateMessageCommandStep1.CorrelateMessageCommandStep2- Returns:
- the builder for this command, continuing to the next step without a correlation key.
-
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<CorrelateMessageResponse>- 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<CorrelateMessageResponse>- Returns:
- a future tracking state of success/failure of the command.
-
setVariablesInternal
- Specified by:
setVariablesInternalin classCommandWithVariables<CorrelateMessageCommandImpl>
-