wt.workflow.engine
Class WfExecutionObject

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.enterprise.Simple
          extended bywt.workflow.engine.WfExecutionObject
All Implemented Interfaces:
AccessControlled, BusinessInformation, DisplayIdentification, DomainAdministered, Externalizable, NetFactor, Notifiable, ObjectMappable, Persistable, RecentlyVisited, Serializable, WTContained
Direct Known Subclasses:
WfActivity, WfContainer

public abstract class WfExecutionObject
extends Simple
implements WTContained, Externalizable

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

See Also:
Serialized Form

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 ObjectIdentifiers.
 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

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

NAME

public static final String NAME
Label for the attribute; Human readable, descriptive identifier of the execution object.

Supported API: true

See Also:
Constant Field Values

NAME_UPPER_LIMIT

private static int NAME_UPPER_LIMIT

name

private String name

DESCRIPTION

public static final String DESCRIPTION
Label for the attribute; Description of the execution object.

Supported API: false

See Also:
Constant Field Values

DESCRIPTION_UPPER_LIMIT

private static int DESCRIPTION_UPPER_LIMIT

description

private String description

PRIORITY

public static final String PRIORITY
Label for the attribute; Relative priority of the execution object in the set of all objects of a given type. Valid values are numbers between one and five, with three being "normal" and one as the "highest" priority.

Supported API: true

See Also:
Constant Field Values

priority

private long priority

STATE

public static final String STATE
Label for the attribute; State of the object.

Supported API: false

See Also:
Constant Field Values

STATE_UPPER_LIMIT

private static int STATE_UPPER_LIMIT

state

private WfState state

CONTEXT

public static final String CONTEXT
Label for the attribute; Input and output data for the execution object. The context is described by a set of named variables (also called "attributes" or "properties"). These variables can be both read and written by the object. The context for a process correspond to the global data for all process activities. For activities, it is possible to map its (local) variables onto process (global) variables. This mapping provides the way by which activities communicate data.

Supported API: true

See Also:
Constant Field Values

context

private ProcessData context

START_TIME

public static final String START_TIME
Label for the attribute; Time the execution of the object started. Set by the 'start' transition.

Supported API: false

See Also:
Constant Field Values

startTime

private Timestamp startTime

END_TIME

public static final String END_TIME
Label for the attribute; Time in which the enactment of the object ended. It is set by the complete, terminate and abort transitions.

Supported API: false

See Also:
Constant Field Values

endTime

private Timestamp endTime

TEMPLATE

public static final String TEMPLATE
Label for the attribute; Reference to the template object from which the execution object was derived. This object can be accessed using the 'getTemplate' method.

Supported API: false

See Also:
Constant Field Values

template

private WfTemplateObjectReference template

DEADLINE

public static final String DEADLINE
Label for the attribute; Attribute that captures when the activty or process should complete. It is computed adding the start time and the duration attributes (duration and process duration) from the object's template.

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

See Also:
Constant Field Values

deadline

private Timestamp deadline

SUSPEND_TIME

public static final String SUSPEND_TIME
Label for the attribute; Total time in milliseconds the object has been suspended.

Supported API: false

See Also:
Constant Field Values

suspendTime

private long suspendTime

ALERT_TIME

public static final String ALERT_TIME
Label for the attribute; Total time in milliseconds the execution object has been running.

Supported API: false

See Also:
Constant Field Values

alertTime

private long alertTime

CHANGE_STATE_TIME

protected static final String CHANGE_STATE_TIME
Label for the attribute; Time of the last change of state. This is an internal attribute used to compute suspend and alert times.

Supported API: false

See Also:
Constant Field Values

changeStateTime

private long changeStateTime

EVENT_CONFIGURATION

public static final String EVENT_CONFIGURATION
Label for the attribute; Attribute holding which internal execution events should be recorded and/or emitted.

Supported API: false

See Also:
Constant Field Values

eventConfiguration

private WfEventConfiguration eventConfiguration

KEY

