public interface CorrelatorDAO
Data access object representing a correlator. A correlator does not have a simple explanation: it acts as match-maker connecting messages with message consumers (i.e. BPEL pick and receive operations) across time. For each partnerLink "myRole" and operation there is one correlator.
The correlator functions as a two-sided queue: when a message is received the correlator is used to dequeue a consumer based on the keys from the message. If no consumer matches the keys in the message, the message itself is enqueued along with its keys. Conversely, when a BPEL pick/receive operation is performed, the correlator is used to dequeue a message matching a given correlation key. If no message is found, the consumer (i.e. the pick/receive operation) is enqueued along with the target key.
The end result is matching of messages to pick/receive operations, irrespective of whether the operation or the message arrives first. Make sense?
Modifier and Type | Method and Description |
---|---|
void |
addRoute(java.lang.String routeGroupId,
ProcessInstanceDAO target,
int index,
CorrelationKeySet correlationKeySet,
java.lang.String routePolicy)
Add a route from the given correlation key to the given process instance.
|
boolean |
checkRoute(CorrelationKeySet correlationKeySet)
Check if corresponding key set is free to register (see ODE-804)
|
MessageExchangeDAO |
dequeueMessage(CorrelationKeySet correlationKeySet)
Dequeue a message exchange matching a correlationKey constraint.
|
void |
enqueueMessage(MessageExchangeDAO mex,
CorrelationKeySet correlationKeySet)
Enqueue a message exchange to the queue with a set of correlation keys.
|
java.util.List<MessageRouteDAO> |
findRoute(CorrelationKeySet correlationKeySet)
Deprecated.
Find a route matching the given correlation key.
|
java.util.List<MessageRouteDAO> |
findRoute(CorrelationKeySet correlationKeySet,
boolean isCorrleationKeySetPreInitialized)
Find a route matching the given correlation key set.
|
java.util.Collection<CorrelatorMessageDAO> |
getAllMessages() |
java.util.Collection<MessageRouteDAO> |
getAllRoutes() |
java.lang.String |
getCorrelatorId()
Get the correlator identifier.
|
void |
removeRoutes(java.lang.String routeGroupId,
ProcessInstanceDAO target)
Remove all routes with the given route-group identifier.
|
void |
setCorrelatorId(java.lang.String newId) |
java.lang.String getCorrelatorId()
void setCorrelatorId(java.lang.String newId)
void enqueueMessage(MessageExchangeDAO mex, CorrelationKeySet correlationKeySet)
mex
- message exchangecorrelationKeys
- pre-computed set of correlation keys for this messageMessageExchangeDAO dequeueMessage(CorrelationKeySet correlationKeySet)
correlationKey
- correlation correlationKey constraintjava.util.Collection<CorrelatorMessageDAO> getAllMessages()
java.util.List<MessageRouteDAO> findRoute(CorrelationKeySet correlationKeySet)
correlationKey
- correlation keyfindRoute(CorrelationKeySet correlationKeySet,boolean isCorrleationKeySetPreInitialized)
boolean checkRoute(CorrelationKeySet correlationKeySet)
correlationKeySet
- void addRoute(java.lang.String routeGroupId, ProcessInstanceDAO target, int index, CorrelationKeySet correlationKeySet, java.lang.String routePolicy)
routeGroupId
- identifier of the group of routes to which this route belongstarget
- target process instanceindex
- relative order in which the route should be consideredcorrelationKey
- correlation key to matchvoid removeRoutes(java.lang.String routeGroupId, ProcessInstanceDAO target)
routeGroupId
- java.util.Collection<MessageRouteDAO> getAllRoutes()
java.util.List<MessageRouteDAO> findRoute(CorrelationKeySet correlationKeySet, boolean isCorrleationKeySetPreInitialized)
correlationKeySet
- correlation keyisCorrleationKeySetPreInitialized
-