Package org.camunda.bpm.engine.runtime
Interface MessageCorrelationAsyncBuilder
-
- All Known Implementing Classes:
MessageCorrelationAsyncBuilderImpl
public interface MessageCorrelationAsyncBuilder
A fluent builder for defining asynchronous message correlation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.MessageCorrelationAsyncBuilder
historicProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery)
Correlate the message such that the process instances found by the given query are selected.MessageCorrelationAsyncBuilder
processInstanceIds(List<String> ids)
Correlate the message such that the process instances with the given ids are selected.MessageCorrelationAsyncBuilder
processInstanceQuery(ProcessInstanceQuery processInstanceQuery)
Correlate the message such that the process instances found by the given query are selected.MessageCorrelationAsyncBuilder
setVariable(String variableName, Object variableValue)
Pass a variable to the execution waiting on the message.MessageCorrelationAsyncBuilder
setVariables(Map<String,Object> variables)
Pass a map of variables to the execution waiting on the message.
-
-
-
Method Detail
-
processInstanceIds
MessageCorrelationAsyncBuilder processInstanceIds(List<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
- whenids
isnull
-
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
- whenprocessInstanceQuery
isnull
-
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
- whenhistoricProcessInstanceQuery
isnull
-
setVariable
MessageCorrelationAsyncBuilder setVariable(String variableName, 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
- whenvariableName
isnull
-
setVariables
MessageCorrelationAsyncBuilder setVariables(Map<String,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.CREATE
orBatchPermissions.CREATE_BATCH_SET_VARIABLES
permission onResources.BATCH
-
-