|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.fc.WTObject
wt.enterprise.Simple
wt.workflow.engine.WfExecutionObject
WfExecutionObject
is an abstract base class that defines
common attributes, states and operations for processes and steps. When
a WfExecutionObject is created it enters the 'open.notRunning.notStarted'
state.
Supported API: true
Extendable: false
Field Summary | |
static String |
AD_SQEN
Label for the attribute; Attribute that captures a the ScheduleQueueEntry number. |
private long |
adSQEN
|
static String |
ALERT_TIME
Label for the attribute; Total time in milliseconds the execution object has been running. |
private long |
alertTime
|
protected static String |
CHANGE_STATE_TIME
Label for the attribute; Time of the last change of state. |
private long |
changeStateTime
|
private static String |
CLASSNAME
|
static String |
CONTAINER
Label for the attribute. |
private WTContainerRef |
containerReference
|
private ProcessData |
context
|
static String |
CONTEXT
Label for the attribute; Input and output data for the execution object. |
static String |
D_SQEN
Label for the attribute; Attribute that captures a the ScheduleQueueEntry number. |
private Timestamp |
deadline
|
static String |
DEADLINE
Label for the attribute; Attribute that captures when the activty or process should complete. |
static String |
DEADLINE_DURATION
Label for the attribute; Attribute that captures a time span after which the activty or process should be completed. |
private long |
deadlineDuration
|
private String |
description
|
static String |
DESCRIPTION
Label for the attribute; Description of the execution object. |
private static int |
DESCRIPTION_UPPER_LIMIT
|
private long |
dSQEN
|
static String |
END_TIME
Label for the attribute; Time in which the enactment of the object ended. |
private Timestamp |
endTime
|
static String |
EVENT_CONFIGURATION
Label for the attribute; Attribute holding which internal execution events should be recorded and/or emitted. |
private WfEventConfiguration |
eventConfiguration
|
static String |
EXCEPTION_MESSAGE
Supported API: false |
static long |
EXTERNALIZATION_VERSION_UID
|
private long |
key
|
static String |
KEY
Label for the attribute; Identifier of the execution object. |
private String |
name
|
static String |
NAME
Label for the attribute; Human readable, descriptive identifier of the execution object. |
private static int |
NAME_UPPER_LIMIT
|
protected static long |
OLD_FORMAT_VERSION_UID
|
static String |
PD_SQEN
Label for the attribute; Attribute that captures a the ScheduleQueueEntry number. |
private long |
pdSQEN
|
private long |
priority
|
static String |
PRIORITY
Label for the attribute; Relative priority of the execution object in the set of all objects of a given type. |
private static long |
R30_EXTERNALIZATION_VERSION_UID
|
private static long |
R60_EXTERNALIZATION_VERSION_UID
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
static String |
START_TIME
Label for the attribute; Time the execution of the object started. |
private Timestamp |
startTime
|
private WfState |
state
|
static String |
STATE
Label for the attribute; State of the object. |
private static int |
STATE_UPPER_LIMIT
|
static String |
SUSPEND_TIME
Label for the attribute; Total time in milliseconds the object has been suspended. |
private long |
suspendTime
|
private WfTemplateObjectReference |
template
|
static String |
TEMPLATE
Label for the attribute; Reference to the template object from which the execution object was derived. |
static String |
TIME_PAST_DEADLINE
Label for the attribute; Time the execution of the object that, when reached, triggers a notification to appropriate parties that the deadline has passed.. |
static String |
TIME_TO_DEADLINE
Label for the attribute; Time the execution of the object that, when reached, triggers a notification to appropriate parties that the deadline is approaching. |
static String |
TIME_TO_START
Label for the attribute; Time the execution of the object should wait until it starts. |
private Timestamp |
timePastDeadline
|
private Timestamp |
timeToDeadline
|
private Timestamp |
timeToStart
|
private static boolean |
VERBOSE
|
Fields inherited from class wt.enterprise.Simple |
|
Fields inherited from class wt.fc.WTObject |
CREATE_TIMESTAMP, MODIFY_TIMESTAMP |
Fields inherited from interface wt.inf.container.WTContained |
CONTAINER_ID, CONTAINER_NAME, CONTAINER_REFERENCE |
Fields inherited from interface wt.fc.Persistable |
IDENTITY, PERSIST_INFO, TYPE |
Fields inherited from interface wt.admin.DomainAdministered |
DOMAIN_REF, INHERITED_DOMAIN |
Fields inherited from interface wt.fc.BusinessInformation |
BUSINESS_TYPE, IDENTITY |
Fields inherited from interface wt.notify.Notifiable |
EVENT_SET |
Fields inherited from interface wt.identity.DisplayIdentification |
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE |
Constructor Summary | |
WfExecutionObject()
|
Method Summary | |
protected Timestamp |
calculateTimePastDeadline()
|
protected Timestamp |
calculateTimeToDeadline()
|
WfExecutionObject |
changeDeadline(Timestamp deadline)
Changes the deadline of the object to the given deadline and recomputes the timeToDeadline and timePastDeadline. |
abstract WfExecutionObject |
changeState(WfTransition transition)
Forces a change of state on the object. |
WfExecutionObject |
changeStateAttributes(WfTransition transition)
Updates the current state of the execution object. |
protected abstract void |
computeDeadline(long now)
Computes deadline. |
protected void |
computeTimePastDeadline()
Computes time past deadline. |
protected void |
computeTimeToDeadline()
Computes time to deadline. |
private void |
containerReferenceValidate(WTContainerRef a_ContainerReference)
|
boolean |
equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifier s. |
WfExecutionObject |
evaluateExpression(Object transition)
Evaluates the expression associated with the given transition. |
long |
getAdSQEN()
Gets the value of the attribute: AD_SQEN. |
long |
getAlertTime()
Gets the value of the attribute: ALERT_TIME. |
protected long |
getChangeStateTime()
Gets the value of the attribute: CHANGE_STATE_TIME. |
WTContainer |
getContainer()
Gets the object for the association that plays role: CONTAINER. |
String |
getContainerName()
Gets the value of the attribute: CONTAINER_NAME. |
WTContainerRef |
getContainerReference()
Gets the value of the attribute: CONTAINER_REFERENCE. |
ProcessData |
getContext()
Gets the value of the attribute: CONTEXT. |
Timestamp |
getDeadline()
Gets the value of the attribute: DEADLINE. |
long |
getDeadlineDuration()
Gets the value of the attribute: DEADLINE_DURATION. |
String |
getDescription()
Gets the value of the attribute: DESCRIPTION. |
long |
getDSQEN()
Gets the value of the attribute: D_SQEN. |
Timestamp |
getEndTime()
Gets the value of the attribute: END_TIME. |
WfEventConfiguration |
getEventConfiguration()
Gets the value of the attribute: EVENT_CONFIGURATION. |
String |
getIdentity()
Returns a string representing the identity of the object. |
long |
getKey()
Gets the value of the attribute: KEY. |
String |
getName()
Gets the value of the attribute: NAME. |
long |
getPdSQEN()
Gets the value of the attribute: PD_SQEN. |
long |
getPriority()
Gets the value of the attribute: PRIORITY. |
Timestamp |
getStartTime()
Gets the value of the attribute: START_TIME. |
WfState |
getState()
Gets the value of the attribute: STATE. |
long |
getSuspendTime()
Gets the value of the attribute: SUSPEND_TIME. |
WfTemplateObjectReference |
getTemplate()
Gets the value of the attribute: TEMPLATE. |
Timestamp |
getTimePastDeadline()
Gets the value of the attribute: TIME_PAST_DEADLINE. |
Timestamp |
getTimeToDeadline()
Gets the value of the attribute: TIME_TO_DEADLINE. |
Timestamp |
getTimeToStart()
Gets the value of the attribute: TIME_TO_START. |
protected WfDueDate |
getVarDueDate()
|
protected WfDuration |
getVarDuration()
|
protected WfAssigneeNotification |
getVarNotification()
|
int |
hashCode()
Returns a hash code for this object based upon its ObjectIdentifier . |
protected void |
initialize()
Supported API: false |
protected void |
initialize(WTContainerRef context_ref)
|
boolean |
isOverdue()
Determines if the object is overdue. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
void |
readExternal(PersistentRetrieveIfc input)
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(WfExecutionObject thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
boolean |
removeDeadlineQueueEntries()
This method will attempt to update the dedaline schedule queue entries to a NOT_READY state; and then delete them from the database. |
void |
resetValues()
Set variable values to initial values for resetable variables. |
void |
setAdSQEN(long a_AdSQEN)
Sets the value of the attribute: AD_SQEN. |
void |
setAlertTime(long a_AlertTime)
Sets the value of the attribute: ALERT_TIME. |
protected void |
setChangeStateTime(long a_ChangeStateTime)
Sets the value of the attribute: CHANGE_STATE_TIME. |
void |
setContainer(WTContainer a_Container)
Sets the object for the association that plays role: CONTAINER. |
void |
setContainerReference(WTContainerRef a_ContainerReference)
Sets the value of the attribute: CONTAINER_REFERENCE. |
void |
setContext(ProcessData a_Context)
Sets the value of the attribute: CONTEXT. |
void |
setDeadline(Timestamp a_Deadline)
Sets the value of the attribute: DEADLINE. |
void |
setDeadlineDuration(long a_DeadlineDuration)
Sets the value of the attribute: DEADLINE_DURATION. |
void |
setDescription(String a_Description)
Sets the value of the attribute: DESCRIPTION. |
void |
setDSQEN(long a_DSQEN)
Sets the value of the attribute: D_SQEN. |
void |
setEndTime(Timestamp a_EndTime)
Sets the value of the attribute: END_TIME. |
void |
setEventConfiguration(WfEventConfiguration a_EventConfiguration)
Sets the value of the attribute: EVENT_CONFIGURATION. |
void |
setKey(long a_Key)
Sets the value of the attribute: KEY. |
void |
setName(String a_Name)
Sets the value of the attribute: NAME. |
void |
setPdSQEN(long a_PdSQEN)
Sets the value of the attribute: PD_SQEN. |
void |
setPriority(long a_Priority)
Sets the value of the attribute: PRIORITY. |
void |
setStartTime(Timestamp a_StartTime)
Sets the value of the attribute: START_TIME. |
void |
setState(WfState a_State)
Sets the value of the attribute: STATE. |
void |
setSuspendTime(long a_SuspendTime)
Sets the value of the attribute: SUSPEND_TIME. |
void |
setTemplate(WfTemplateObjectReference a_Template)
Sets the value of the attribute: TEMPLATE. |
void |
setTimePastDeadline(Timestamp a_TimePastDeadline)
Sets the value of the attribute: TIME_PAST_DEADLINE. |
void |
setTimeToDeadline(Timestamp a_TimeToDeadline)
Sets the value of the attribute: TIME_TO_DEADLINE. |
void |
setTimeToStart(Timestamp a_TimeToStart)
Sets the value of the attribute: TIME_TO_START. |
String |
toString()
Returns a string representation of the execution object. |
Enumeration |
validTransitions()
Returns a list of the valid states that can be reached from the current state. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
void |
writeExternal(PersistentStoreIfc output)
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store. |
Methods inherited from class wt.enterprise.Simple |
getBusinessType, getDomainRef, getEventSet, isInheritedDomain, readVersion, setDomainRef, setEventSet, setInheritedDomain |
Methods inherited from class wt.fc.WTObject |
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wt.fc.Persistable |
checkAttributes, getPersistInfo, getType, setPersistInfo |
Methods inherited from interface wt.fc.NetFactor |
getClassInfo, getConceptualClassname |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final String NAME
private static int NAME_UPPER_LIMIT
private String name
public static final String DESCRIPTION
private static int DESCRIPTION_UPPER_LIMIT
private String description
public static final String PRIORITY
private long priority
public static final String STATE
private static int STATE_UPPER_LIMIT
private WfState state
public static final String CONTEXT
private ProcessData context
public static final String START_TIME
private Timestamp startTime
public static final String END_TIME
private Timestamp endTime
public static final String TEMPLATE
private WfTemplateObjectReference template
public static final String DEADLINE
The algorithm for computing the deadline is the following. The deadline is computed twice: by summing the current time to duration and the time the the host process started (if there is one) to processDuration. The least value is taken as the deadline. The duration or processDuration attribute is ignored is it is zero (no value was set). If both attributes are zero, the dealine is left null.
The computed deadline value can be overwritten using the setDeadline
method. If duration is null or if the dealine is not explictly set,
its value is 'null' meaning that there is no dealine and the object is
never 'overdue.'
Supported API: false
private Timestamp deadline
public static final String SUSPEND_TIME
private long suspendTime
public static final String ALERT_TIME
private long alertTime
protected static final String CHANGE_STATE_TIME
private long changeStateTime
public static final String EVENT_CONFIGURATION
private WfEventConfiguration eventConfiguration
public static final String KEY
Implementation note: the easiest way to satisfy the uniqueness constraints
is to make the key unique over all processes.
Supported API: false
private long key
public static final String TIME_TO_START
For nested processes and activities the current time is added to both the startDelay and the startProcessDelay: the greater is picked as the timeToStart. If both startDelay and startProcessDelay are zero then timeToStart is left null.
For stand alone processes it should be possible to overwrite the default
time with an absolute time.
Supported API: false
private Timestamp timeToStart
public static final String TIME_TO_DEADLINE
private Timestamp timeToDeadline
public static final String TIME_PAST_DEADLINE
private Timestamp timePastDeadline
public static final String EXCEPTION_MESSAGE
public static final String DEADLINE_DURATION
private long deadlineDuration
public static final String AD_SQEN
private long adSQEN
public static final String D_SQEN
private long dSQEN
public static final String PD_SQEN
private long pdSQEN
public static final String CONTAINER
private WTContainerRef containerReference
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static final long R60_EXTERNALIZATION_VERSION_UID
private static final long R30_EXTERNALIZATION_VERSION_UID
private static final boolean VERBOSE
Constructor Detail |
public WfExecutionObject()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class Simple
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class Simple
input
-
IOException
ClassNotFoundException
protected boolean readVersion(WfExecutionObject thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public void writeExternal(PersistentStoreIfc output) throws SQLException, DatastoreException
(Not intended for general use.)
Supported API: false
writeExternal
in interface ObjectMappable
writeExternal
in class Simple
output
-
SQLException
DatastoreException
public void readExternal(PersistentRetrieveIfc input) throws SQLException, DatastoreException
(Not intended for general
use.)
Supported API: false
readExternal
in interface ObjectMappable
readExternal
in class Simple
input
-
SQLException
DatastoreException
public String getName()
public void setName(String a_Name)
a_Name
- public String getDescription()
public void setDescription(String a_Description)
a_Description
- public long getPriority()
public void setPriority(long a_Priority)
a_Priority
- public WfState getState()
public void setState(WfState a_State)
a_State
- public ProcessData getContext()
public void setContext(ProcessData a_Context)
a_Context
- public Timestamp getStartTime()
public void setStartTime(Timestamp a_StartTime)
a_StartTime
- public Timestamp getEndTime()
public void setEndTime(Timestamp a_EndTime)
a_EndTime
- public WfTemplateObjectReference getTemplate()
public void setTemplate(WfTemplateObjectReference a_Template)
a_Template
- public Timestamp getDeadline()
The algorithm for computing the deadline is the following. The deadline is computed twice: by summing the current time to duration and the time the the host process started (if there is one) to processDuration. The least value is taken as the deadline. The duration or processDuration attribute is ignored is it is zero (no value was set). If both attributes are zero, the dealine is left null.
The computed deadline value can be overwritten using the setDeadline
method. If duration is null or if the dealine is not explictly set,
its value is 'null' meaning that there is no dealine and the object
is never 'overdue.'
Supported API: false
public void setDeadline(Timestamp a_Deadline)
The algorithm for computing the deadline is the following. The deadline is computed twice: by summing the current time to duration and the time the the host process started (if there is one) to processDuration. The least value is taken as the deadline. The duration or processDuration attribute is ignored is it is zero (no value was set). If both attributes are zero, the dealine is left null.
The computed deadline value can be overwritten using the setDeadline
method. If duration is null or if the dealine is not explictly set,
its value is 'null' meaning that there is no dealine and the object
is never 'overdue.'
Supported API: false
a_Deadline
- public long getSuspendTime()
public void setSuspendTime(long a_SuspendTime)
a_SuspendTime
- public long getAlertTime()
public void setAlertTime(long a_AlertTime)
a_AlertTime
- protected long getChangeStateTime()
protected void setChangeStateTime(long a_ChangeStateTime)
a_ChangeStateTime
- public WfEventConfiguration getEventConfiguration()
public void setEventConfiguration(WfEventConfiguration a_EventConfiguration)
a_EventConfiguration
- public long getKey()
Implementation note: the easiest way to satisfy the uniqueness
constraints is to make the key unique over all processes.
Supported API: false
public void setKey(long a_Key)
Implementation note: the easiest way to satisfy the uniqueness
constraints is to make the key unique over all processes.
Supported API: false
a_Key
- public Timestamp getTimeToStart()
For nested processes and activities the current time is added to both the startDelay and the startProcessDelay: the greater is picked as the timeToStart. If both startDelay and startProcessDelay are zero then timeToStart is left null.
For stand alone processes it should be possible to overwrite the
default time with an absolute time.
Supported API: false
public void setTimeToStart(Timestamp a_TimeToStart)
For nested processes and activities the current time is added to both the startDelay and the startProcessDelay: the greater is picked as the timeToStart. If both startDelay and startProcessDelay are zero then timeToStart is left null.
For stand alone processes it should be possible to overwrite the
default time with an absolute time.
Supported API: false
a_TimeToStart
- public Timestamp getTimeToDeadline()
public void setTimeToDeadline(Timestamp a_TimeToDeadline)
a_TimeToDeadline
- public Timestamp getTimePastDeadline()
public void setTimePastDeadline(Timestamp a_TimePastDeadline)
a_TimePastDeadline
- public long getDeadlineDuration()
public void setDeadlineDuration(long a_DeadlineDuration)
a_DeadlineDuration
- public long getAdSQEN()
public void setAdSQEN(long a_AdSQEN)
a_AdSQEN
- public long getDSQEN()
public void setDSQEN(long a_DSQEN)
a_DSQEN
- public long getPdSQEN()
public void setPdSQEN(long a_PdSQEN)
a_PdSQEN
- public WfExecutionObject changeStateAttributes(WfTransition transition) throws WTException
transition
-
WTException
public Enumeration validTransitions()
public String toString()
toString
in class WTObject
public WfExecutionObject evaluateExpression(Object transition) throws WTException
transition
-
WTException
public String getIdentity()
getIdentity
in interface Persistable
getIdentity
in class Simple
public void resetValues() throws WTException
WTException
public boolean isOverdue()
public abstract WfExecutionObject changeState(WfTransition transition) throws WTException
transition
-
WTException
protected abstract void computeDeadline(long now) throws WTException
now
-
WTException
protected void computeTimeToDeadline()
protected void computeTimePastDeadline()
public WfExecutionObject changeDeadline(Timestamp deadline) throws WTException
deadline
-
WTException
public boolean removeDeadlineQueueEntries() throws WTException
WTException
public String getContainerName()
WTContainer
this object is assigned to.
getContainerName
in interface WTContained
public WTContainer getContainer()
getContainer
in interface WTContained
public void setContainer(WTContainer a_Container) throws WTPropertyVetoException, WTException
setContainer
in interface WTContained
a_Container
-
WTPropertyVetoException
WTException
public WTContainerRef getContainerReference()
getContainerReference
in interface WTContained
public void setContainerReference(WTContainerRef a_ContainerReference) throws WTPropertyVetoException
setContainerReference
in interface WTContained
a_ContainerReference
-
WTPropertyVetoException
private void containerReferenceValidate(WTContainerRef a_ContainerReference) throws WTPropertyVetoException
a_ContainerReference
-
WTPropertyVetoException
public boolean equals(Object obj)
ObjectIdentifier
s.
Changed or stale copies are still considered equal by this method.
Delegates to PersistenceHelper.equals(Persistable,Object)
.
Warning: Certain core Windchill operations may depend upon
equals
being ObjectIdentifier
-based. Changes
to the default implementation should be done with care, if at all.
Supported API: false
equals
in class Simple
obj
-
public int hashCode()
ObjectIdentifier
.
Delegates to PersistenceHelper.hashCode(Persistable)
.
Warning: Certain core Windchill operations may depend upon
hashCode
being ObjectIdentifier-based
. Changes
to the default implementation should be done with care, if at all.
Supported API: false
hashCode
in class Simple
protected Timestamp calculateTimeToDeadline()
protected Timestamp calculateTimePastDeadline()
protected void initialize() throws WTException
Simple
initialize
in class Simple
WTException
protected void initialize(WTContainerRef context_ref) throws WTException
WTException
protected WfDueDate getVarDueDate()
protected WfDuration getVarDuration()
protected WfAssigneeNotification getVarNotification()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |