org.apache.ode.bpel.engine
Class ProcessAndInstanceManagementImpl

java.lang.Object
  extended by org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl
All Implemented Interfaces:
org.apache.ode.bpel.pmapi.InstanceManagement, org.apache.ode.bpel.pmapi.ProcessManagement
Direct Known Subclasses:
BpelManagementFacadeImpl

public class ProcessAndInstanceManagementImpl
extends java.lang.Object
implements org.apache.ode.bpel.pmapi.InstanceManagement, org.apache.ode.bpel.pmapi.ProcessManagement

Implementation of the Process and InstanceManagement APIs.


Field Summary
protected static org.apache.commons.logging.Log __log
           
protected static Messages __msgs
           
protected static org.apache.ode.bpel.engine.ProcessStatusConverter __psc
           
protected  java.util.Calendar _calendar
           
protected  BpelDatabase _db
           
protected  BpelServerImpl _server
           
protected  org.apache.ode.bpel.iapi.ProcessStore _store
           
 
Constructor Summary
ProcessAndInstanceManagementImpl(org.apache.ode.bpel.iapi.BpelServer server, org.apache.ode.bpel.iapi.ProcessStore store)
           
 
Method Summary
 org.apache.ode.bpel.pmapi.ProcessInfoDocument activate(javax.xml.namespace.QName pid)
           
protected
<T> T
dbexec(BpelDatabase.Callable<T> callable)
          Execute a database transaction, unwrapping nested ManagementExceptions.
protected
<T> T
dbexec(org.apache.ode.bpel.engine.BpelProcessDatabase.Callable<T> runnable)
          Execute a database transaction, unwrapping nested ManagementExceptions.
 java.util.Collection<java.lang.Long> delete(java.lang.String filter)
           
 org.apache.ode.bpel.pmapi.InstanceInfoDocument fault(java.lang.Long iid, javax.xml.namespace.QName faultname, org.w3c.dom.Element faultData)
           
 org.apache.ode.bpel.pmapi.GetCommunicationResponseDocument getCommunication(org.apache.ode.bpel.pmapi.GetCommunication request)
           
protected  DebuggerSupport getDebugger(java.lang.Long iid)
          Get the DebuggerSupport object for the given instance identifier.
