@Entity public class ProcessInstanceDAOImpl extends OpenJPADAO implements ProcessInstanceDAO
ProcessInstanceDAO.EventsFirstLastCountTuple
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COUNT_FAILED_INSTANCES_BY_STATUS_AND_PROCESS_ID |
static java.lang.String |
COUNT_FAILED_INSTANCES_BY_STATUS_AND_PROCESS_IDS |
static java.lang.String |
COUNT_INSTANCE_IDS_BY_PROCESS |
static java.lang.String |
COUNT_INSTANCES_BY_PROCESSES_IDS_AND_STATES |
static java.lang.String |
DELETE_INSTANCES_BY_PROCESS |
static java.lang.String |
SELECT_FAULT_IDS_BY_PROCESS |
static java.lang.String |
SELECT_INSTANCE_IDS_BY_PROCESS |
Constructor and Description |
---|
ProcessInstanceDAOImpl() |
ProcessInstanceDAOImpl(CorrelatorDAOImpl correlator,
ProcessDAOImpl process) |
Modifier and Type | Method and Description |
---|---|
void |
createActivityRecovery(java.lang.String channel,
long activityId,
java.lang.String reason,
java.util.Date dateTime,
org.w3c.dom.Element data,
java.lang.String[] actions,
int retries)
Create an activity recovery object for a given activity instance.
|
ScopeDAO |
createScope(ScopeDAO parentScope,
java.lang.String name,
int scopeModelId)
Creates a new scope.
|
void |
delete(java.util.Set<ProcessConf.CLEANUP_CATEGORY> cleanupCategories)
Delete the process instance object from the database.
|
void |
delete(java.util.Set<ProcessConf.CLEANUP_CATEGORY> cleanupCategories,
boolean deleteMyRoleMex)
Delete the process instance object from the database.
|
void |
deleteActivityRecovery(java.lang.String channel)
Delete previously registered activity recovery.
|
void |
finishCompletion()
A simple callback to allow the ProcessInstance to perform post-completion duties.
|
long |
genMonotonic()
Get the next number from a monotonically increasing sequence.
|
int |
getActivityFailureCount()
Get number of activities in the failure state.
|
java.util.Date |
getActivityFailureDateTime()
Get date/time of last activity failure.
|
java.util.Collection<ActivityRecoveryDAO> |
getActivityRecoveries()
Returns all activity recovery objects for this process instance.
|
BpelDAOConnection |
getConnection() |
CorrelationSetDAO |
getCorrelationSet(java.lang.String name)
Get a correlation set by its name from this process
|
java.util.Set<CorrelationSetDAO> |
getCorrelationSets()
Get all the correlation sets for this process.
|
java.util.Date |
getCreateTime()
Get the time when the process instance was created.
|
ProcessInstanceDAO.EventsFirstLastCountTuple |
getEventsFirstLastCount()
Get a triple containing the first
|
byte[] |
getExecutionState()
Get the (opaque) instance execution state.
|
FaultDAO |
getFault()
The un-caught fault associated with the process.
|
java.lang.Long |
getInstanceId()
Get the instance identifier.
|
CorrelatorDAO |
getInstantiatingCorrelator()
Return the correlator which results in the instantiation of the process instance.
|
java.util.Date |
getLastActiveTime()
Get the time when the process instance was last active (re-hydrated).
|
java.util.Collection<java.lang.String> |
getMessageExchangeIds() |
short |
getPreviousState()
Returns the next to last state.
|
ProcessDAO |
getProcess()
Get the process.
|
ScopeDAO |
getRootScope()
Get the root (global) scope for the process.
|
ScopeDAO |
getScope(java.lang.Long scopeInstanceId)
Returns a scope using its instance id.
|
java.util.Collection<ScopeDAO> |
getScopes()
Returns all the scopes belonging to this isntance.
|
java.util.Collection<ScopeDAO> |
getScopes(java.lang.String scopeName)
Returns all the scopes with the associated name.
|
short |
getState()
Get the state of the process instance; one of the
STATE_XXX
constants defined in ProcessState. |
XmlDataDAO[] |
getVariables(java.lang.String variableName,
int scopeModelId)
Returns all variable instances matching the variable name for a specified scope.
|
void |
insertBpelEvent(ProcessInstanceEvent event)
Insert a BPEL event to the database (associating with this process).
|
java.util.Collection<CorrelationSetDAO> |
selectCorrelationSets(java.util.Collection<ProcessInstanceDAO> instances) |
void |
setActivityFailureCount(int activityFailureCount) |
void |
setExecutionState(byte[] execState)
Set the (opaque) instance execution state.
|
void |
setFault(FaultDAO fault)
The un-caught fault associated with the process.
|
void |
setFault(javax.xml.namespace.QName faultName,
java.lang.String explanation,
int faultLineNo,
int activityId,
org.w3c.dom.Element faultMessage) |
void |
setLastActiveTime(java.util.Date dt)
Set last activity time for the process instance
|
void |
setState(short state)
Set the state of the process instance; one of the
STATE_XXX
constants defined in ProcessState. |
batchUpdateByIds, getConn, getEM, getSingleResult
public static final java.lang.String DELETE_INSTANCES_BY_PROCESS
public static final java.lang.String SELECT_INSTANCE_IDS_BY_PROCESS
public static final java.lang.String COUNT_INSTANCE_IDS_BY_PROCESS
public static final java.lang.String SELECT_FAULT_IDS_BY_PROCESS
public static final java.lang.String COUNT_FAILED_INSTANCES_BY_STATUS_AND_PROCESS_ID
public static final java.lang.String COUNT_FAILED_INSTANCES_BY_STATUS_AND_PROCESS_IDS
public static final java.lang.String COUNT_INSTANCES_BY_PROCESSES_IDS_AND_STATES
public ProcessInstanceDAOImpl()
public ProcessInstanceDAOImpl(CorrelatorDAOImpl correlator, ProcessDAOImpl process)
public void createActivityRecovery(java.lang.String channel, long activityId, java.lang.String reason, java.util.Date dateTime, org.w3c.dom.Element data, java.lang.String[] actions, int retries)
ProcessInstanceDAO
createActivityRecovery
in interface ProcessInstanceDAO
public ScopeDAO createScope(ScopeDAO parentScope, java.lang.String name, int scopeModelId)
ProcessInstanceDAO
createScope
in interface ProcessInstanceDAO
parentScope
- parent scope of the new scope, or null if this is the
root scope.name
- scope namepublic java.util.Collection<CorrelationSetDAO> selectCorrelationSets(java.util.Collection<ProcessInstanceDAO> instances)
public void delete(java.util.Set<ProcessConf.CLEANUP_CATEGORY> cleanupCategories)
ProcessInstanceDAO
delete
in interface ProcessInstanceDAO
public void delete(java.util.Set<ProcessConf.CLEANUP_CATEGORY> cleanupCategories, boolean deleteMyRoleMex)
ProcessInstanceDAO
delete
in interface ProcessInstanceDAO
cleanupCategories
- the categories of entities to deletedeleteMyRoleMex
- will clean up the my role mex if set to truepublic void deleteActivityRecovery(java.lang.String channel)
ProcessInstanceDAO
deleteActivityRecovery
in interface ProcessInstanceDAO
public void finishCompletion()
ProcessInstanceDAO
finishCompletion
in interface ProcessInstanceDAO
public long genMonotonic()
ProcessInstanceDAO
genMonotonic
in interface ProcessInstanceDAO
public int getActivityFailureCount()
ProcessInstanceDAO
getActivityFailureCount
in interface ProcessInstanceDAO
public void setActivityFailureCount(int activityFailureCount)
public java.util.Date getActivityFailureDateTime()
ProcessInstanceDAO
getActivityFailureDateTime
in interface ProcessInstanceDAO
public java.util.Collection<ActivityRecoveryDAO> getActivityRecoveries()
ProcessInstanceDAO
getActivityRecoveries
in interface ProcessInstanceDAO
public CorrelationSetDAO getCorrelationSet(java.lang.String name)
ProcessInstanceDAO
getCorrelationSet
in interface ProcessInstanceDAO
CorrelationSetDAO
objectpublic java.util.Set<CorrelationSetDAO> getCorrelationSets()
ProcessInstanceDAO
getCorrelationSets
in interface ProcessInstanceDAO
Set
of CorrelationSetDAO
objectspublic java.util.Date getCreateTime()
ProcessInstanceDAO
getCreateTime
in interface ProcessInstanceDAO
public ProcessInstanceDAO.EventsFirstLastCountTuple getEventsFirstLastCount()
ProcessInstanceDAO
getEventsFirstLastCount
in interface ProcessInstanceDAO
public byte[] getExecutionState()
ProcessInstanceDAO
getExecutionState
in interface ProcessInstanceDAO
public FaultDAO getFault()
ProcessInstanceDAO
null
if no fault occurred or if all faults are caught and
processed.getFault
in interface ProcessInstanceDAO
public java.lang.Long getInstanceId()
ProcessInstanceDAO
getInstanceId
in interface ProcessInstanceDAO
public CorrelatorDAO getInstantiatingCorrelator()
ProcessInstanceDAO
getInstantiatingCorrelator
in interface ProcessInstanceDAO
public java.util.Date getLastActiveTime()
ProcessInstanceDAO
getLastActiveTime
in interface ProcessInstanceDAO
public short getPreviousState()
ProcessInstanceDAO
getPreviousState
in interface ProcessInstanceDAO
public ProcessDAO getProcess()
ProcessInstanceDAO
getProcess
in interface ProcessInstanceDAO
public ScopeDAO getRootScope()
ProcessInstanceDAO
getRootScope
in interface ProcessInstanceDAO
public ScopeDAO getScope(java.lang.Long scopeInstanceId)
ProcessInstanceDAO
getScope
in interface ProcessInstanceDAO
public java.util.Collection<ScopeDAO> getScopes(java.lang.String scopeName)
ProcessInstanceDAO
getScopes
in interface ProcessInstanceDAO
public java.util.Collection<ScopeDAO> getScopes()
ProcessInstanceDAO
getScopes
in interface ProcessInstanceDAO
public short getState()
ProcessInstanceDAO
STATE_XXX
constants defined in ProcessState.getState
in interface ProcessInstanceDAO
public XmlDataDAO[] getVariables(java.lang.String variableName, int scopeModelId)
ProcessInstanceDAO
getVariables
in interface ProcessInstanceDAO
public void insertBpelEvent(ProcessInstanceEvent event)
ProcessInstanceDAO
insertBpelEvent
in interface ProcessInstanceDAO
event
- BPEL eventpublic void setExecutionState(byte[] execState)
ProcessInstanceDAO
setExecutionState
in interface ProcessInstanceDAO
execState
- execuction statepublic void setFault(FaultDAO fault)
ProcessInstanceDAO
null
if no fault occurred or if all faults are caught and
processed.setFault
in interface ProcessInstanceDAO
fault
- the faultpublic void setFault(javax.xml.namespace.QName faultName, java.lang.String explanation, int faultLineNo, int activityId, org.w3c.dom.Element faultMessage)
setFault
in interface ProcessInstanceDAO
public void setLastActiveTime(java.util.Date dt)
ProcessInstanceDAO
setLastActiveTime
in interface ProcessInstanceDAO
dt
- tiem of activitypublic void setState(short state)
ProcessInstanceDAO
STATE_XXX
constants defined in ProcessState.
This should automatically populate the previous state.setState
in interface ProcessInstanceDAO
state
- new state of the process instancepublic BpelDAOConnection getConnection()
getConnection
in interface ProcessInstanceDAO
public java.util.Collection<java.lang.String> getMessageExchangeIds()
getMessageExchangeIds
in interface ProcessInstanceDAO