public static final String KEY
Label for the attribute; Identifier of the execution object. The key of a WfProcess is unique amongst the set of all processes created by a particular WfProcessTemplate; the key of an activity is unique within the set of all activities contained in a particular WfProcess.

Implementation note: the easiest way to satisfy the uniqueness constraints is to make the key unique over all processes.

Supported API: false

See Also:
Constant Field Values

key

private long key

TIME_TO_START

public static final String TIME_TO_START
Label for the attribute; Time the execution of the object should wait until it starts. If null execution starts immediately. For stand-alone processes the default time to start is computed by adding the startDelay to the current time, if startDelay is not zero. If startDelay is zero then timeToStart is left null.

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

See Also:
Constant Field Values

timeToStart

private Timestamp timeToStart

TIME_TO_DEADLINE

public static final 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.

Supported API: false

See Also:
Constant Field Values

timeToDeadline

private Timestamp timeToDeadline

TIME_PAST_DEADLINE

public static final 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..

Supported API: false

See Also:
Constant Field Values

timePastDeadline

private Timestamp timePastDeadline

EXCEPTION_MESSAGE

public static final String EXCEPTION_MESSAGE


Supported API: false

See Also:
Constant Field Values

DEADLINE_DURATION

public static final String DEADLINE_DURATION
Label for the attribute; Attribute that captures a time span after which the activty or process should be completed. It is used to compute the deadline. See the deadline attribute on this class.

Supported API: false

See Also:
Constant Field Values

deadlineDuration

private long deadlineDuration

AD_SQEN

public static final String AD_SQEN
Label for the attribute; Attribute that captures a the ScheduleQueueEntry number. for the approaching Deadline check. It is used to lookup this entry so that it can be removed id a deadline update is in progress.

Supported API: false

See Also:
Constant Field Values

adSQEN

private long adSQEN

D_SQEN

public static final String D_SQEN
Label for the attribute; Attribute that captures a the ScheduleQueueEntry number. for the deadline check. It is used to lookup this entry so that it can be removed id a deadline update is in progress.

Supported API: false

See Also:
Constant Field Values

dSQEN

private long dSQEN

PD_SQEN

public static final String PD_SQEN
Label for the attribute; Attribute that captures a the ScheduleQueueEntry number. for the past Deadline check. It is used to lookup this entry so that it can be removed id a deadline update is in progress.

Supported API: false

See Also:
Constant Field Values

pdSQEN

private long pdSQEN

CONTAINER

public static final String CONTAINER
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

containerReference

private WTContainerRef containerReference

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

R60_EXTERNALIZATION_VERSION_UID

private static final long R60_EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

R30_EXTERNALIZATION_VERSION_UID

private static final long R30_EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

VERBOSE

private static final boolean VERBOSE
Constructor Detail

WfExecutionObject

