org.apache.ode.bpel.engine
Class ProcessAndInstanceManagementImpl

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

public class ProcessAndInstanceManagementImpl
extends java.lang.Object
implements InstanceManagement, 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  ProcessStore _store
           
 
Constructor Summary
ProcessAndInstanceManagementImpl(BpelServer server, ProcessStore store)
           
 
Method Summary
 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)
           
 InstanceInfoDocument fault(java.lang.Long iid, javax.xml.namespace.QName faultname, org.w3c.dom.Element faultData)
           
 GetCommunicationResponseDocument getCommunication(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)
           
 ActivityExtInfoListDocument getExtensibilityElements(javax.xml.namespace.QName pid, java.lang.Integer[] aids)
           
 InstanceInfoDocument getInstanceInfo(java.lang.Long iid)
           
 ProcessInfoDocument getProcessInfo(javax.xml.namespace.QName pid)
           
 ProcessInfoDocument getProcessInfoCustom(javax.xml.namespace.QName pid, ProcessInfoCustomizer custom)
           
 ScopeInfoDocument getScopeInfo(java.lang.String siid)
           
 ScopeInfoDocument getScopeInfoWithActivity(java.lang.String siid, boolean includeActivityInfo)
           
 VariableInfoDocument getVariableInfo(java.lang.String scopeId, java.lang.String varName)
           
 InstanceInfoListDocument listAllInstances()
           
 InstanceInfoListDocument listAllInstancesWithLimit(int limit)
           
 ProcessInfoListDocument listAllProcesses()
           
 EventInfoListDocument listEvents(java.lang.String instanceFilter, java.lang.String eventFilter, int maxCount)
           
 InstanceInfoListDocument listInstances(java.lang.String filter, java.lang.String order, int limit)
           
 InstanceInfoListDocument listInstancesSummary(java.lang.String filter, java.lang.String order, int limit)
           
 ProcessInfoListDocument listProcesses(java.lang.String filter, java.lang.String orderKeys)
           
 ProcessInfoListDocument listProcessesCustom(java.lang.String filter, java.lang.String orderKeys, ProcessInfoCustomizer custom)
           
 ProcessInfoListDocument listProcessesSummaryAndProperties()
           
 ProcessInfoListDocument listProcessesSummaryOnly()
           
 InstanceInfoListDocument queryInstances(java.lang.String query)
           
 InstanceInfoDocument recoverActivity(java.lang.Long iid, java.lang.Long aid, java.lang.String action)
           
 ReplayResponseDocument replay(Replay request)
           
 InstanceInfoDocument resume(java.lang.Long iid)
           
 void setPackageRetired(java.lang.String packageName, boolean retired)
           
 ProcessInfoDocument setProcessProperty(javax.xml.namespace.QName pid, javax.xml.namespace.QName propertyName, java.lang.String value)
           
 ProcessInfoDocument setProcessPropertyNode(javax.xml.namespace.QName pid, javax.xml.namespace.QName propertyName, org.w3c.dom.Node value)
           
 ProcessInfoDocument setRetired(javax.xml.namespace.QName pid, boolean retired)
           
 VariableInfoDocument setVariable(java.lang.String scopeId, java.lang.String varName, org.apache.xmlbeans.XmlObject value)
           
 InstanceInfoDocument suspend(java.lang.Long iid)
           
 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 ProcessStore _store

_calendar

protected java.util.Calendar _calendar

_server

protected BpelServerImpl _server
Constructor Detail

ProcessAndInstanceManagementImpl

public ProcessAndInstanceManagementImpl(BpelServer server,
                                        ProcessStore store)
Method Detail

listProcessesCustom

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

listProcesses

public ProcessInfoListDocument listProcesses(java.lang.String filter,
                                             java.lang.String orderKeys)
Specified by:
listProcesses in interface ProcessManagement

listAllProcesses

public ProcessInfoListDocument listAllProcesses()
Specified by:
listAllProcesses in interface ProcessManagement

listProcessesSummaryOnly

public ProcessInfoListDocument listProcessesSummaryOnly()
Specified by:
listProcessesSummaryOnly in interface ProcessManagement

listProcessesSummaryAndProperties

public ProcessInfoListDocument listProcessesSummaryAndProperties()
Specified by:
listProcessesSummaryAndProperties in interface ProcessManagement

getProcessInfoCustom

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

getProcessInfo

public ProcessInfoDocument getProcessInfo(javax.xml.namespace.QName pid)
Specified by:
getProcessInfo in interface ProcessManagement

activate

public ProcessInfoDocument activate(javax.xml.namespace.QName pid)
Specified by:
activate in interface ProcessManagement

setRetired

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

setPackageRetired

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

setProcessPropertyNode

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

setProcessProperty

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

listInstances

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

listInstancesSummary

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

listAllInstances

public InstanceInfoListDocument listAllInstances()
Specified by:
listAllInstances in interface InstanceManagement

listAllInstancesWithLimit

public InstanceInfoListDocument listAllInstancesWithLimit(int limit)
Specified by:
listAllInstancesWithLimit in interface InstanceManagement

getInstanceInfo

public InstanceInfoDocument getInstanceInfo(java.lang.Long iid)
                                     throws InstanceNotFoundException
Specified by:
getInstanceInfo in interface InstanceManagement
Throws:
InstanceNotFoundException

getScopeInfo

public ScopeInfoDocument getScopeInfo(java.lang.String siid)
Specified by:
getScopeInfo in interface InstanceManagement

getScopeInfoWithActivity

public ScopeInfoDocument getScopeInfoWithActivity(java.lang.String siid,
                                                  boolean includeActivityInfo)
Specified by:
getScopeInfoWithActivity in interface InstanceManagement

getVariableInfo

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

setVariable

public VariableInfoDocument setVariable(java.lang.String scopeId,
                                        java.lang.String varName,
                                        org.apache.xmlbeans.XmlObject value)
                                 throws ManagementException
Throws:
ManagementException

fault

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

resume

public InstanceInfoDocument resume(java.lang.Long iid)
Specified by:
resume in interface InstanceManagement

suspend

public InstanceInfoDocument suspend(java.lang.Long iid)
                             throws ManagementException
Specified by:
suspend in interface InstanceManagement
Throws:
ManagementException

terminate

public InstanceInfoDocument terminate(java.lang.Long iid)
                               throws ManagementException
Specified by:
terminate in interface InstanceManagement
Throws:
ManagementException

recoverActivity

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

delete

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

getEventTimeline

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

listEvents

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

getExtensibilityElements

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

getDebugger

protected final DebuggerSupport getDebugger(javax.xml.namespace.QName procid)
                                     throws 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:
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:
ManagementException

dbexec

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

Parameters:
runnable - action to run
Returns:
Throws:
ManagementException

dbexec

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

Parameters:
callable - action to run
Returns:
Throws:
ManagementException

queryInstances

public InstanceInfoListDocument queryInstances(java.lang.String query)
Specified by:
queryInstances in interface InstanceManagement
See Also:
InstanceManagement.queryInstances(java.lang.String)

replay

public ReplayResponseDocument replay(Replay request)
                              throws ManagementException
Throws:
ManagementException

getCommunication

public GetCommunicationResponseDocument getCommunication(GetCommunication request)
                                                  throws ManagementException
Throws:
ManagementException


Copyright © 2015 WSO2. All Rights Reserved.