wt.workflow.engine
Class WfAdHocActivity

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.enterprise.Simple
          extended bywt.workflow.engine.WfExecutionObject
              extended bywt.workflow.engine.WfActivity
                  extended bywt.workflow.work.WfAssignedActivity
                      extended bywt.workflow.engine.WfAdHocActivity
All Implemented Interfaces:
AccessControlled, BusinessInformation, DisplayIdentification, DomainAdministered, Externalizable, NetFactor, Notifiable, ObjectMappable, Persistable, RecentlyVisited, Serializable, WfNode, WfRequester, WTContained

public class WfAdHocActivity
extends WfAssignedActivity
implements WfRequester, Externalizable

Use the newWfAdHocActivity static factory method(s), not the WfAdHocActivity constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static boolean ABORT_PROCESS_ON_ABORT
           
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private  WfContainerReference performerRef
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static boolean VERBOSE
           
 
Fields inherited from class wt.workflow.work.WfAssignedActivity
INSTRUCTIONS, INSTRUCTIONS_VARIABLE_NAME
 
Fields inherited from class wt.workflow.engine.WfActivity
INPUT_VARIABLE_MAP, OUTPUT_VARIABLE_MAP, ROUTER_TYPE, TRIP_COUNT, USER_EVENT_LIST
 
Fields inherited from class wt.workflow.engine.WfExecutionObject
AD_SQEN, ALERT_TIME, CHANGE_STATE_TIME, CONTAINER, CONTEXT, D_SQEN, DEADLINE, DEADLINE_DURATION, DESCRIPTION, END_TIME, EVENT_CONFIGURATION, EXCEPTION_MESSAGE, KEY, NAME, PD_SQEN, PRIORITY, START_TIME, STATE, SUSPEND_TIME, TEMPLATE, TIME_PAST_DEADLINE, TIME_TO_DEADLINE, TIME_TO_START
 
Fields inherited from class wt.enterprise.Simple
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.workflow.engine.WfRequester
PERFORMER_REF
 
Fields inherited from interface wt.workflow.engine.WfNode
PARENT_PROCESS_REF
 
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
WfAdHocActivity()
           
 
Method Summary
 WfExecutionObject changeState(WfTransition transition)
          This method is used by containing process of application to force the process to undergo state changes.
 WfExecutionObject changeState(WfTransition transition, boolean propagate)
          Updates the current state of the activity.
protected  WfExecutionObject changeState(WfTransition transition, boolean is_immediate, boolean propagate)
          Protected method that does the actual state change work.
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
private  boolean finished()
          Checks whether the performer is finished.
 String getConceptualClassname()
          Deprecated.  
 ProcessData getContext()
          Returns the performer's context if there is a performer associated with the activity; otherwise, returns the activity's context.
 WfContainer getPerformer()
          Returns the process associated with the requester.
 WfContainerReference getPerformerRef()
          Gets the value of the attribute: PERFORMER_REF.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
static WfAdHocActivity newWfAdHocActivity(WfContainer container)
          Ad hoc activity constructor.
 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(WfAdHocActivity thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void receiveEvent(Object event)
          This operation is used by the associated WfProcess to notify its requester of workflow events.
 void setPerformerRef(WfContainerReference a_PerformerRef)
          Sets the value of the attribute: PERFORMER_REF.
 String toString()
          Returns a string representation of the requester activity.
 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.workflow.work.WfAssignedActivity
acceptAssignment, createWfAssignment, createWorkAssignment, deleteActivity, doAbortTransition, doCompleteTransition, doResetTransition, doSkipTransition, doStartTransition, doTerminateTransition, finalizeAssignments, getAllAssignments, getAllBallots, getAllEvents, getAssignments, getAssignments, getDefaultParticipants, getInstructions, isComplete, newWfAssignedActivity, readValues, readVersion, recreateWorkAssignment, replaceVariables, resolveAssigneesToPRefs, restartActivity, setInstructions, tally, tallyByActivity, tallyByAssignment
 
Methods inherited from class wt.workflow.engine.WfActivity
checkSuspendedProcess, complete, computeDeadline, computeDeadline, computeTimeToStart, doDisableTransition, doEnableTransition, doResumeTransition, doSuspendTransition, doWork, evaluateRouterExpression, getInputVariableMap, getOutputVariableMap, getParentProcess, getParentProcessReadOnly, getParentProcessRef, getRouterEvent, getRouterType, getTemplateReference, getTripCount, getUserEventList, getWfException, hasRouterExpression, initialize, propagateEvent, readVersion, registerEvent, setInputVariableMap, setOutputVariableMap, setParentProcessRef, setRouterType, setTripCount, setUserEventList, updateWfAssigneeNotification, updateWfDueDate, updateWfDuration, writeValues
 
Methods inherited from class wt.workflow.engine.WfExecutionObject
calculateTimePastDeadline, calculateTimeToDeadline, changeDeadline, changeStateAttributes, computeTimePastDeadline, computeTimeToDeadline, evaluateExpression, getAdSQEN, getAlertTime, getChangeStateTime, getContainer, getContainerName, getContainerReference, getDeadline, getDeadlineDuration, getDescription, getDSQEN, getEndTime, getEventConfiguration, getIdentity, getKey, getName, getPdSQEN, getPriority, getStartTime, getState, getSuspendTime, getTemplate, getTimePastDeadline, getTimeToDeadline, getTimeToStart, getVarDueDate, getVarDuration, getVarNotification, initialize, initialize, isOverdue, readVersion, removeDeadlineQueueEntries, resetValues, setAdSQEN, setAlertTime, setChangeStateTime, setContainer, setContainerReference, setContext, setDeadline, setDeadlineDuration, setDescription, setDSQEN, setEndTime, setEventConfiguration, setKey, setName, setPdSQEN, setPriority, setStartTime, setState, setSuspendTime, setTemplate, setTimePastDeadline, setTimeToDeadline, setTimeToStart, validTransitions
 
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
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

performerRef

private WfContainerReference performerRef

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

VERBOSE

private static final boolean VERBOSE

ABORT_PROCESS_ON_ABORT

private static final boolean ABORT_PROCESS_ON_ABORT
Constructor Detail

WfAdHocActivity

public WfAdHocActivity()
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 WfAssignedActivity
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 WfAssignedActivity
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(WfAdHocActivity 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 WfAssignedActivity
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 WfAssignedActivity
Parameters:
input -
Throws:
SQLException
DatastoreException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class WfAssignedActivity
Returns:
String

newWfAdHocActivity

public static WfAdHocActivity newWfAdHocActivity(WfContainer container)
                                          throws WTException
Ad hoc activity constructor. The parent process is passed as parameter.

Supported API: false

Parameters:
container -
Returns:
WfAdHocActivity
Throws:
WTException

toString

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

Supported API: false

Overrides:
toString in class WfAssignedActivity
Returns:
String

getContext

public ProcessData getContext()
Returns the performer's context if there is a performer associated with the activity; otherwise, returns the activity's context.

Supported API: false

Overrides:
getContext in class WfExecutionObject
Returns:
ProcessData

getPerformerRef

public WfContainerReference getPerformerRef()
Gets the value of the attribute: PERFORMER_REF. Reference to the performer object associated with the requester.

Supported API: false

Specified by:
getPerformerRef in interface WfRequester
Returns:
WfContainerReference

setPerformerRef

public void setPerformerRef(WfContainerReference a_PerformerRef)
Sets the value of the attribute: PERFORMER_REF. Reference to the performer object associated with the requester.

Supported API: false

Specified by:
setPerformerRef in interface WfRequester
Parameters:
a_PerformerRef -

receiveEvent

public void receiveEvent(Object event)
                  throws WTException
This operation is used by the associated WfProcess to notify its requester of workflow events. In particular the WfProcess must notify the requester of complete, terminate or abort events or the transition to a closed state.

Supported API: false

Specified by:
receiveEvent in interface WfRequester
Parameters:
event - WfProcess event; contains the source of the event.
Throws:
WTException

changeState

public WfExecutionObject changeState(WfTransition transition)
                              throws WTException
This method is used by containing process of application to force the process to undergo state changes. Returns the updated (and persisted) object. For example, changeState (WfTransition.START) causes the start of the process.

Supported API: false

Specified by:
changeState in interface WfRequester
Overrides:
changeState in class WfActivity
Parameters:
transition -
Returns:
WfExecutionObject
Throws:
WTException

getPerformer

public WfContainer getPerformer()
                         throws WTException
Returns the process associated with the requester.

Supported API: false

Specified by:
getPerformer in interface WfRequester
Returns:
WfContainer
Throws:
WTException

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 WfAssignedActivity
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 WfAssignedActivity
Returns:
int

changeState

protected WfExecutionObject changeState(WfTransition transition,
                                        boolean is_immediate,
                                        boolean propagate)
                                 throws WTException
Description copied from class: WfActivity
Protected method that does the actual state change work. Updates the current state of the activity. Returns the updated (and persisted) object. A TransitionNotAllowed exception is thrown when the transition from the current state is not allowed. If is_immediate is true, the work associated with the transition is not queued.

Supported API: false

Overrides:
changeState in class WfActivity
Parameters:
transition -
is_immediate -
propagate -
Returns:
WfExecutionObject
Throws:
WTException

finished

private boolean finished()
                  throws WTException
Checks whether the performer is finished. In case of a block ther may exist an expression evaluating the loop.

Throws:
WTException

changeState

public WfExecutionObject changeState(WfTransition transition,
                                     boolean propagate)
                              throws WTException
Description copied from class: WfActivity
Updates the current state of the activity. Returns the updated (and persisted) object. A TransitionNotAllowed exception is thrown when the transition from the current state is not allowed. If propagate is 'false' event is not propagated to successor nodes.

Supported API: false

Overrides:
changeState in class WfActivity
Parameters:
transition -
propagate -
Returns:
WfExecutionObject
Throws:
WTException