protected  DebuggerSupport getDebugger(javax.xml.namespace.QName procid)
          Get the DebuggerSupport object for the given process identifier.
 java.util.List<java.lang.String> getEventTimeline(java.lang.String instanceFilter, java.lang.String eventFilter)
           
 org.apache.ode.bpel.pmapi.ActivityExtInfoListDocument getExtensibilityElements(javax.xml.namespace.QName pid, java.lang.Integer[] aids)
           
 org.apache.ode.bpel.pmapi.InstanceInfoDocument getInstanceInfo(java.lang.Long iid)
           
 org.apache.ode.bpel.pmapi.ProcessInfoDocument getProcessInfo(javax.xml.namespace.QName pid)
           
 org.apache.ode.bpel.pmapi.ProcessInfoDocument getProcessInfoCustom(javax.xml.namespace.QName pid, org.apache.ode.bpel.pmapi.ProcessInfoCustomizer custom)
           
 org.apache.ode.bpel.pmapi.ScopeInfoDocument getScopeInfo(java.lang.String siid)
           
 org.apache.ode.bpel.pmapi.ScopeInfoDocument getScopeInfoWithActivity(java.lang.String siid, boolean includeActivityInfo)
           
 org.apache.ode.bpel.pmapi.VariableInfoDocument getVariableInfo(java.lang.String scopeId, java.lang.String varName)
           
 org.apache.ode.bpel.pmapi.InstanceInfoListDocument listAllInstances()
           
 org.apache.ode.bpel.pmapi.InstanceInfoListDocument listAllInstancesWithLimit(int limit)
           
 org.apache.ode.bpel.pmapi.ProcessInfoListDocument listAllProcesses()
           
 org.apache.ode.bpel.pmapi.EventInfoListDocument listEvents(java.lang.String instanceFilter, java.lang.String eventFilter, int maxCount)
           
 org.apache.ode.bpel.pmapi.InstanceInfoListDocument listInstances(java.lang.String filter, java.lang.String order, int limit)
           
 org.apache.ode.bpel.pmapi.InstanceInfoListDocument listInstancesSummary(java.lang.String filter, java.lang.String order, int limit)
           
 org.apache.ode.bpel.pmapi.ProcessInfoListDocument listProcesses(java.lang.String filter, java.lang.String orderKeys)
           
 org.apache.ode.bpel.pmapi.ProcessInfoListDocument listProcessesCustom(java.lang.String filter, java.lang.String orderKeys, org.apache.ode.bpel.pmapi.ProcessInfoCustomizer custom)
           
 org.apache.ode.bpel.pmapi.ProcessInfoListDocument listProcessesSummaryOnly()
           
 org.apache.ode.bpel.pmapi.InstanceInfoListDocument queryInstances(java.lang.String query)
           
 org.apache.ode.bpel.pmapi.InstanceInfoDocument recoverActivity(java.lang.Long iid, java.lang.Long aid, java.lang.String action)
           
 org.apache.ode.bpel.pmapi.ReplayResponseDocument replay(org.apache.ode.bpel.pmapi.Replay request)
           
 org.apache.ode.bpel.pmapi.InstanceInfoDocument resume(java.lang.Long iid)
           
 void setPackageRetired(java.lang.String packageName, boolean retired)
           
 org.apache.ode.bpel.pmapi.ProcessInfoDocument setProcessProperty(javax.xml.namespace.QName pid, javax.xml.namespace.QName propertyName, java.lang.String value)
           
 org.apache.ode.bpel.pmapi.ProcessInfoDocument setProcessPropertyNode(javax.xml.namespace.QName pid, javax.xml.namespace.QName propertyName, org.w3c.dom.Node value)
           
 org.apache.ode.bpel.pmapi.ProcessInfoDocument setRetired(javax.xml.namespace.QName pid, boolean retired)
           
 org.apache.ode.bpel.pmapi.InstanceInfoDocument suspend(java.lang.Long iid)
           
 org.apache.ode.bpel.pmapi.InstanceInfoDocument terminate(java.lang.Long iid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__msgs

protected static final Messages __msgs

__log

protected static org.apache.commons.logging.Log __log

__psc

protected static final org.apache.ode.bpel.engine.ProcessStatusConverter __psc

_db

protected BpelDatabase _db

_store

protected org.apache.ode.bpel.iapi.ProcessStore _store

_calendar

protected java.util.Calendar _calendar

_server

protected BpelServerImpl _server
Constructor Detail

ProcessAndInstanceManagementImpl

public ProcessAndInstanceManagementImpl(org.apache.ode.bpel.iapi.BpelServer server,
                                        org.apache.ode.bpel.iapi.ProcessStore store)
Method Detail

listProcessesCustom

public org.apache.ode.bpel.pmapi.ProcessInfoListDocument listProcessesCustom(java.lang.String filter,
                                                                             java.lang.String orderKeys,
                                                                             org.apache.ode.bpel.pmapi.ProcessInfoCustomizer custom)
Specified by:
listProcessesCustom in interface org.apache.ode.bpel.pmapi.ProcessManagement

listProcesses

public org.apache.ode.bpel.pmapi.ProcessInfoListDocument listProcesses(java.lang.String filter,
                                                                       java.lang.String orderKeys)
Specified by:
listProcesses in interface org.apache.ode.bpel.pmapi.ProcessManagement

listAllProcesses

public org.apache.ode.bpel.pmapi.ProcessInfoListDocument listAllProcesses()
Specified by:
listAllProcesses in interface org.apache.ode.bpel.pmapi.ProcessManagement

listProcessesSummaryOnly

public org.apache.ode.bpel.pmapi.ProcessInfoListDocument listProcessesSummaryOnly()
Specified by:
listProcessesSummaryOnly in interface org.apache.ode.bpel.pmapi.ProcessManagement

getProcessInfoCustom

public org.apache.ode.bpel.pmapi.ProcessInfoDocument getProcessInfoCustom(javax.xml.namespace.QName pid,
                                                                          org.apache.ode.bpel.pmapi.ProcessInfoCustomizer custom)
Specified by:
getProcessInfoCustom in interface org.apache.ode.bpel.pmapi.ProcessManagement

getProcessInfo

public org.apache.ode.bpel.pmapi.ProcessInfoDocument getProcessInfo(javax.xml.namespace.QName pid)
Specified by:
getProcessInfo in interface org.apache.ode.bpel.pmapi.ProcessManagement

activate

public org.apache.ode.bpel.pmapi.ProcessInfoDocument activate(javax.xml.namespace.QName pid)
Specified by:
activate in interface org.apache.ode.bpel.pmapi.ProcessManagement

setRetired

public org.apache.ode.bpel.pmapi.ProcessInfoDocument setRetired(javax.xml.namespace.QName pid,
                                                                boolean retired)
                                                         throws org.apache.ode.bpel.pmapi.ManagementException
Specified by:
setRetired in interface org.apache.ode.bpel.pmapi.ProcessManagement
Throws:
org.apache.ode.bpel.pmapi.ManagementException

setPackageRetired

public void setPackageRetired(java.lang.String packageName,
                              boolean retired)
                       throws org.apache.ode.bpel.pmapi.ManagementException
Specified by:
setPackageRetired in interface org.apache.ode.bpel.pmapi.ProcessManagement
Throws:
org.apache.ode.bpel.pmapi.ManagementException

setProcessPropertyNode

public org.apache.ode.bpel.pmapi.ProcessInfoDocument setProcessPropertyNode(javax.xml.namespace.QName pid,
                                                                            javax.xml.namespace.QName propertyName,
                                                                            org.w3c.dom.Node value)
                                                                     throws org.apache.ode.bpel.pmapi.ManagementException
Specified by:
setProcessPropertyNode in interface org.apache.ode.bpel.pmapi.ProcessManagement
Throws:
org.apache.ode.bpel.pmapi.ManagementException

setProcessProperty

public org.apache.ode.bpel.pmapi.ProcessInfoDocument setProcessProperty(javax.xml.namespace.QName pid,
                                                                        javax.xml.namespace.QName propertyName,
                                                                        java.lang.String value)
                                                                 throws org.apache.ode.bpel.pmapi.ManagementException
Specified by:
setProcessProperty in interface org.apache.ode.bpel.pmapi.ProcessManagement
Throws:
org.apache.ode.bpel.pmapi.ManagementException

listInstances

public org.apache.ode.bpel.pmapi.InstanceInfoListDocument listInstances(java.lang.String filter,
                                                                        java.lang.String order,
                                                                        int limit)
Specified by:
listInstances in interface org.apache.ode.bpel.pmapi.InstanceManagement

listInstancesSummary

public org.apache.ode.bpel.pmapi.InstanceInfoListDocument listInstancesSummary(java.lang.String filter,
                                                                               java.lang.String order,
                                                                               int limit)
Specified by:
listInstancesSummary in interface org.apache.ode.bpel.pmapi.InstanceManagement

listAllInstances

public org.apache.ode.bpel.pmapi.InstanceInfoListDocument listAllInstances()
Specified by:
listAllInstances in interface org.apache.ode.bpel.pmapi.InstanceManagement

listAllInstancesWithLimit

public org.apache.ode.bpel.pmapi.InstanceInfoListDocument listAllInstancesWithLimit(int limit)
Specified by:
listAllInstancesWithLimit in interface org.apache.ode.bpel.pmapi.InstanceManagement

getInstanceInfo

public org.apache.ode.bpel.pmapi.InstanceInfoDocument getInstanceInfo(java.lang.Long iid)
                                                               throws org.apache.ode.bpel.pmapi.InstanceNotFoundException
Specified by:
getInstanceInfo in interface org.apache.ode.bpel.pmapi.InstanceManagement
Throws:
org.apache.ode.bpel.pmapi.InstanceNotFoundException

getScopeInfo

public org.apache.ode.bpel.pmapi.ScopeInfoDocument getScopeInfo(java.lang.String siid)
Specified by:
getScopeInfo in interface org.apache.ode.bpel.pmapi.InstanceManagement

getScopeInfoWithActivity

public org.apache.ode.bpel.pmapi.ScopeInfoDocument getScopeInfoWithActivity(java.lang.String siid,
                                                                            boolean includeActivityInfo)
Specified by:
getScopeInfoWithActivity in interface org.apache.ode.bpel.pmapi.InstanceManagement

getVariableInfo

public org.apache.ode.bpel.pmapi.VariableInfoDocument getVariableInfo(java.lang.String scopeId,
                                                                      java.lang.String varName)
                                                               throws org.apache.ode.bpel.pmapi.ManagementException
Specified by:
getVariableInfo in interface org.apache.ode.bpel.pmapi.InstanceManagement
Throws:
org.apache.ode.bpel.pmapi.ManagementException

fault

public org.apache.ode.bpel.pmapi.InstanceInfoDocument fault(java.lang.Long iid,
                                                            javax.xml.namespace.QName faultname,
                                                            org.w3c.dom.Element faultData)
Specified by:
fault in interface org.apache.ode.bpel.pmapi.InstanceManagement

resume

public org.apache.ode.bpel.pmapi.InstanceInfoDocument resume(java.lang.Long iid)
Specified by:
resume in interface org.apache.ode.bpel.pmapi.InstanceManagement

suspend

public org.apache.ode.bpel.pmapi.InstanceInfoDocument suspend(java.lang.Long iid)
                                                       throws org.apache.ode.bpel.pmapi.ManagementException
Specified by:
suspend in interface org.apache.ode.bpel.pmapi.InstanceManagement
Throws:
org.apache.ode.bpel.pmapi.ManagementException

terminate

public org.apache.ode.bpel.pmapi.InstanceInfoDocument terminate(java.lang.Long iid)
                                                         throws org.apache.ode.bpel.pmapi.ManagementException
Specified by:
terminate in interface org.apache.ode.bpel.pmapi.InstanceManagement
Throws:
org.apache.ode.bpel.pmapi.ManagementException

recoverActivity

public org.apache.ode.bpel.pmapi.InstanceInfoDocument recoverActivity(java.lang.Long iid,
                                                                      java.lang.Long aid,
                                                                      java.lang.String action)
Specified by:
recoverActivity in interface org.apache.ode.bpel.pmapi.InstanceManagement

delete

public java.util.Collection<java.lang.Long> delete(java.lang.String filter)
Specified by:
delete in interface org.apache.ode.bpel.pmapi.InstanceManagement

getEventTimeline

public java.util.List<java.lang.String> getEventTimeline(java.lang.String instanceFilter,
                                                         java.lang.String eventFilter)
Specified by:
getEventTimeline in interface org.apache.ode.bpel.pmapi.InstanceManagement

listEvents

public org.apache.ode.bpel.pmapi.EventInfoListDocument listEvents(java.lang.String instanceFilter,
                                                                  java.lang.String eventFilter,
                                                                  int maxCount)
Specified by:
listEvents in interface org.apache.ode.bpel.pmapi.InstanceManagement

getExtensibilityElements

public org.apache.ode.bpel.pmapi.ActivityExtInfoListDocument getExtensibilityElements(javax.xml.namespace.QName pid,
                                                                                      java.lang.Integer[] aids)
Specified by:
getExtensibilityElements in interface org.apache.ode.bpel.pmapi.ProcessManagement

getDebugger

protected final DebuggerSupport getDebugger(javax.xml.namespace.QName procid)
                                     throws org.apache.ode.bpel.pmapi.ManagementException
Get the DebuggerSupport object for the given process identifier. Debugger support is required for operations that resume execution in some way or manipulate the breakpoints.

Parameters:
procid - process identifier
Returns:
associated debugger support object
Throws:
org.apache.ode.bpel.pmapi.ManagementException

getDebugger

protected final DebuggerSupport getDebugger(java.lang.Long iid)
Get the DebuggerSupport object for the given instance identifier. Debugger support is required for operations that resume execution in some way or manipulate the breakpoints.

Parameters:
iid - instance identifier
Returns:
associated debugger support object
Throws:
org.apache.ode.bpel.pmapi.ManagementException

dbexec

protected <T> T dbexec(org.apache.ode.bpel.engine.BpelProcessDatabase.Callable<T> runnable)
            throws org.apache.ode.bpel.pmapi.ManagementException
Execute a database transaction, unwrapping nested ManagementExceptions.

Parameters:
runnable - action to run
Returns:
Throws:
org.apache.ode.bpel.pmapi.ManagementException

dbexec

protected <T> T dbexec(BpelDatabase.Callable<T> callable)
            throws org.apache.ode.bpel.pmapi.ManagementException
Execute a database transaction, unwrapping nested ManagementExceptions.

Parameters:
callable - action to run
Returns:
Throws:
org.apache.ode.bpel.pmapi.ManagementException

queryInstances

public org.apache.ode.bpel.pmapi.InstanceInfoListDocument queryInstances(java.lang.String query)
Specified by:
queryInstances in interface org.apache.ode.bpel.pmapi.InstanceManagement
See Also:
InstanceManagement.queryInstances(java.lang.String)

replay

public org.apache.ode.bpel.pmapi.ReplayResponseDocument replay(org.apache.ode.bpel.pmapi.Replay request)
                                                        throws org.apache.ode.bpel.pmapi.ManagementException
Throws:
org.apache.ode.bpel.pmapi.ManagementException

getCommunication

public org.apache.ode.bpel.pmapi.GetCommunicationResponseDocument getCommunication(org.apache.ode.bpel.pmapi.GetCommunication request)
                                                                            throws org.apache.ode.bpel.pmapi.ManagementException
Throws:
org.apache.ode.bpel.pmapi.ManagementException