Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ode.bpel.dao
Interface CorrelatorDAO

All Known Implementing Classes:
  CorrelatorDAOImpl

    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?

Method Summary
`void` | `addRoute(java.lang.String routeGroupId, ProcessInstanceDAO target, int index, CorrelationKey correlationKey)` Add a route from the given correlation key to the given process instance.
`MessageExchangeDAO` | `dequeueMessage(CorrelationKey correlationKey)` Dequeue a message exchange matching a correlationKey constraint.
`void` | `enqueueMessage(MessageExchangeDAO mex, CorrelationKey[] correlationKeys)` Enqueue a message exchange to the queue with a set of correlation keys.
`MessageRouteDAO` | `findRoute(CorrelationKey correlationKey)` Find a route matching the given correlation key.
`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.

Method Detail

### getCorrelatorId

    java.lang.String getCorrelatorId()

  Get the correlator identifier.

  Returns:
    correlator identifier

### enqueueMessage

    void enqueueMessage(MessageExchangeDAO mex,
                        CorrelationKey[] correlationKeys)

  Enqueue a message exchange to the queue with a set of correlation keys.

  Parameters:
    `mex` - message exchange
    `correlationKeys` - pre-computed set of correlation keys for this message

### dequeueMessage

    MessageExchangeDAO dequeueMessage(CorrelationKey correlationKey)

  Dequeue a message exchange matching a correlationKey constraint.

  Parameters:
    `correlationKey` - correlation correlationKey constraint
  Returns:
    opaque message-related data previously enqueued with the given correlation correlationKey

### findRoute

    MessageRouteDAO findRoute(CorrelationKey correlationKey)

  Find a route matching the given correlation key.

  Parameters:
    `correlationKey` - correlation key
  Returns:
    route matching the given correlation key

### addRoute

    void addRoute(java.lang.String routeGroupId,
                  ProcessInstanceDAO target,
                  int index,
                  CorrelationKey correlationKey)

  Add a route from the given correlation key to the given process instance.

  Parameters:
    `routeGroupId` - identifier of the group of routes to which this route belongs
    `target` - target process instance
    `index` - relative order in which the route should be considered
    `correlationKey` - correlation key to match

### removeRoutes

    void removeRoutes(java.lang.String routeGroupId,
                      ProcessInstanceDAO target)

  Remove all routes with the given route-group identifier.

  Parameters:
    `routeGroupId` -

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD