org.apache.ode.bpel.dao

## Interface ProcessDAO

- All Known Implementing Classes:
    ProcessDaoImpl, ProcessDAOImpl

      public interface ProcessDAO

  BPEL process data access objects. Contains references to active process instances (`ProcessInstanceDAO` and messages bound for instances yet to be created or not yet correlated..

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CorrelatorDAO` | `addCorrelator(java.lang.String correlator)`
    `ProcessInstanceDAO` | `createInstance(CorrelatorDAO instantiatingCorrelator)` Create a new process instance object.
    `void` | `deleteProcessAndRoutes()` Deletes only the process and routes without instances.
    `java.util.Collection<ProcessInstanceDAO>` | `findInstance(CorrelationKey cckey)` Locates a process instance based on a correlation key.
    `java.util.Collection<ProcessInstanceDAO>` | `findInstance(CorrelationKey ckey, short processInstanceState)` Find process instances that matches correlation key and instance state
    `java.util.Collection<ProcessInstanceDAO>` | `getActiveInstances()`
    `CorrelatorDAO` | `getCorrelator(java.lang.String correlatorId)` Get a message correlator instance.
    `java.lang.String` | `getGuid()`
    `ProcessInstanceDAO` | `getInstance(java.lang.Long iid)` Get a process instance (by identifier).
    `int` | `getNumInstances()`
    `javax.xml.namespace.QName` | `getProcessId()` Get the unique process identifier.
    `javax.xml.namespace.QName` | `getType()` Get the BPEL process name.
    `long` | `getVersion()` Get the process version
    `void` | `instanceCompleted(ProcessInstanceDAO instance)` Callback indicating that a process instance has completed its duties.
    `void` | `removeRoutes(java.lang.String routeId, ProcessInstanceDAO target)` Remove the routes with the given Id for all the correlators in the process.

- - ### Method Detail

    - #### getProcessId

          javax.xml.namespace.QName getProcessId()

      Get the unique process identifier.
      Returns:
        process identifier

    - #### getType

          javax.xml.namespace.QName getType()

      Get the BPEL process name.
      Returns:
        qualified BPEL process name.

    - #### getVersion

          long getVersion()

      Get the process version
      Returns:
        version

    - #### getCorrelator

          CorrelatorDAO getCorrelator(java.lang.String correlatorId)

      Get a message correlator instance.
      Parameters:
        `correlatorId` - correlator identifier
      Returns:
        correlator corresponding to the given identifier

    - #### createInstance

          ProcessInstanceDAO createInstance(CorrelatorDAO instantiatingCorrelator)

      Create a new process instance object.
      Parameters:
        `instantiatingCorrelator` - instantiating `CorrelatorDAO`
      Returns:
        newly generated instance DAO

    - #### getInstance

          ProcessInstanceDAO getInstance(java.lang.Long iid)

      Get a process instance (by identifier).
      Parameters:
        `iid` - unique instance identifier.
      Returns:
        DAO corresponding to the process instance

    - #### findInstance

          java.util.Collection<ProcessInstanceDAO> findInstance(CorrelationKey cckey)

      Locates a process instance based on a correlation key.
      Parameters:
        `cckey` - correlation key
      Returns:
        collection of `ProcessInstanceDAO` that match correlation key, ordered by date

    - #### removeRoutes

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

      Remove the routes with the given Id for all the correlators in the process.
      Parameters:
        `routeId` -

    - #### instanceCompleted

          void instanceCompleted(ProcessInstanceDAO instance)

      Callback indicating that a process instance has completed its duties.
      Parameters:
        `instance` - the completed `ProcessInstanceDAO`

    - #### deleteProcessAndRoutes

          void deleteProcessAndRoutes()

      Deletes only the process and routes without instances. This also deletes any static data to the process: correlators.

    - #### addCorrelator

          CorrelatorDAO addCorrelator(java.lang.String correlator)

    - #### getGuid

          java.lang.String getGuid()

    - #### getNumInstances

          int getNumInstances()

    - #### getActiveInstances

          java.util.Collection<ProcessInstanceDAO> getActiveInstances()

      Returns:
        all instances that haven't completed, use with care as there could be a lot of them

    - #### findInstance

          java.util.Collection<ProcessInstanceDAO> findInstance(CorrelationKey ckey,
                                                              short processInstanceState)

      Find process instances that matches correlation key and instance state
      Parameters:
        `ckey` - Correlation key
        `processInstanceState` - Instance state org.apache.ode.bpel.common.ProcessState
      Returns:
        collection of `ProcessInstanceDAO` that match correlation key, instance state