org.apache.ode.bpel.engine

## Class BpelManagementFacadeImpl

- java.lang.Object
- - org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl
  - - org.apache.ode.bpel.engine.BpelManagementFacadeImpl

- All Implemented Interfaces:
    BpelManagementFacade, InstanceManagement, ProcessManagement

      public class BpelManagementFacadeImpl
      extends ProcessAndInstanceManagementImpl
      implements BpelManagementFacade

  Implementation of the instance/process management interaction. This class implements the methods necessary to support process debugging. It also implements all the methods in the newer Process/Instance Management interface (pmapi).

- - ### Field Summary

    - ### Fields inherited from class org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl

      `__log, __msgs, __psc, _calendar, _db, _server, _store`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BpelManagementFacadeImpl(BpelServer server, ProcessStore store)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ActivityBreakpoint` | `addActivityBreakpoint(java.lang.Long iid, java.lang.String activity)` Adds an activity breakpoint.
    `ActivityBreakpoint` | `addGlobalActivityBreakpoint(java.lang.String procid, java.lang.String activity)` Adds an global activity breakpoint.
    `VariableModificationBreakpoint` | `addVariableModificationBreakpoint(java.lang.Long iid, java.lang.String scopename, java.lang.String variable)` Adds a variable modification breakpoint.
    `Breakpoint[]` | `getBreakpoints(java.lang.Long iid)` Returns the breakpoints registered with the process instance.
    `javax.xml.namespace.QName` | `getCompletedFault(java.lang.Long iid)` Gets the fault associated with a completed process instance.
    `CorrelationKey` | `getCorrelation(java.lang.Long iid, java.lang.Long scopeId, java.lang.String correlationSet)` Gets a correlation.
    `int` | `getEventCount(java.lang.Long iid)` Get the current number of events for an instance.
    `EventInfoListDocument` | `getEvents(java.lang.Long iid, int startIdx, int count)` Get exeuction event history for a process instance.
    `Breakpoint[]` | `getGlobalBreakpoints(java.lang.String procId)` Returns the global breakpoints registered with the process instance.
    `OProcess` | `getProcessDef(java.lang.String procid)` Return the process model.
    `java.lang.Long` | `getProcessInstance(java.lang.String pid, CorrelationKey ckey)` Get the process instance with the given correlation correlationKey.
    `java.lang.Long[]` | `getScopeInstancesForScope(java.lang.Long iid, java.lang.String scopeName)` Returns all the scope instance ids for a given instance and scope name.
    `java.util.Date` | `getStartTime(java.lang.Long iid)` Get the time that a process instance was started (created).
    `short` | `getState(java.lang.Long iid)` Get the state of a process instance.
    `java.lang.String` | `getVariable(java.lang.Long iid, java.lang.Long scopeId, java.lang.String varName)` Gets variable data.
    `void` | `removeBreakpoint(java.lang.Long iid, Breakpoint sp)` Removes a breakpoint
    `void` | `removeGlobalBreakpoint(java.lang.String procid, Breakpoint sp)` Removes a global breakpoint
    `void` | `setCorrelation(java.lang.Long iid, java.lang.Long scopeId, java.lang.String correlationSet, javax.xml.namespace.QName[] propertyNames, CorrelationKey values)` Sets a correlation.
    `void` | `setVariable(java.lang.Long pid, java.lang.Long scopeId, java.lang.String varName, java.lang.String data)` Sets a variable
    `void` | `step(java.lang.Long iid)` Single step through a process instance.

    - ### Methods inherited from class org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl

      `activate, dbexec, dbexec, delete, fault, getCommunication, getDebugger, getDebugger, getEventTimeline, getExtensibilityElements, getInstanceInfo, getProcessInfo, getProcessInfoCustom, getScopeInfo, getScopeInfoWithActivity, getVariableInfo, listAllInstances, listAllInstancesWithLimit, listAllProcesses, listEvents, listInstances, listInstancesSummary, listProcesses, listProcessesCustom, listProcessesSummaryOnly, queryInstances, recoverActivity, replay, resume, setPackageRetired, setProcessProperty, setProcessPropertyNode, setRetired, setVariable, suspend, terminate`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.ode.bpel.pmapi.ProcessManagement

      `activate, getExtensibilityElements, getProcessInfo, getProcessInfoCustom, listAllProcesses, listProcesses, listProcessesCustom, listProcessesSummaryOnly, setPackageRetired, setProcessProperty, setProcessPropertyNode, setRetired`

    - ### Methods inherited from interface org.apache.ode.bpel.pmapi.InstanceManagement

      `delete, fault, getEventTimeline, getInstanceInfo, getScopeInfo, getScopeInfoWithActivity, getVariableInfo, listAllInstances, listAllInstancesWithLimit, listEvents, listInstances, listInstancesSummary, queryInstances, recoverActivity, resume, suspend, terminate`

- - ### Constructor Detail

    - #### BpelManagementFacadeImpl

          public BpelManagementFacadeImpl(BpelServer server,
                                  ProcessStore store)

  - ### Method Detail

    - #### getState

          public short getState(java.lang.Long iid)
                         throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Get the state of a process instance.
      Specified by:
        `getState` in interface `BpelManagementFacade`
      Parameters:
        `iid` - process instance identifier
      Returns:
        state of the instance
      Throws:
        `ManagementException`

    - #### getProcessInstance

          public java.lang.Long getProcessInstance(java.lang.String pid,
                                          CorrelationKey ckey)
                                            throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Get the process instance with the given correlation correlationKey.
      Specified by:
        `getProcessInstance` in interface `BpelManagementFacade`
      Parameters:
        `pid` - the process identifier
        `ckey` - the correlation correlationKey to match
      Returns:
        process instance identifier of instance matching the given correlationKey
      Throws:
        `ManagementException`

    - #### getEvents

          public EventInfoListDocument getEvents(java.lang.Long iid,
                                        int startIdx,
                                        int count)
                                          throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Get exeuction event history for a process instance.
      Specified by:
        `getEvents` in interface `BpelManagementFacade`
      Parameters:
        `iid` - process instance identifier
        `startIdx` - first evet
        `count` - maximum number of events to get
      Returns:
        array of `ProcessInstanceEvent`s.
      Throws:
        `ManagementException`

    - #### getEventCount

          public int getEventCount(java.lang.Long iid)
                            throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Get the current number of events for an instance.
      Specified by:
        `getEventCount` in interface `BpelManagementFacade`
      Parameters:
        `iid` - process instance identifier
      Returns:
        number of events in event history
      Throws:
        `ManagementException`

    - #### getVariable

          public java.lang.String getVariable(java.lang.Long iid,
                                     java.lang.Long scopeId,
                                     java.lang.String varName)
                                       throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Gets variable data.
      Specified by:
        `getVariable` in interface `BpelManagementFacade`
      Returns:
      Throws:
        `ManagementException`

    - #### getScopeInstancesForScope

          public java.lang.Long[] getScopeInstancesForScope(java.lang.Long iid,
                                                   java.lang.String scopeName)
                                                     throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Returns all the scope instance ids for a given instance and scope name. Multiple scopes instances are only possible due to a BPEL 'while' activity.
      Specified by:
        `getScopeInstancesForScope` in interface `BpelManagementFacade`
      Throws:
        `ManagementException`

    - #### setVariable

          public void setVariable(java.lang.Long pid,
                         java.lang.Long scopeId,
                         java.lang.String varName,
                         java.lang.String data)

      Description copied from interface: `BpelManagementFacade`
      Sets a variable
      Specified by:
        `setVariable` in interface `BpelManagementFacade`

    - #### setCorrelation

          public void setCorrelation(java.lang.Long iid,
                            java.lang.Long scopeId,
                            java.lang.String correlationSet,
                            javax.xml.namespace.QName[] propertyNames,
                            CorrelationKey values)
                              throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Sets a correlation.
      Specified by:
        `setCorrelation` in interface `BpelManagementFacade`
        `correlationSet` - name of the correlation set
        `propertyNames` - properties to set on correlation set
        `values` - property values as a CorrelationKey object
      Throws:
        `ManagementException`

    - #### getCorrelation

          public CorrelationKey getCorrelation(java.lang.Long iid,
                                      java.lang.Long scopeId,
                                      java.lang.String correlationSet)
                                        throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Gets a correlation.
      Specified by:
        `getCorrelation` in interface `BpelManagementFacade`
      Returns:
      Throws:
        `ManagementException`

    - #### getProcessDef

          public OProcess getProcessDef(java.lang.String procid)
                                 throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Return the process model.
      Specified by:
        `getProcessDef` in interface `BpelManagementFacade`
      Parameters:
        `procid` -
      Returns:
      Throws:
        `ManagementException`
      See Also:
        `BpelManagementFacade.getProcessDef(String)`

    - #### step

          public void step(java.lang.Long iid)
                    throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Single step through a process instance.
      Specified by:
        `step` in interface `BpelManagementFacade`
      Throws:
        `ManagementException`

    - #### getCompletedFault

          public javax.xml.namespace.QName getCompletedFault(java.lang.Long iid)
                                                      throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Gets the fault associated with a completed process instance.
      Specified by:
        `getCompletedFault` in interface `BpelManagementFacade`
      Returns:
      Throws:
        `ManagementException`

    - #### getGlobalBreakpoints

          public Breakpoint[] getGlobalBreakpoints(java.lang.String procId)
                                            throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Returns the global breakpoints registered with the process instance.
      Specified by:
        `getGlobalBreakpoints` in interface `BpelManagementFacade`
      Returns:
        array of `Breakpoint`s.
      Throws:
        `ManagementException`

    - #### getBreakpoints

          public Breakpoint[] getBreakpoints(java.lang.Long iid)
                                      throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Returns the breakpoints registered with the process instance.
      Specified by:
        `getBreakpoints` in interface `BpelManagementFacade`
      Parameters:
        `iid` - process instance identifier
      Returns:
        array of `Breakpoint`s.
      Throws:
        `ManagementException`

    - #### removeGlobalBreakpoint

          public void removeGlobalBreakpoint(java.lang.String procid,
                                    Breakpoint sp)
                                      throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Removes a global breakpoint
      Specified by:
        `removeGlobalBreakpoint` in interface `BpelManagementFacade`
      Throws:
        `ManagementException`

    - #### removeBreakpoint

          public void removeBreakpoint(java.lang.Long iid,
                              Breakpoint sp)
                                throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Removes a breakpoint
      Specified by:
        `removeBreakpoint` in interface `BpelManagementFacade`
      Parameters:
        `iid` - a iid of null removes a global breakpoint.
      Throws:
        `ManagementException`

    - #### addGlobalActivityBreakpoint

          public ActivityBreakpoint addGlobalActivityBreakpoint(java.lang.String procid,
                                                       java.lang.String activity)
                                                         throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Adds an global activity breakpoint.
      Specified by:
        `addGlobalActivityBreakpoint` in interface `BpelManagementFacade`
      Returns:
      Throws:
        `ManagementException`

    - #### addActivityBreakpoint

          public ActivityBreakpoint addActivityBreakpoint(java.lang.Long iid,
                                                 java.lang.String activity)
                                                   throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Adds an activity breakpoint.
      Specified by:
        `addActivityBreakpoint` in interface `BpelManagementFacade`
      Parameters:
        `iid` - a iid of null adds a global activity breakpoint.
      Returns:
      Throws:
        `ManagementException`

    - #### addVariableModificationBreakpoint

          public VariableModificationBreakpoint addVariableModificationBreakpoint(java.lang.Long iid,
                                                                         java.lang.String scopename,
                                                                         java.lang.String variable)

      Description copied from interface: `BpelManagementFacade`
      Adds a variable modification breakpoint.
      Specified by:
        `addVariableModificationBreakpoint` in interface `BpelManagementFacade`
      Returns:

    - #### getStartTime

          public java.util.Date getStartTime(java.lang.Long iid)
                                      throws ManagementException

      Description copied from interface: `BpelManagementFacade`
      Get the time that a process instance was started (created).
      Specified by:
        `getStartTime` in interface `BpelManagementFacade`
      Parameters:
        `iid` - process instance identifier
      Returns:
        time the instance was started
      Throws:
        `ManagementException`