wt.workflow.engine
Class WfProcess

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.enterprise.Simple
          extended bywt.workflow.engine.WfExecutionObject
              extended bywt.workflow.engine.WfContainer
                  extended bywt.workflow.engine.WfProcess
All Implemented Interfaces:
AccessControlled, BusinessInformation, ContentHolder, DisplayIdentification, DomainAdministered, Externalizable, NetFactor, Notifiable, ObjectMappable, Ownable, Persistable, RecentlyVisited, RoleHolder, Serializable, SubjectOfForum, SubjectOfNotebook, TeamManaged, WTContained
Direct Known Subclasses:
ProjectPlan

public class WfProcess
extends WfContainer
implements RoleHolder, Ownable, ContentHolder, SubjectOfForum, SubjectOfNotebook, TeamManaged, Externalizable

A WfProcess is the performer of a workflow. It specializes WfExecutionObject and, in general, a WfProcess will represent an instance of a particular process model (e. g., 'approveCreditRequest'), the process steps are represented by WfActivity objects. The WfProcess class may also represent any other discrete unit of work, which needs to be performed asynchronously.

Use the newWfProcess static factory method(s), not the WfProcess 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: true

Extendable: false

See Also:
Serialized Form

Field Summary
protected static String BUSINESS_OBJ_REFERENCE
          Label for the attribute; String containing reference to primary business object.
private static int BUSINESS_OBJ_REFERENCE_UPPER_LIMIT
           
private  String businessObjReference
           
private static String CLASSNAME
           
private  Vector contentVector
           
private  WTPrincipalReference creator
           
static String CREATOR
          Label for the attribute; Reference to the user whoc initiated the process.
private static boolean DELETE_QUEUE_WHEN_CLOSING
           
private static boolean DOMAIN_BASED_WORKFLOW
           
static long EXTERNALIZATION_VERSION_UID
           
private  boolean hasContents
           
private  Vector httpVector
           
protected static long OLD_FORMAT_VERSION_UID
           
private  HttpContentOperation operation
           
private  Ownership ownership
           
private static String PRIM_BUS_OBJ_VAR_NAME
           
static String PROJECT_REF
          Label for the attribute; Reference to the project that the workflow uses to resolve roles onto actual participants.
private  ObjectReference projectRef
           
protected static String PROPAGATION_QUEUE_REFERENCE
          Label for the attribute; Reference to queue that holds internal work requests.
private  ObjectReference propagationQueueReference
           
private static String RESOURCE
           
private  RolePrincipalTable rolePrincipalMap
           
(package private) static long serialVersionUID
           
static String TEAM_ID
          Label for the attribute.
private  TeamReference teamId
           
private  TeamTemplateReference teamTemplateId
           
protected static String USER_WORK_QUEUE_REFERENCE
          Label for the attribute; Reference to queue that holds user work requests.
private  ObjectReference userWorkQueueReference
           
private static boolean VERBOSE
           
 
Fields inherited from class wt.workflow.engine.WfContainer
REQUESTER_REF
 
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.project.RoleHolder
ROLE_PRINCIPAL_MAP
 
Fields inherited from interface wt.ownership.Ownable
OWNERSHIP
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.content.ContentHolder
CONTENT_VECTOR, HAS_CONTENTS, HTTP_VECTOR, OPERATION
 
Fields inherited from interface wt.team.TeamManaged
TEAM_IDENTITY, TEAM_NAME, TEAM_TEMPLATE_ID, TEAM_TEMPLATE_IDENTITY, TEAM_TEMPLATE_NAME
 
Fields inherited from interface wt.inf.container.WTContained
CONTAINER_ID, CONTAINER_NAME, CONTAINER_REFERENCE
 
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
WfProcess()
           
 
Method Summary
 void addPrincipal(Role role, WTPrincipal principal)
          Add a role to principal mapping to the rolePrincipalMap.
 void buildRoleMap(RoleHolder project)
          Populate my roles from the supplied roleHolder
 WfExecutionObject changeState(WfTransition transition)
          Updates the current state of the process.
protected  WfExecutionObject changeState(WfTransition transition, boolean is_immediate)
          Updates the current state of the process.
protected  void computeDeadline(long now)
          Computes process deadline.
protected  Timestamp computeTimeToStart(long now)
          Computes time to start using duration attribute.
private  void creatorValidate(WTPrincipalReference a_Creator)
           
 void deletePrincipal(Role role, WTPrincipal principal)
          Remove role to principal assignment pair

Supported API: false
 void deleteRole(Role role)
          Remove the role and all associated principals from the rolePrincipalMap

Supported API: false
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
 WTReference getBusinessObjectReference(ReferenceFactory rf)
           
protected  String getBusinessObjReference()
          Gets the value of the attribute: BUSINESS_OBJ_REFERENCE.
 String getConceptualClassname()
          Deprecated.  
 Vector getContentVector()
          Gets the value of the attribute: CONTENT_VECTOR.
 WTPrincipalReference getCreator()
          Gets the value of the attribute: CREATOR.
private static WTContainerRef getDefaultContainer()
           
 Vector getHttpVector()
          Gets the value of the attribute: HTTP_VECTOR.
protected  AdminDomainRef getInitialDomain(WTObject pbo, WTContainerRef context_ref)
          Returns initial process folder.
private static ObjectIdentifier getOid(Object object)
           
 HttpContentOperation getOperation()
          Gets the value of the attribute: OPERATION.
 Ownership getOwnership()
          Gets the object for the association that plays role: OWNERSHIP.
 Enumeration getPrincipals(Role role)
          Answer an enumeration of principal references assigned to role

Supported API: false
protected  Vector getPrincipalsForRole(Role role)
           
 Vector getProcessRoles()
          Returns a Vector of Role objects used by this process

Supported API: false
 ObjectReference getProjectRef()
          Gets the value of the attribute: PROJECT_REF.
protected  ObjectReference getPropagationQueueReference()
          Gets the value of the attribute: PROPAGATION_QUEUE_REFERENCE.
 Role getRoleFor(WTPrincipalReference pRef, Enumeration candidateRoles)
          Answer the role associated with the assignee.
 RolePrincipalTable getRolePrincipalMap()
          Gets the value of the attribute: ROLE_PRINCIPAL_MAP.
 Enumeration getRoles()
          Answer an enumeration of roles in the rolePrincipalMap

Supported API: false
private  String getTeamFilePath(Object team_spec, WTContainerRef context_ref)
           
 TeamReference getTeamId()
          Gets the value of the attribute: TEAM_ID.
 String getTeamIdentity()
          Gets the value of the attribute: TEAM_IDENTITY.
 String getTeamName()
          Gets the value of the attribute: TEAM_NAME.
 TeamTemplateReference getTeamTemplateId()
          Gets the object for the association that plays role: TEAM_TEMPLATE_ID.
 String getTeamTemplateIdentity()
          Gets the value of the attribute: TEAM_TEMPLATE_IDENTITY.
 String getTeamTemplateName()
          Gets the value of the attribute: TEAM_TEMPLATE_NAME.
protected  ObjectReference getUserWorkQueueReference()
          Gets the value of the attribute: USER_WORK_QUEUE_REFERENCE.
protected  WfException getWfException(WTException wte, WfTransition transition)
          Returns an exception appropriate to the transition.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
protected  void initialize(WTContainerRef context_ref)
          Supports initialization, following construction of an instance.
private  void initializeRolePrincipalMap()
           
 boolean isHasContents()
          Gets the value of the attribute: HAS_CONTENTS.
 boolean isNested()
          Returns true if process is nested; false otherwise.
private  boolean isValidPbo(Object obj)
           
private  String mapAsString(Hashtable aMap)
           
private  String mapAsString(RolePrincipalMap aMap)
           
static WfProcess newWfProcess()
          Creates process in classic container.
static WfProcess newWfProcess(WTContainerRef context_ref)
          Creates process in the container passed as argument.