public WfExecutionObject()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class Simple
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class Simple
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(WfExecutionObject thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
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.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Overrides:
writeExternal in class Simple
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Overrides:
readExternal in class Simple
Parameters:
input -
Throws:
SQLException
DatastoreException

getName

public String getName()
Gets the value of the attribute: NAME. Human readable, descriptive identifier of the execution object.

Supported API: true

Returns:
String

setName

public void setName(String a_Name)
Sets the value of the attribute: NAME. Human readable, descriptive identifier of the execution object.

Supported API: true

Parameters:
a_Name -

getDescription

public String getDescription()
Gets the value of the attribute: DESCRIPTION. Description of the execution object.

Supported API: false

Returns:
String

setDescription

public void setDescription(String a_Description)
Sets the value of the attribute: DESCRIPTION. Description of the execution object.

Supported API: false

Parameters:
a_Description -

getPriority

public long getPriority()
Gets the value of the attribute: PRIORITY. Relative priority of the execution object in the set of all objects of a given type. Valid values are numbers between one and five, with three being "normal" and one as the "highest" priority.

Supported API: true

Returns:
long

setPriority

public void setPriority(long a_Priority)
Sets the value of the attribute: PRIORITY. Relative priority of the execution object in the set of all objects of a given type. Valid values are numbers between one and five, with three being "normal" and one as the "highest" priority.

Supported API: true

Parameters:
a_Priority -

getState

public WfState getState()
Gets the value of the attribute: STATE. State of the object.

Supported API: false

Returns:
WfState

setState

public void setState(WfState a_State)
Sets the value of the attribute: STATE. State of the object.

Supported API: false

Parameters:
a_State -

getContext

public ProcessData getContext()
Gets the value of the attribute: CONTEXT. Input and output data for the execution object. The context is described by a set of named variables (also called "attributes" or "properties"). These variables can be both read and written by the object. The context for a process correspond to the global data for all process activities. For activities, it is possible to map its (local) variables onto process (global) variables. This mapping provides the way by which activities communicate data.

Supported API: true

Returns:
ProcessData

setContext

public void setContext(ProcessData a_Context)
Sets the value of the attribute: CONTEXT. Input and output data for the execution object. The context is described by a set of named variables (also called "attributes" or "properties"). These variables can be both read and written by the object. The context for a process correspond to the global data for all process activities. For activities, it is possible to map its (local) variables onto process (global) variables. This mapping provides the way by which activities communicate data.

Supported API: true

Parameters:
a_Context -

getStartTime

public Timestamp getStartTime()
Gets the value of the attribute: START_TIME. Time the execution of the object started. Set by the 'start' transition.

Supported API: false

Returns:
Timestamp

setStartTime

public void setStartTime(Timestamp a_StartTime)
Sets the value of the attribute: START_TIME. Time the execution of the object started. Set by the 'start' transition.

Supported API: false

Parameters:
a_StartTime -

getEndTime

public Timestamp getEndTime()
Gets the value of the attribute: END_TIME. Time in which the enactment of the object ended. It is set by the complete, terminate and abort transitions.

Supported API: false

Returns:
Timestamp

setEndTime

public void setEndTime(Timestamp a_EndTime)
Sets the value of the attribute: END_TIME. Time in which the enactment of the object ended. It is set by the complete, terminate and abort transitions.

Supported API: false

Parameters:
a_EndTime -

getTemplate

public WfTemplateObjectReference getTemplate()
Gets the value of the attribute: TEMPLATE. Reference to the template object from which the execution object was derived. This object can be accessed using the 'getTemplate' method.

Supported API: false

Returns:
WfTemplateObjectReference

setTemplate

public void setTemplate(WfTemplateObjectReference a_Template)
Sets the value of the attribute: TEMPLATE. Reference to the template object from which the execution object was derived. This object can be accessed using the 'getTemplate' method.

Supported API: false

Parameters:
a_Template -

getDeadline

public Timestamp getDeadline()
Gets the value of the attribute: DEADLINE. Attribute that captures when the activty or process should complete. It is computed adding the start time and the duration attributes (duration and process duration) from the object's template.

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

Returns:
Timestamp

setDeadline

public void setDeadline(Timestamp a_Deadline)
Sets the value of the attribute: DEADLINE. Attribute that captures when the activty or process should complete. It is computed adding the start time and the duration attributes (duration and process duration) from the object's template.

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

Parameters:
a_Deadline -

getSuspendTime

public long getSuspendTime()
Gets the value of the attribute: SUSPEND_TIME. Total time in milliseconds the object has been suspended.

Supported API: false

Returns:
long

setSuspendTime

public void setSuspendTime(long a_SuspendTime)
Sets the value of the attribute: SUSPEND_TIME. Total time in milliseconds the object has been suspended.

Supported API: false

Parameters:
a_SuspendTime -

getAlertTime

public long getAlertTime()
Gets the value of the attribute: ALERT_TIME. Total time in milliseconds the execution object has been running.

Supported API: false

Returns:
long

setAlertTime

public void setAlertTime(long a_AlertTime)
Sets the value of the attribute: ALERT_TIME. Total time in milliseconds the execution object has been running.

Supported API: false

Parameters:
a_AlertTime -

getChangeStateTime

protected long getChangeStateTime()
Gets the value of the attribute: CHANGE_STATE_TIME. Time of the last change of state. This is an internal attribute used to compute suspend and alert times.

Supported API: false

Returns:
long

setChangeStateTime

protected void setChangeStateTime(long a_ChangeStateTime)
Sets the value of the attribute: CHANGE_STATE_TIME. Time of the last change of state. This is an internal attribute used to compute suspend and alert times.

Supported API: false

Parameters:
a_ChangeStateTime -

getEventConfiguration

public WfEventConfiguration getEventConfiguration()
Gets the value of the attribute: EVENT_CONFIGURATION. Attribute holding which internal execution events should be recorded and/or emitted.

Supported API: false

Returns:
WfEventConfiguration

setEventConfiguration

public void setEventConfiguration(WfEventConfiguration a_EventConfiguration)
Sets the value of the attribute: EVENT_CONFIGURATION. Attribute holding which internal execution events should be recorded and/or emitted.

Supported API: false

Parameters:
a_EventConfiguration -

getKey

public long getKey()
Gets the value of the attribute: KEY. Identifier of the execution object. The key of a WfProcess is unique amongst the set of all processes created by a particular WfProcessTemplate; the key of an activity is unique within the set of all activities contained in a particular WfProcess.

Implementation note: the easiest way to satisfy the uniqueness constraints is to make the key unique over all processes.

Supported API: false

Returns:
long

setKey

public void setKey(long a_Key)
Sets the value of the attribute: KEY. Identifier of the execution object. The key of a WfProcess is unique amongst the set of all processes created by a particular WfProcessTemplate; the key of an activity is unique within the set of all activities contained in a particular WfProcess.

Implementation note: the easiest way to satisfy the uniqueness constraints is to make the key unique over all processes.

Supported API: false

Parameters:
a_Key -

getTimeToStart

public Timestamp getTimeToStart()
Gets the value of the attribute: TIME_TO_START. Time the execution of the object should wait until it starts. If null execution starts immediately. For stand-alone processes the default time to start is computed by adding the startDelay to the current time, if startDelay is not zero. If startDelay is zero then timeToStart is left null.

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

Returns:
Timestamp

setTimeToStart

public void setTimeToStart(Timestamp a_TimeToStart)
Sets the value of the attribute: TIME_TO_START. Time the execution of the object should wait until it starts. If null execution starts immediately. For stand-alone processes the default time to start is computed by adding the startDelay to the current time, if startDelay is not zero. If startDelay is zero then timeToStart is left null.

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

Parameters:
a_TimeToStart -

getTimeToDeadline

public Timestamp getTimeToDeadline()
Gets the value of the attribute: TIME_TO_DEADLINE. Time the execution of the object that, when reached, triggers a notification to appropriate parties that the deadline is approaching.

Supported API: false

Returns:
Timestamp

setTimeToDeadline

public void setTimeToDeadline(Timestamp a_TimeToDeadline)
Sets the value of the attribute: TIME_TO_DEADLINE. Time the execution of the object that, when reached, triggers a notification to appropriate parties that the deadline is approaching.

Supported API: false

Parameters:
a_TimeToDeadline -

getTimePastDeadline

public Timestamp getTimePastDeadline()
Gets the value of the attribute: TIME_PAST_DEADLINE. Time the execution of the object that, when reached, triggers a notification to appropriate parties that the deadline has passed..

Supported API: false

Returns:
Timestamp

setTimePastDeadline

public void setTimePastDeadline(Timestamp a_TimePastDeadline)
Sets the value of the attribute: TIME_PAST_DEADLINE. Time the execution of the object that, when reached, triggers a notification to appropriate parties that the deadline has passed..

Supported API: false

Parameters:
a_TimePastDeadline -

getDeadlineDuration

public long getDeadlineDuration()
Gets the value of the attribute: DEADLINE_DURATION. Attribute that captures a time span after which the activty or process should be completed. It is used to compute the deadline. See the deadline attribute on this class.

Supported API: false

Returns:
long

setDeadlineDuration

public void setDeadlineDuration(long a_DeadlineDuration)
Sets the value of the attribute: DEADLINE_DURATION. Attribute that captures a time span after which the activty or process should be completed. It is used to compute the deadline. See the deadline attribute on this class.

Supported API: false

Parameters:
a_DeadlineDuration -

getAdSQEN

public long getAdSQEN()
Gets the value of the attribute: AD_SQEN. Attribute that captures a the ScheduleQueueEntry number. for the approaching Deadline check. It is used to lookup this entry so that it can be removed id a deadline update is in progress.

Supported API: false

Returns:
long

setAdSQEN

public void setAdSQEN(long a_AdSQEN)
Sets the value of the attribute: AD_SQEN. Attribute that captures a the ScheduleQueueEntry number. for the approaching Deadline check. It is used to lookup this entry so that it can be removed id a deadline update is in progress.

Supported API: false

Parameters:
a_AdSQEN -

getDSQEN

public long getDSQEN()
Gets the value of the attribute: D_SQEN. Attribute that captures a the ScheduleQueueEntry number. for the deadline check. It is used to lookup this entry so that it can be removed id a deadline update is in progress.

Supported API: false

Returns:
long

setDSQEN

public void setDSQEN(long a_DSQEN)
Sets the value of the attribute: D_SQEN. Attribute that captures a the ScheduleQueueEntry number. for the deadline check. It is used to lookup this entry so that it can be removed id a deadline update is in progress.

Supported API: false

Parameters:
a_DSQEN -

getPdSQEN

public long getPdSQEN()
Gets the value of the attribute: PD_SQEN. Attribute that captures a the ScheduleQueueEntry number. for the past Deadline check. It is used to lookup this entry so that it can be removed id a deadline update is in progress.

Supported API: false

Returns:
long

setPdSQEN

public void setPdSQEN(long a_PdSQEN)
Sets the value of the attribute: PD_SQEN. Attribute that captures a the ScheduleQueueEntry number. for the past Deadline check. It is used to lookup this entry so that it can be removed id a deadline update is in progress.

Supported API: false

Parameters:
a_PdSQEN -

changeStateAttributes

public WfExecutionObject changeStateAttributes(WfTransition transition)
                                        throws WTException
Updates the current state of the execution object. Returns the updated (but not persisted) object. A TransitionNotAllowed exception is thrown when the transition from the current state is not allowed. Other exceptions can be thrown with more detailed information.

Supported API: false

Parameters:
transition -
Returns:
WfExecutionObject
Throws:
WTException

validTransitions

public Enumeration validTransitions()
Returns a list of the valid states that can be reached from the current state.

Supported API: false

Returns:
Enumeration

toString

public String toString()
Returns a string representation of the execution object. Used mostly for debugging purposes: not appropriate for GUI use.

Supported API: false

Overrides:
toString in class WTObject
Returns:
String

evaluateExpression

public WfExecutionObject evaluateExpression(Object transition)
                                     throws WTException
Evaluates the expression associated with the given transition. If the expression returns 'false' a "FailedTransitionExpression" is thrown. The method returns the execution object, with all changes that occurred inside the expression evaluation already persisted.

Supported API: false

Parameters:
transition -
Returns:
WfExecutionObject
Throws:
WTException

getIdentity

public String getIdentity()
Returns a string representing the identity of the object.

Supported API: false

Specified by:
getIdentity in interface Persistable
Overrides:
getIdentity in class Simple
Returns:
String

resetValues

public void resetValues()
                 throws WTException
Set variable values to initial values for resetable variables. These values are either the default values or null.

Supported API: false

Throws:
WTException

isOverdue

public boolean isOverdue()
Determines if the object is overdue. An overdue execution object is one such that its deadline has passed. Returns true if this is the case; false otherwise or if the object does not have a deadline.

Supported API: false

Returns:
boolean

changeState

public abstract WfExecutionObject changeState(WfTransition transition)
                                       throws WTException
Forces a change of state on the object. This is an abstract method.

Supported API: false

Parameters:
transition -
Returns:
WfExecutionObject
Throws:
WTException

computeDeadline

protected abstract void computeDeadline(long now)
                                 throws WTException
Computes deadline. Abstract method implemented by derived WfProcess and WfActivity classes.

Supported API: false

Parameters:
now -
Throws:
WTException

computeTimeToDeadline

protected void computeTimeToDeadline()
Computes time to deadline. Abstract method implemented by derived WfProcess and WfActivity classes.

Supported API: false


computeTimePastDeadline

protected void computeTimePastDeadline()
Computes time past deadline. Abstract method implemented by derived WfProcess and WfActivity classes.

Supported API: false


changeDeadline

public WfExecutionObject changeDeadline(Timestamp deadline)
                                 throws WTException
Changes the deadline of the object to the given deadline and recomputes the timeToDeadline and timePastDeadline. Deadline notifications are sent based on these updated attributes of the object.

Supported API: false

Parameters:
deadline -
Returns:
WfExecutionObject
Throws:
WTException

removeDeadlineQueueEntries

public boolean removeDeadlineQueueEntries()
                                   throws WTException
This method will attempt to update the dedaline schedule queue entries to a NOT_READY state; and then delete them from the database. The state change is necdessary to prevent the schedule queue from processing the entry while the delete transaction is being processed. If an ObjectIsStale exception is thrown from their update call, the schedule queue is processing the entry; and the ability to delete this entry has passed.

Supported API: false

Returns:
boolean
Throws:
WTException

getContainerName

public String getContainerName()
Gets the value of the attribute: CONTAINER_NAME. The name of the WTContainer this object is assigned to.

Supported API: false

Specified by:
getContainerName in interface WTContained
Returns:
String

getContainer

public WTContainer getContainer()
Gets the object for the association that plays role: CONTAINER.

Supported API: false

Specified by:
getContainer in interface WTContained
Returns:
WTContainer

setContainer

public void setContainer(WTContainer a_Container)
                  throws WTPropertyVetoException,
                         WTException
Sets the object for the association that plays role: CONTAINER.

Supported API: false

Specified by:
setContainer in interface WTContained
Parameters:
a_Container -
Throws:
WTPropertyVetoException
WTException

getContainerReference

public WTContainerRef getContainerReference()
Gets the value of the attribute: CONTAINER_REFERENCE.

Supported API: false

Specified by:
getContainerReference in interface WTContained
Returns:
WTContainerRef

setContainerReference

public void setContainerReference(WTContainerRef a_ContainerReference)
                           throws WTPropertyVetoException
Sets the value of the attribute: CONTAINER_REFERENCE.

Supported API: false

Specified by:
setContainerReference in interface WTContained
Parameters:
a_ContainerReference -
Throws:
WTPropertyVetoException

containerReferenceValidate

private void containerReferenceValidate(WTContainerRef a_ContainerReference)
                                 throws WTPropertyVetoException
Parameters:
a_ContainerReference -
Throws:
WTPropertyVetoException

equals

public boolean equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers. 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

Overrides:
equals in class Simple
Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code for this object based upon its 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

Overrides:
hashCode in class Simple
Returns:
int

calculateTimeToDeadline

protected Timestamp calculateTimeToDeadline()

calculateTimePastDeadline

protected Timestamp calculateTimePastDeadline()

initialize

protected void initialize()
                   throws WTException
Description copied from class: Simple


Supported API: false

Overrides:
initialize in class Simple
Throws:
WTException

initialize

protected void initialize(WTContainerRef context_ref)
                   throws WTException
Throws:
WTException

getVarDueDate

protected WfDueDate getVarDueDate()

getVarDuration

protected WfDuration getVarDuration()

getVarNotification

protected WfAssigneeNotification getVarNotification()