Author: mszefler
Date: Tue Aug 7 11:05:54 2007
New Revision: 563596
URL: http://svn.apache.org/viewvc?view=rev&rev=563596
Log:
BART tweaks: open up scheduling for in-memory processes to assist testing.
Modified:
ode/branches/bart/bpel-dao/src/main/java/org/apache/ode/bpel/dao/ProcessInstanceDAO.java
Modified:
ode/branches/bart/bpel-dao/src/main/java/org/apache/ode/bpel/dao/ProcessInstanceDAO.java
URL:
http://svn.apache.org/viewvc/ode/branches/bart/bpel-dao/src/main/java/org/apache/ode/bpel/dao/ProcessInstanceDAO.java?view=diff&rev=563596&r1=563595&r2=563596
==============================================================================
---
ode/branches/bart/bpel-dao/src/main/java/org/apache/ode/bpel/dao/ProcessInstanceDAO.java
(original)
+++
ode/branches/bart/bpel-dao/src/main/java/org/apache/ode/bpel/dao/ProcessInstanceDAO.java
Tue Aug 7 11:05:54 2007
@@ -27,146 +27,156 @@
import javax.xml.namespace.QName;
-
/**
- * BPEL process instance data access object. This object serves as the root
- * object for data related to a particular process instance; this state
- * includes auditing events, scopes, pick/received waiters, and the
- * serialized process instance image.
+ * BPEL process instance data access object. This object serves as the root
object for data related to a particular process
+ * instance; this state includes auditing events, scopes, pick/received
waiters, and the serialized process instance image.
*/
public interface ProcessInstanceDAO {
/**
* Get the time when the process instance was created.
+ *
* @return time of instance creation
*/
public Date getCreateTime();
-
+
/**
* Get the time when the process instance was last active (re-hydrated).
+ *
* @return time of activity
*/
public Date getLastActiveTime();
-
+
/**
* Set last activity time for the process instance
- * @param dt tiem of activity
+ *
+ * @param dt
+ * tiem of activity
*/
void setLastActiveTime(Date dt);
/**
- * The un-caught fault associated with the process. This will be
- * <code>null</code> if no fault occurred or if all faults are caught and
- * processed.
- * @param fault the fault
+ * The un-caught fault associated with the process. This will be
<code>null</code> if no fault occurred or if all faults are
+ * caught and processed.
+ *
+ * @param fault
+ * the fault
*/
void setFault(FaultDAO fault);
-
+
void setFault(QName faultName, String explanation, int faultLineNo, int
activityId, Element faultMessage);
/**
- * The un-caught fault associated with the process. This will be
- * <code>null</code> if no fault occurred or if all faults are caught and
- * processed.
- *
+ * The un-caught fault associated with the process. This will be
<code>null</code> if no fault occurred or if all faults are
+ * caught and processed.
+ *
* @return the fault
*/
FaultDAO getFault();
/**
* Get the (opaque) instance execution state.
+ *
* @return opaque execution state
*/
byte[] getExecutionState();
/**
* Set the (opaque) instance execution state.
- * @param execState execuction state
+ *
+ * @param execState
+ * execuction state
*/
void setExecutionState(byte[] execState);
/**
* Get the process.
- *
+ *
* @return process reference.
*/
ProcessDAO getProcess();
/**
* Get the root (global) scope for the process.
- *
+ *
* @return the root scope
*/
ScopeDAO getRootScope();
/**
- * Set the state of the process instance; one of the <code>STATE_XXX</code>
- * constants defined in ProcessState.
+ * Set the state of the process instance; one of the
<code>STATE_XXX</code> constants defined in ProcessState.
*
* This should automatically populate the previous state.
- *
- * @param state new state of the process instance
+ *
+ * @param state
+ * new state of the process instance
*/
void setState(short state);
/**
- * Get the state of the process instance; one of the <code>STATE_XXX</code>
- * constants defined in ProcessState.
- *
+ * Get the state of the process instance; one of the
<code>STATE_XXX</code> constants defined in ProcessState.
+ *
* @return state of process instance
*/
short getState();
-
+
/**
- * Returns the next to last state.
+ * Returns the next to last state.
+ *
* @return
*/
short getPreviousState();
/**
* Creates a new scope.
- *
- * @param parentScope parent scope of the new scope, or null if this is the
- * root scope.
- * @param name scope name
- *
+ *
+ * @param parentScope
+ * parent scope of the new scope, or null if this is the root
scope.
+ * @param name
+ * scope name
+ *
* @return the newly created scope
*/
ScopeDAO createScope(ScopeDAO parentScope, String name, int scopeModelId);
/**
* Get the instance identifier.
+ *
* @return the instance identifier
*/
Long getInstanceId();
/**
* Returns a scope using its instance id.
+ *
* @param scopeInstanceId
* @return
*/
ScopeDAO getScope(Long scopeInstanceId);
-
- /**
+
+ /**
* Returns all the scopes with the associated name.
+ *
* @param scopeName
* @return
*/
Collection<ScopeDAO> getScopes(String scopeName);
-
- /**
+
+ /**
* Returns all the scopes belonging to this isntance.
+ *
* @param scopeName
* @return
*/
Collection<ScopeDAO> getScopes();
-
+
/**
* Return the correlator which results in the instantiation of the process
instance.
+ *
* @return
*/
CorrelatorDAO getInstantiatingCorrelator();
-
+
/**
* Returns all variable instances matching the variable name for a
specified scope.
*/
@@ -174,20 +184,22 @@
/**
* Get all the correlation sets for this process.
+ *
* @return [EMAIL PROTECTED] Set} of [EMAIL PROTECTED] CorrelationSetDAO}
objects
*/
Set<CorrelationSetDAO> getCorrelationSets();
/**
* Get a correlation set by its name from this process
+ *
* @param name
* @return a [EMAIL PROTECTED] CorrelationSetDAO} object
*/
CorrelationSetDAO getCorrelationSet(String name);
/**
- * A simple callback to allow the ProcessInstance to perform
post-completion duties.
- * The DAO's state indicates whether any fault has occured.
+ * A simple callback to allow the ProcessInstance to perform
post-completion duties. The DAO's state indicates whether any fault
+ * has occured.
*/
void finishCompletion();
@@ -198,18 +210,22 @@
/**
* Insert a BPEL event to the database (associating with this process).
- * @param event BPEL event
+ *
+ * @param event
+ * BPEL event
*/
void insertBpelEvent(ProcessInstanceEvent event);
/**
* Get a triple containing the first
+ *
* @return
*/
EventsFirstLastCountTuple getEventsFirstLastCount();
- /**
+ /**
* Get the next number from a monotonically increasing sequence.
+ *
* @return next number in seqeunce
*/
public long genMonotonic();
@@ -232,25 +248,29 @@
Collection<ActivityRecoveryDAO> getActivityRecoveries();
/**
- * Create an activity recovery object for a given activity instance.
- * Specify the reason and optional data associated with the failure.
- * Date/time failure occurred, and the recovery channel and available
- * recovery actions.
+ * Create an activity recovery object for a given activity instance.
Specify the reason and optional data associated with the
+ * failure. Date/time failure occurred, and the recovery channel and
available recovery actions.
*/
- void createActivityRecovery(String channel, long activityId, String
reason, Date dateTime, Element data, String[] actions, int retries);
+ void createActivityRecovery(String channel, long activityId, String
reason, Date dateTime, Element data, String[] actions,
+ int retries);
/**
* Delete previously registered activity recovery.
*/
void deleteActivityRecovery(String channel);
+ public int getExecutionStateCounter();
+
+ public void setExecutionStateCounter(int stateCounter);
+
/**
- * Transport object holding the date of the first and last instance event
- * along with the number events.
+ * Transport object holding the date of the first and last instance event
along with the number events.
*/
public class EventsFirstLastCountTuple {
public Date first;
+
public Date last;
+
public int count;
}