Package org.camunda.bpm.engine.runtime
Interface MessageCorrelationAsyncBuilder
-
- All Known Implementing Classes:
MessageCorrelationAsyncBuilderImpl
public interface MessageCorrelationAsyncBuilderA fluent builder for defining asynchronous message correlation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BatchcorrelateAllAsync()Correlates a message asynchronously to executions that are waiting for this message based on the provided queries and list of process instance ids, whereby query results and list of ids will be merged.MessageCorrelationAsyncBuilderhistoricProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery)Correlate the message such that the process instances found by the given query are selected.MessageCorrelationAsyncBuilderprocessInstanceIds(java.util.List<java.lang.String> ids)Correlate the message such that the process instances with the given ids are selected.MessageCorrelationAsyncBuilderprocessInstanceQuery(ProcessInstanceQuery processInstanceQuery)Correlate the message such that the process instances found by the given query are selected.MessageCorrelationAsyncBuildersetVariable(java.lang.String variableName, java.lang.Object variableValue)Pass a variable to the execution waiting on the message.MessageCorrelationAsyncBuildersetVariables(java.util.Map<java.lang.String,java.lang.Object> variables)Pass a map of variables to the execution waiting on the message.
-
-
-
Method Detail
-
processInstanceIds
MessageCorrelationAsyncBuilder processInstanceIds(java.util.List<java.lang.String> ids)
Correlate the message such that the process instances with the given ids are selected.
- Parameters:
ids- the ids of the process instances to correlate to; at least one ofprocessInstanceIds(List),processInstanceQuery(ProcessInstanceQuery), orhistoricProcessInstanceQuery(HistoricProcessInstanceQuery)has to be set.- Returns:
- the builder
- Throws:
NullValueException- whenidsisnull
-
processInstanceQuery
MessageCorrelationAsyncBuilder processInstanceQuery(ProcessInstanceQuery processInstanceQuery)
Correlate the message such that the process instances found by the given query are selected.
- Parameters:
processInstanceQuery- the query to select process instances to correlate to; at least one ofprocessInstanceIds(List),processInstanceQuery(ProcessInstanceQuery), orhistoricProcessInstanceQuery(HistoricProcessInstanceQuery)has to be set.- Returns:
- the builder
- Throws:
NullValueException- whenprocessInstanceQueryisnull
-
historicProcessInstanceQuery
MessageCorrelationAsyncBuilder historicProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery)
Correlate the message such that the process instances found by the given query are selected.
- Parameters:
historicProcessInstanceQuery- the query to select process instances to correlate to; at least one ofprocessInstanceIds(List),processInstanceQuery(ProcessInstanceQuery), orhistoricProcessInstanceQuery(HistoricProcessInstanceQuery)has to be set.- Returns:
- the builder
- Throws:
NullValueException- whenhistoricProcessInstanceQueryisnull
-
setVariable
MessageCorrelationAsyncBuilder setVariable(java.lang.String variableName, java.lang.Object variableValue)
Pass a variable to the execution waiting on the message. Use this method for passing the message's payload.
Invoking this method multiple times allows passing multiple variables.
- Parameters:
variableName- the name of the variable to setvariableValue- the value of the variable to set- Returns:
- the builder
- Throws:
NullValueException- whenvariableNameisnull
-
setVariables
MessageCorrelationAsyncBuilder setVariables(java.util.Map<java.lang.String,java.lang.Object> variables)
Pass a map of variables to the execution waiting on the message. Use this method for passing the message's payload
- Parameters:
variables- the map of variables- Returns:
- the builder
-
correlateAllAsync
Batch correlateAllAsync()
Correlates a message asynchronously to executions that are waiting for this message based on the provided queries and list of process instance ids, whereby query results and list of ids will be merged.- Returns:
- the batch which correlates the message asynchronously
- Throws:
NullValueException- when neitherprocessInstanceIds(List),processInstanceQuery(ProcessInstanceQuery), norhistoricProcessInstanceQuery(HistoricProcessInstanceQuery)} have been setBadUserRequestException- when no process instances are found with the given ids or queriesAuthorizationException- when the user has noBatchPermissions.CREATEorBatchPermissions.CREATE_BATCH_SET_VARIABLESpermission onResources.BATCH
-
-