private  void projectRefValidate(ObjectReference a_ProjectRef)
           
 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(WfProcess thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 String rolePrincipalMapAsString()
          Answer a string of role to principal mappings

Supported API: false
protected  void setBusinessObjReference(String a_BusinessObjReference)
          Sets the value of the attribute: BUSINESS_OBJ_REFERENCE.
private  WfProcess setContainerInfo(WfProcess process, Object obj, WTContainerRef context_ref)
          Sets container, domain and folder of the process being created.
 void setContentVector(Vector a_ContentVector)
          Sets the value of the attribute: CONTENT_VECTOR.
 void setCreator(WTPrincipalReference a_Creator)
          Sets the value of the attribute: CREATOR.
 void setHasContents(boolean a_HasContents)
          Sets the value of the attribute: HAS_CONTENTS.
 void setHttpVector(Vector a_HttpVector)
          Sets the value of the attribute: HTTP_VECTOR.
 void setOperation(HttpContentOperation a_Operation)
          Sets the value of the attribute: OPERATION.
 void setOwnership(Ownership a_Ownership)
          Sets the object for the association that plays role: OWNERSHIP.
protected  void setPrimaryBusinessObject(ProcessData input)
          Creates the implicit relationship between the process and the primary business object passed as argument.
protected  void setProcessAttributes(WfContainerTemplate template, WTPrincipalReference creator, Object team_spec, WTContainerRef context_ref)
          Set basic process attributes, based on the template and other information passed as arguments.
 void setProjectRef(ObjectReference a_ProjectRef)
          Sets the value of the attribute: PROJECT_REF.
protected  void setPropagationQueueReference(ObjectReference a_PropagationQueueReference)
          Sets the value of the attribute: PROPAGATION_QUEUE_REFERENCE.
 void setRolePrincipalMap(RolePrincipalTable a_RolePrincipalMap)
          Sets the value of the attribute: ROLE_PRINCIPAL_MAP.
private  void setTeam(Object team_spec, WTContainerRef context_ref)
           
 void setTeamId(TeamReference a_TeamId)
          Sets the value of the attribute: TEAM_ID.
 void setTeamTemplateId(TeamTemplateReference a_TeamTemplateId)
          Sets the object for the association that plays role: TEAM_TEMPLATE_ID.
protected  void setUserWorkQueueReference(ObjectReference a_UserWorkQueueReference)
          Sets the value of the attribute: USER_WORK_QUEUE_REFERENCE.
 WfProcess start(ProcessData input, boolean is_immediate, WTContainerRef context_ref)
          Starts a process with a given input data in the context passed as argument.
 WfProcess start(ProcessData input, long priority, boolean is_immediate)
          Deprecated. (as of 7.0) use instead process.setPriority (priority); process.start (input, is_immediate, null);
private  void teamIdValidate(TeamReference a_TeamId)
           
private  void teamTemplateIdValidate(TeamTemplateReference a_TeamTemplateId)
           
 String toString()
          Returns a string representation of the process.
 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.engine.WfContainer
abortContainedActivities, getContainerNodes, getRequester, getRequesterRef, getStartConnector, readVersion, resetContainedActivities, resumeContainedActivities, sendEventToRequester, setRequesterRef, suspendContainedActivities, terminateContainedActivities
 
Methods inherited from class wt.workflow.engine.WfExecutionObject
calculateTimePastDeadline, calculateTimeToDeadline, changeDeadline, changeStateAttributes, computeTimePastDeadline, computeTimeToDeadline, evaluateExpression, getAdSQEN, getAlertTime, getChangeStateTime, getContainer, getContainerName, getContainerReference, getContext, getDeadline, getDeadlineDuration, getDescription, getDSQEN, getEndTime, getEventConfiguration, getIdentity, getKey, getName, getPdSQEN, getPriority, getStartTime, getState, getSuspendTime, getTemplate, getTimePastDeadline, getTimeToDeadline, getTimeToStart, getVarDueDate, getVarDuration, getVarNotification, 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, getIdentity, 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

PROJECT_REF

public static final String PROJECT_REF
Label for the attribute; Reference to the project that the workflow uses to resolve roles onto actual participants. May be null.

Supported API: false

See Also:
Constant Field Values

projectRef

private ObjectReference projectRef

CREATOR

public static final String CREATOR
Label for the attribute; Reference to the user whoc initiated the process.

Supported API: true

See Also:
Constant Field Values

creator

private WTPrincipalReference creator

BUSINESS_OBJ_REFERENCE

protected static final String BUSINESS_OBJ_REFERENCE
Label for the attribute; String containing reference to primary business object. This reference is set at process start and is accessible only through the process' context ('primaryBusinessObject' variable).

Supported API: false

See Also:
ProcessData, WfVariable, Constant Field Values

BUSINESS_OBJ_REFERENCE_UPPER_LIMIT

private static int BUSINESS_OBJ_REFERENCE_UPPER_LIMIT

businessObjReference

private String businessObjReference

USER_WORK_QUEUE_REFERENCE

protected static final String USER_WORK_QUEUE_REFERENCE
Label for the attribute; Reference to queue that holds user work requests. The queue is only associated with at most one process. This happens if dedicatedQueue attribute is set to true.

The queue is created when process is started for the first time and deleted when the process is deleted.

Supported API: false

See Also:
Constant Field Values

userWorkQueueReference

private ObjectReference userWorkQueueReference

PROPAGATION_QUEUE_REFERENCE

protected static final String PROPAGATION_QUEUE_REFERENCE
Label for the attribute; Reference to queue that holds internal work requests. The queue is only associated with at most one process. This happens if dedicatedQueue attribute is set to true.

The queue is created when process is started for the first time and deleted when the process is deleted.

Supported API: false

See Also:
Constant Field Values

propagationQueueReference

private ObjectReference propagationQueueReference

TEAM_ID

public static final String TEAM_ID
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

teamId

private TeamReference teamId

rolePrincipalMap

private RolePrincipalTable rolePrincipalMap

ownership

private Ownership ownership

contentVector

private Vector contentVector

hasContents

private boolean hasContents

operation

private HttpContentOperation operation

httpVector

private Vector httpVector

teamTemplateId

private TeamTemplateReference teamTemplateId

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

PRIM_BUS_OBJ_VAR_NAME

private static final String PRIM_BUS_OBJ_VAR_NAME
See Also:
Constant Field Values

VERBOSE

private static final boolean VERBOSE

DELETE_QUEUE_WHEN_CLOSING

private static final boolean DELETE_QUEUE_WHEN_CLOSING

DOMAIN_BASED_WORKFLOW

private static final boolean DOMAIN_BASED_WORKFLOW
Constructor Detail

WfProcess

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

readVersion

protected boolean readVersion(WfProcess 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 WfContainer
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 WfContainer
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
Returns:
String

getProjectRef

public ObjectReference getProjectRef()
Gets the value of the attribute: PROJECT_REF. Reference to the project that the workflow uses to resolve roles onto actual participants. May be null.

Supported API: false

Specified by:
getProjectRef in class WfContainer
Returns:
ObjectReference

setProjectRef

public void setProjectRef(ObjectReference a_ProjectRef)
                   throws WTPropertyVetoException
Sets the value of the attribute: PROJECT_REF. Reference to the project that the workflow uses to resolve roles onto actual participants. May be null.

Supported API: false

Parameters:
a_ProjectRef -
Throws:
WTPropertyVetoException

projectRefValidate

private void projectRefValidate(ObjectReference a_ProjectRef)
                         throws WTPropertyVetoException
Parameters:
a_ProjectRef -
Throws:
WTPropertyVetoException

getCreator

public WTPrincipalReference getCreator()
Gets the value of the attribute: CREATOR. Reference to the user whoc initiated the process.

Supported API: true

Overrides:
getCreator in class WfContainer
Returns:
WTPrincipalReference

setCreator

public void setCreator(WTPrincipalReference a_Creator)
                throws WTPropertyVetoException
Sets the value of the attribute: CREATOR. Reference to the user whoc initiated the process.

Supported API: true

Parameters:
a_Creator -
Throws:
WTPropertyVetoException

creatorValidate

private void creatorValidate(WTPrincipalReference a_Creator)
                      throws WTPropertyVetoException
Parameters:
a_Creator -
Throws:
WTPropertyVetoException

getBusinessObjReference

protected String getBusinessObjReference()
Gets the value of the attribute: BUSINESS_OBJ_REFERENCE. String containing reference to primary business object. This reference is set at process start and is accessible only through the process' context ('primaryBusinessObject' variable).

Supported API: false

Returns:
String
See Also:
ProcessData, WfVariable

setBusinessObjReference

protected void setBusinessObjReference(String a_BusinessObjReference)
Sets the value of the attribute: BUSINESS_OBJ_REFERENCE. String containing reference to primary business object. This reference is set at process start and is accessible only through the process' context ('primaryBusinessObject' variable).

Supported API: false

Parameters:
a_BusinessObjReference -
See Also:
ProcessData, WfVariable

getUserWorkQueueReference

protected ObjectReference getUserWorkQueueReference()
Gets the value of the attribute: USER_WORK_QUEUE_REFERENCE. Reference to queue that holds user work requests. The queue is only associated with at most one process. This happens if dedicatedQueue attribute is set to true.

The queue is created when process is started for the first time and deleted when the process is deleted.

Supported API: false

Returns:
ObjectReference

setUserWorkQueueReference

protected void setUserWorkQueueReference(ObjectReference a_UserWorkQueueReference)
Sets the value of the attribute: USER_WORK_QUEUE_REFERENCE. Reference to queue that holds user work requests. The queue is only associated with at most one process. This happens if dedicatedQueue attribute is set to true.

The queue is created when process is started for the first time and deleted when the process is deleted.

Supported API: false

Parameters:
a_UserWorkQueueReference -

getPropagationQueueReference

protected ObjectReference getPropagationQueueReference()
Gets the value of the attribute: PROPAGATION_QUEUE_REFERENCE. Reference to queue that holds internal work requests. The queue is only associated with at most one process. This happens if dedicatedQueue attribute is set to true.

The queue is created when process is started for the first time and deleted when the process is deleted.

Supported API: false

Returns:
ObjectReference

setPropagationQueueReference

protected void setPropagationQueueReference(ObjectReference a_PropagationQueueReference)
Sets the value of the attribute: PROPAGATION_QUEUE_REFERENCE. Reference to queue that holds internal work requests. The queue is only associated with at most one process. This happens if dedicatedQueue attribute is set to true.

The queue is created when process is started for the first time and deleted when the process is deleted.

Supported API: false

Parameters:
a_PropagationQueueReference -

getTeamId

public TeamReference getTeamId()
Gets the value of the attribute: TEAM_ID.

Supported API: false

Specified by:
getTeamId in interface TeamManaged
Specified by:
getTeamId in class WfContainer
Returns:
TeamReference

setTeamId

public void setTeamId(TeamReference a_TeamId)
               throws WTPropertyVetoException
Sets the value of the attribute: TEAM_ID.

Supported API: false

Specified by:
setTeamId in interface TeamManaged
Parameters:
a_TeamId -
Throws:
WTPropertyVetoException

teamIdValidate

private void teamIdValidate(TeamReference a_TeamId)
                     throws WTPropertyVetoException
Parameters:
a_TeamId -
Throws:
WTPropertyVetoException

changeState

public WfExecutionObject changeState(WfTransition transition)
                              throws WTException
Updates the current state of the process. Returns the updated (and persisted) object. A TransitionNotAllowed exception is thrown when the transition from the current state is not allowed.

This method implements abstract method in WfExecutionObject with process specific behavior. The common behavior is achieved by calling 'changeState Attributes'.

Supported API: false

Specified by:
changeState in class WfExecutionObject
Parameters:
transition -
Returns:
WfExecutionObject
Throws:
WTException

toString

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

Supported API: false

Overrides:
toString in class WfExecutionObject
Returns:
String

start

public WfProcess start(ProcessData input,
                       long priority,
                       boolean is_immediate)
                throws WTException
Deprecated. (as of 7.0) use instead process.setPriority (priority); process.start (input, is_immediate, null);

Starts a process with a given priority and input data. If is_immediate is true the process is started immediately and none of the initial node propagation is queued.

Supported API: false

Parameters:
input -
priority -
is_immediate -
Returns:
WfProcess
Throws:
WTException

start

public WfProcess start(ProcessData input,
                       boolean is_immediate,
                       WTContainerRef context_ref)
                throws WTException
Starts a process with a given input data in the context passed as argument. If is_immediate is true the process is started immediately and none of the initial node propagation is queued.

Supported API: false

Parameters:
input -
is_immediate -
context_ref -
Returns:
WfProcess
Throws:
WTException

getProcessRoles

public Vector getProcessRoles()
                       throws WTException
Returns a Vector of Role objects used by this process

Supported API: false

Returns:
Vector
Throws:
WTException

setProcessAttributes

protected void setProcessAttributes(WfContainerTemplate template,
                                    WTPrincipalReference creator,
                                    Object team_spec,
                                    WTContainerRef context_ref)
                             throws WTException
Set basic process attributes, based on the template and other information passed as arguments.

A team specification can be one of the following:


isNested

public boolean isNested()
Returns true if process is nested; false otherwise. A nested process is one that is being used inside another process or application.

Supported API: false

Returns:
boolean

computeTimeToStart

protected Timestamp computeTimeToStart(long now)
                                throws WTException
Computes time to start using duration attribute.

Supported API: false

Parameters:
now -
Returns:
Timestamp
Throws:
WTException

computeDeadline

protected void computeDeadline(long now)
                        throws WTException
Computes process deadline.

Supported API: false

Specified by:
computeDeadline in class WfExecutionObject
Parameters:
now -
Throws:
WTException

changeState

protected WfExecutionObject changeState(WfTransition transition,
                                        boolean is_immediate)
                                 throws WTException
Updates the current state of the process. 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 change of state takes place immediately and the propagation is not queued.

Supported API: false

Parameters:
transition -
is_immediate -
Returns:
WfExecutionObject
Throws:
WTException

newWfProcess

public static WfProcess newWfProcess()
                              throws WTException
Creates process in classic container.

Supported API: false

Returns:
WfProcess
Throws:
WTException

newWfProcess

public static WfProcess newWfProcess(WTContainerRef context_ref)
                              throws WTException
Creates process in the container passed as argument.

Supported API: false

Parameters:
context_ref -
Returns:
WfProcess
Throws:
WTException

initialize

protected void initialize(WTContainerRef context_ref)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: false

Overrides:
initialize in class WfExecutionObject
Parameters:
context_ref -
Throws:
WTException

getRolePrincipalMap

public RolePrincipalTable getRolePrincipalMap()
Gets the value of the attribute: ROLE_PRINCIPAL_MAP. Map of role to principal assignments

Supported API: false

Specified by:
getRolePrincipalMap in interface RoleHolder
Returns:
RolePrincipalTable
See Also:
wt.project.rolePrincipalTable

setRolePrincipalMap

public void setRolePrincipalMap(RolePrincipalTable a_RolePrincipalMap)
                         throws WTPropertyVetoException
Sets the value of the attribute: ROLE_PRINCIPAL_MAP. Map of role to principal assignments

Supported API: false

Specified by:
setRolePrincipalMap in interface RoleHolder
Parameters:
a_RolePrincipalMap -
Throws:
WTPropertyVetoException
See Also:
wt.project.rolePrincipalTable

addPrincipal

public void addPrincipal(Role role,
                         WTPrincipal principal)
                  throws WTException
Add a role to principal mapping to the rolePrincipalMap.

Supported API: false

Specified by:
addPrincipal in interface RoleHolder
Parameters:
role - the Role object to be added to the rolePrincipalMap
principal - the WTPrincipal object to be added to the rolePrincipalMap
Throws:
WTException

getPrincipals

public Enumeration getPrincipals(Role role)
                          throws WTException
Answer an enumeration of principal references assigned to role

Supported API: false

Specified by:
getPrincipals in interface RoleHolder
Parameters:
role - the Role object used as search criteria in the retrieval of PrincipalReferences
Returns:
Enumeration
Throws:
WTException

deletePrincipal

public void deletePrincipal(Role role,
                            WTPrincipal principal)
                     throws WTException
Remove role to principal assignment pair

Supported API: false

Specified by:
deletePrincipal in interface RoleHolder
Parameters:
role - the Role object used as search criteria in the removal of the WTPrincipal from the rolePrincipalMap
principal - the WTPrincipal object to be removed from the rolePrincipalMap
Throws:
WTException

getRoles

public Enumeration getRoles()
                     throws WTException
Answer an enumeration of roles in the rolePrincipalMap

Supported API: false

Specified by:
getRoles in interface RoleHolder
Returns:
Enumeration
Throws:
WTException

deleteRole

public void deleteRole(Role role)
                throws WTException
Remove the role and all associated principals from the rolePrincipalMap

Supported API: false

Specified by:
deleteRole in interface RoleHolder
Parameters:
role - the Role object to be removed from the RoleHolder
Throws:
WTException

rolePrincipalMapAsString

public String rolePrincipalMapAsString()
Answer a string of role to principal mappings

Supported API: false

Specified by:
rolePrincipalMapAsString in interface RoleHolder
Returns:
String

getOwnership

public Ownership getOwnership()
Gets the object for the association that plays role: OWNERSHIP. The persistent state for an Ownable object is maintained via the Ownership object. Access to information for the Ownership object should be done via methods on the OwnershipHelper.

Supported API: false

Specified by:
getOwnership in interface Ownable
Returns:
Ownership

setOwnership

public void setOwnership(Ownership a_Ownership)
Sets the object for the association that plays role: OWNERSHIP. The persistent state for an Ownable object is maintained via the Ownership object. Access to information for the Ownership object should be done via methods on the OwnershipHelper.

Supported API: false

Specified by:
setOwnership in interface Ownable
Parameters:
a_Ownership -

getContentVector

public Vector getContentVector()
Gets the value of the attribute: CONTENT_VECTOR. This is a non-persistent vector that is used to pass content from server to client. Should not be directly accessed by the client.

Supported API: false

Specified by:
getContentVector in interface ContentHolder
Returns:
Vector

setContentVector

public void setContentVector(Vector a_ContentVector)
                      throws WTPropertyVetoException
Sets the value of the attribute: CONTENT_VECTOR. This is a non-persistent vector that is used to pass content from server to client. Should not be directly accessed by the client.

Supported API: false

Specified by:
setContentVector in interface ContentHolder
Parameters:
a_ContentVector -
Throws:
WTPropertyVetoException

isHasContents

public boolean isHasContents()
Gets the value of the attribute: HAS_CONTENTS. This is a non-persistent variable that is used to pass information from server to client. Should not be directly accessed by the client

Supported API: false

Specified by:
isHasContents in interface ContentHolder
Returns:
boolean

setHasContents

public void setHasContents(boolean a_HasContents)
                    throws WTPropertyVetoException
Sets the value of the attribute: HAS_CONTENTS. This is a non-persistent variable that is used to pass information from server to client. Should not be directly accessed by the client

Supported API: false

Specified by:
setHasContents in interface ContentHolder
Parameters:
a_HasContents -
Throws:
WTPropertyVetoException

getOperation

public HttpContentOperation getOperation()
Gets the value of the attribute: OPERATION.

Supported API: false

Specified by:
getOperation in interface ContentHolder
Returns:
HttpContentOperation

setOperation

public void setOperation(HttpContentOperation a_Operation)
                  throws WTPropertyVetoException
Sets the value of the attribute: OPERATION.

Supported API: false

Specified by:
setOperation in interface ContentHolder
Parameters:
a_Operation -
Throws:
WTPropertyVetoException

getHttpVector

public Vector getHttpVector()
Gets the value of the attribute: HTTP_VECTOR. This is a non-persistent vector that is used to pass content from server to client. Should not be directly accessed by the client.

Supported API: false

Specified by:
getHttpVector in interface ContentHolder
Returns:
Vector

setHttpVector

public void setHttpVector(Vector a_HttpVector)
                   throws WTPropertyVetoException
Sets the value of the attribute: HTTP_VECTOR. This is a non-persistent vector that is used to pass content from server to client. Should not be directly accessed by the client.

Supported API: false

Specified by:
setHttpVector in interface ContentHolder
Parameters:
a_HttpVector -
Throws:
WTPropertyVetoException

getTeamName

public String getTeamName()
Gets the value of the attribute: TEAM_NAME. The name of the team(a derived attribute)

Supported API: false

Specified by:
getTeamName in interface TeamManaged
Returns:
String

getTeamIdentity

public String getTeamIdentity()
Gets the value of the attribute: TEAM_IDENTITY. The identity of the team (a derived attribute)

Supported API: false

Specified by:
getTeamIdentity in interface TeamManaged
Returns:
String

getTeamTemplateName

public String getTeamTemplateName()
Gets the value of the attribute: TEAM_TEMPLATE_NAME. The name of the teamTemplate(a derived attribute)

Supported API: false

Specified by:
getTeamTemplateName in interface TeamManaged
Returns:
String

getTeamTemplateIdentity

public String getTeamTemplateIdentity()
Gets the value of the attribute: TEAM_TEMPLATE_IDENTITY. The identity of the TeamTemplate (a derived attribute)

Supported API: false

Specified by:
getTeamTemplateIdentity in interface TeamManaged
Returns:
String

getTeamTemplateId

public TeamTemplateReference getTeamTemplateId()
Gets the object for the association that plays role: TEAM_TEMPLATE_ID.

Supported API: false

Specified by:
getTeamTemplateId in interface TeamManaged
Returns:
TeamTemplateReference

setTeamTemplateId

public void setTeamTemplateId(TeamTemplateReference a_TeamTemplateId)
                       throws WTPropertyVetoException
Sets the object for the association that plays role: TEAM_TEMPLATE_ID.

Supported API: false

Specified by:
setTeamTemplateId in interface TeamManaged
Parameters:
a_TeamTemplateId -
Throws:
WTPropertyVetoException

teamTemplateIdValidate

private void teamTemplateIdValidate(TeamTemplateReference a_TeamTemplateId)
                             throws WTPropertyVetoException
Parameters:
a_TeamTemplateId -
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 WfContainer
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 WfContainer
Returns:
int

mapAsString

private String mapAsString(Hashtable aMap)

mapAsString

private String mapAsString(RolePrincipalMap aMap)

initializeRolePrincipalMap

private void initializeRolePrincipalMap()
                                 throws WTException
Throws:
WTException

setPrimaryBusinessObject

protected void setPrimaryBusinessObject(ProcessData input)
                                 throws WTException
Creates the implicit relationship between the process and the primary business object passed as argument.

Throws:
WTException

buildRoleMap

public void buildRoleMap(RoleHolder project)
                  throws WTException
Populate my roles from the supplied roleHolder

Throws:
WTException

getRoleFor

public Role getRoleFor(WTPrincipalReference pRef,
                       Enumeration candidateRoles)
                throws WTException
Answer the role associated with the assignee. Returns null if not found.

Throws:
WTException

getPrincipalsForRole

protected Vector getPrincipalsForRole(Role role)
                               throws WTException
Throws:
WTException

getInitialDomain

protected AdminDomainRef getInitialDomain(WTObject pbo,
                                          WTContainerRef context_ref)
                                   throws WTException
Returns initial process folder.

Throws:
WTException

getWfException

protected WfException getWfException(WTException wte,
                                     WfTransition transition)
Returns an exception appropriate to the transition.


getBusinessObjectReference

public WTReference getBusinessObjectReference(ReferenceFactory rf)

setContainerInfo

private WfProcess setContainerInfo(WfProcess process,
                                   Object obj,
                                   WTContainerRef context_ref)
                            throws WTException
Sets container, domain and folder of the process being created. The logic is as follows:

Throws:
WTException

isValidPbo

private boolean isValidPbo(Object obj)

setTeam

private void setTeam(Object team_spec,
                     WTContainerRef context_ref)
              throws WTException
Throws:
WTException

getTeamFilePath

private String getTeamFilePath(Object team_spec,
                               WTContainerRef context_ref)
                        throws WTException
Throws:
WTException

getOid

private static ObjectIdentifier getOid(Object object)

getDefaultContainer

private static WTContainerRef getDefaultContainer()
                                           throws WTException
Throws:
WTException