|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.fc.WTObject
wt.workflow.work.WfAssignment
WfAssignment
links WfActivity requests for resources to
actual users or group of users. Assignments are created as part of the
resource selection process before an activity becomes ready for execution.
The lifetime of an assignment is limited by that of the associated activity.
Although the assignee is a reference to a principal (users and groups) only users are allowed.
Use the newWfAssignment
static factory method(s), not the
WfAssignment
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
Field Summary | |
private WfAssignedActivity |
activity
|
private WfAssignedActivityTemplate |
activityTemplate
|
private WfAssignee |
assignee
|
static String |
ASSIGNEE
Label for the attribute. |
private CalendarServiceFwd |
calService
|
private static String |
CLASSNAME
|
private boolean |
complete
|
static String |
COMPLETE
Label for the attribute. |
private static String |
DEFAULT_NOTIFICATION_SENDER
|
private static String |
DEFAULT_ROLE
|
static long |
EXTERNALIZATION_VERSION_UID
|
private static String |
IUR_NOTIFICATION_TEMPLATE
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private Vector |
principals
|
static String |
PRINCIPALS
Label for the attribute. |
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private static String |
SERVICE_NAME
|
private ObjectReference |
source
|
static String |
SOURCE
Label for the attribute. |
private WfAssignmentState |
status
|
static String |
STATUS
Label for the attribute; State of the assignment. |
private static int |
STATUS_UPPER_LIMIT
|
private static boolean |
STORE_BALLOTS
|
private static String |
teamKey
|
private static boolean |
TRANSFERADHOCRIGHTS
|
static String |
TRIP_COUNT
Label for the attribute. |
private int |
tripCount
|
private static String |
URL_PROCESSOR_METHOD
|
private static boolean |
VERBOSE
|
private static String |
WORK_NOTIFICATION_TEMPLATE
|
Fields inherited from class wt.fc.WTObject |
CREATE_TIMESTAMP, MODIFY_TIMESTAMP |
Fields inherited from interface wt.fc.Persistable |
IDENTITY, PERSIST_INFO, TYPE |
Fields inherited from interface wt.identity.DisplayIdentification |
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE |
Constructor Summary | |
WfAssignment()
|
Method Summary | |
protected void |
accept(WorkItem workItem,
WTUser user)
Accept the assignment. |
private void |
addElementNoDup(Vector v,
Object obj)
|
private void |
addElementsNoDup(Vector v,
Enumeration e)
|
private void |
addPrincipal(Vector v,
WTPrincipalReference pRef)
|
private void |
addPrincipals(Vector v,
Enumeration e)
|
protected WorkItem |
addWorkItem(Role aRole,
WTPrincipalReference pRef)
Create and save a work item for one of the activity's assigned principals. |
protected WfBallot |
buildWfBallot(WTPrincipalReference pRef,
Vector eventList)
Construct a ballot for the specified principal for the specified role |
protected WorkItem |
buildWorkItem(Role aRole,
WTPrincipalReference pRef)
Construct an actual work item for the specified principal for the specified role |
Vector |
checkBallotStatus()
Return a vector of ballots, both persisted and blank so the PM can show them. |
protected boolean |
checkComplete()
|
protected WTPrincipalReference |
checkDelegation(WTPrincipalReference pref)
|
private boolean |
checkRequiredBallots()
|
private void |
cleanupPrincipals()
|
private WorkItem |
createAWorkItem(WTPrincipalReference pRef)
|
protected void |
createBallot(WTPrincipalReference pRef,
Vector eventList)
Create a new WfBallot object on the fly. |
protected WorkItem |
createWorkItem(WTPrincipal principal)
Returns a non-persistent work item assigned to the principal passed as argument. |
protected void |
createWorkItems(WfAssignedActivity activity)
Create the set of work items for this assignment Supported API: false |
void |
delegate(WorkItem workItem,
WTPrincipal principal,
WfAssignedActivity activity)
|
protected void |
deleteBallots()
Removes all the ballots cast for this assignment. |
protected void |
deletePotentialWorkItems()
|
protected void |
deleteUncompletedWorkItems()
|
protected void |
deleteWorkItems()
Remove all work items associated with this assignment 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 ObjectIdentifier s. |
protected void |
finalizeAssignment(WfAssignedActivity activity)
Remove uncompleted work items, set status to Complete, and repersist. |
protected Role |
findRole(WTPrincipalReference pRef,
Enumeration roleList)
|
protected WfAssignedActivity |
getActivity()
Get the parent of this assignment, the WfAssignedActivity. |
protected WfAssignedActivityTemplate |
getActivityTemplate()
Get the template of the WfAssignedActivity. |
Vector |
getAllEvents()
Gets all the user events from all the ballots for this assignment. |
WfAssignee |
getAssignee()
Gets the value of the attribute: ASSIGNEE. |
Enumeration |
getBallots()
|
String |
getConceptualClassname()
Deprecated. |
private Team |
getLocalTeam(WfAssignedActivityTemplate aat)
|
private static ObjectIdentifier |
getOid(Object obj)
|
protected WfProcess |
getParentProcess()
|
Vector |
getPrincipals()
Gets the object for the association that plays role: PRINCIPALS. |
ObjectReference |
getSource()
Gets the value of the attribute: SOURCE. |
WfAssignmentState |
getStatus()
Gets the value of the attribute: STATUS. |
int |
getTripCount()
Gets the value of the attribute: TRIP_COUNT. |
private Enumeration |
getWorkItems()
|
int |
hashCode()
Returns a hash code for this object based upon its ObjectIdentifier . |
private boolean |
ignoreRole(WfAssignee assignee,
WfActivity activity)
Determines whether unresolved roles should be ignored. |
protected void |
initialize()
Initializes objects created by new-factory methods. |
protected void |
initOldBlobs()
|
boolean |
isComplete()
Gets the value of the attribute: COMPLETE. |
protected boolean |
isOffered()
|
static WfAssignment |
newWfAssignment()
Default factory for the class. |
private void |
principalsValidate(Vector a_Principals)
|
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(WfAssignment thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
protected void |
recalculateWorkItems(WfAssignedActivity activity)
Recalculates the WorkItems for this assignment. |
private WTPrincipalReference |
resolveActorRole(WfProcess myParent,
ActorRole aRole)
|
private Vector |
resolveAssignee(WfAssignedActivityTemplate template)
|
private Vector |
resolveFromTemplate(WfAssignedActivityTemplate t,
WfProcess myParent,
Team localTeam,
Vector principals)
|
private Vector |
resolveFromVariable(String var_name,
WfAssignedActivityTemplate template,
WfProcess myParent,
Team localTeam,
Vector pv)
|
private Enumeration |
resolveGroup(WTGroup wg)
|
private Enumeration |
resolveRole(WfAssignedActivityTemplate t,
WfProcess myParent,
Team localTeam,
Role aRole)
|
private void |
revokeTaskBasedRights()
Revoke rights that were granted for the execution of a task for each variable in the activity. |
protected void |
revokeTeamRights(WorkItem wi)
|
protected void |
sendNotification(WorkItem wi,
WTPrincipalReference pRef)
Send an email notification to all activity assignees. |
protected void |
sendNoWINotification()
Send an email notification to Responsible Role that now work item was created. |
protected void |
setActivity(WfAssignedActivity a_Activity)
Set the parent of this assignment, the WfAssignedActivity. |
void |
setAssignee(WfAssignee a_Assignee)
Sets the value of the attribute: ASSIGNEE. |
void |
setComplete(boolean a_Complete)
Sets the value of the attribute: COMPLETE. |
void |
setPrincipals(Vector a_Principals)
Sets the object for the association that plays role: PRINCIPALS. |
void |
setSource(ObjectReference a_Source)
Sets the value of the attribute: SOURCE. |
void |
setStatus(WfAssignmentState a_Status)
Sets the value of the attribute: STATUS. |
private void |
setTeamRights(WTPrincipalReference pRef,
WorkItem wi)
|
void |
setTripCount(int a_TripCount)
Sets the value of the attribute: TRIP_COUNT. |
private void |
sourceValidate(ObjectReference a_Source)
|
protected boolean |
tally(WfTallyType tType,
String operator,
int value,
String event)
|
String |
toString()
Retruns a string representation of the execution object. |
private void |
transferAdHocPermissions(WorkItem workItem,
WTPrincipalReference oldPRef,
WTPrincipalReference newPRef)
|
private void |
updateWorkItems(WorkItem acceptedWI,
WTUser user)
|
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.fc.WTObject |
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final String STATUS
private static int STATUS_UPPER_LIMIT
private WfAssignmentState status
public static final String SOURCE
private ObjectReference source
public static final String COMPLETE
private boolean complete
public static final String ASSIGNEE
private WfAssignee assignee
public static final String TRIP_COUNT
private int tripCount
public static final String PRINCIPALS
private Vector principals
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static final boolean VERBOSE
private static final boolean TRANSFERADHOCRIGHTS
private static final String DEFAULT_ROLE
private static final String SERVICE_NAME
private static final String URL_PROCESSOR_METHOD
private static final String WORK_NOTIFICATION_TEMPLATE
private static final String IUR_NOTIFICATION_TEMPLATE
private static final String DEFAULT_NOTIFICATION_SENDER
private static final boolean STORE_BALLOTS
private transient WfAssignedActivity activity
private transient WfAssignedActivityTemplate activityTemplate
private transient CalendarServiceFwd calService
private static final String teamKey
Constructor Detail |
public WfAssignment()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class WTObject
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class WTObject
input
-
IOException
ClassNotFoundException
protected boolean readVersion(WfAssignment thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public void writeExternal(PersistentStoreIfc output) throws SQLException, DatastoreException
(Not intended for general use.)
Supported API: false
writeExternal
in interface ObjectMappable
writeExternal
in class WTObject
output
-
SQLException
DatastoreException
public void readExternal(PersistentRetrieveIfc input) throws SQLException, DatastoreException
(Not intended for general
use.)
Supported API: false
readExternal
in interface ObjectMappable
readExternal
in class WTObject
input
-
SQLException
DatastoreException
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
public WfAssignmentState getStatus()
public void setStatus(WfAssignmentState a_Status)
a_Status
- public ObjectReference getSource()
public void setSource(ObjectReference a_Source) throws WTPropertyVetoException
a_Source
-
WTPropertyVetoException
private void sourceValidate(ObjectReference a_Source) throws WTPropertyVetoException
a_Source
-
WTPropertyVetoException
public boolean isComplete()
public void setComplete(boolean a_Complete) throws WTPropertyVetoException
a_Complete
-
WTPropertyVetoException
public WfAssignee getAssignee()
public void setAssignee(WfAssignee a_Assignee) throws WTPropertyVetoException
a_Assignee
-
WTPropertyVetoException
public int getTripCount()
public void setTripCount(int a_TripCount) throws WTPropertyVetoException
a_TripCount
-
WTPropertyVetoException
public Vector getPrincipals()
public void setPrincipals(Vector a_Principals) throws WTPropertyVetoException
a_Principals
-
WTPropertyVetoException
private void principalsValidate(Vector a_Principals) throws WTPropertyVetoException
a_Principals
-
WTPropertyVetoException
public String toString()
toString
in class WTObject
protected void createWorkItems(WfAssignedActivity activity) throws WfException
activity
-
WfException
protected void deleteWorkItems() throws WTException
WTException
protected void accept(WorkItem workItem, WTUser user) throws WTException
workItem
- user
-
WTException
protected void finalizeAssignment(WfAssignedActivity activity) throws WTException
activity
-
WTException
protected void createBallot(WTPrincipalReference pRef, Vector eventList) throws WfException
pRef
- eventList
-
WfException
protected void deleteBallots() throws WTException
WTException
public Vector getAllEvents() throws WfException
WfException
protected void recalculateWorkItems(WfAssignedActivity activity) throws WTException
activity
-
WTException
public static WfAssignment newWfAssignment() throws WTException
WTException
public boolean equals(Object obj)
ObjectIdentifier
s.
Changed or stale copies are still considered equal by this method.
Delegates to PersistenceHelper.equals(Persistable,Object)
.
Warning: Certain core Windchill operations may depend upon
equals
being ObjectIdentifier
-based. Changes
to the default implementation should be done with care, if at all.
Supported API: false
equals
in class WTObject
obj
-
public int hashCode()
ObjectIdentifier
.
Delegates to PersistenceHelper.hashCode(Persistable)
.
Warning: Certain core Windchill operations may depend upon
hashCode
being ObjectIdentifier-based
. Changes
to the default implementation should be done with care, if at all.
Supported API: false
hashCode
in class WTObject
private void cleanupPrincipals() throws WTException
WTException
private void addElementsNoDup(Vector v, Enumeration e)
private void addElementNoDup(Vector v, Object obj)
protected void initialize() throws WTException
WTObject
initialize
in class WTObject
WTException
protected WfAssignedActivity getActivity()
protected void setActivity(WfAssignedActivity a_Activity)
a_Activity
- protected WfAssignedActivityTemplate getActivityTemplate()
protected WorkItem addWorkItem(Role aRole, WTPrincipalReference pRef) throws WTException
aRole
- role the assignee is to playpRef
- reference to the principal (the role player)
WTException
protected WorkItem buildWorkItem(Role aRole, WTPrincipalReference pRef) throws WTException, WfException
aRole
- role the assignee is to playpRef
- reference to the principal (the role player)
WTException
WfException
protected WfBallot buildWfBallot(WTPrincipalReference pRef, Vector eventList) throws WTException
pRef
- reference to the principal (the role player)eventList
- vector of events chosen
WTException
protected void sendNotification(WorkItem wi, WTPrincipalReference pRef) throws WTException
WTException
protected void sendNoWINotification() throws WTException
WTException
protected Role findRole(WTPrincipalReference pRef, Enumeration roleList) throws WTException
WTException
protected WfProcess getParentProcess() throws WTException
WTException
private void updateWorkItems(WorkItem acceptedWI, WTUser user) throws WfException
WfException
protected void deletePotentialWorkItems() throws WTException
WTException
private Enumeration getWorkItems() throws WTException
WTException
private Vector resolveAssignee(WfAssignedActivityTemplate template) throws WfException
WfException
private Vector resolveFromVariable(String var_name, WfAssignedActivityTemplate template, WfProcess myParent, Team localTeam, Vector pv) throws WTException
WTException
private Vector resolveFromTemplate(WfAssignedActivityTemplate t, WfProcess myParent, Team localTeam, Vector principals) throws WTException
WTException
private Enumeration resolveRole(WfAssignedActivityTemplate t, WfProcess myParent, Team localTeam, Role aRole) throws WTException
WTException
private Enumeration resolveGroup(WTGroup wg) throws WTException
WTException
private WTPrincipalReference resolveActorRole(WfProcess myParent, ActorRole aRole) throws WTException
WTException
private void addPrincipals(Vector v, Enumeration e)
private void addPrincipal(Vector v, WTPrincipalReference pRef)
private Team getLocalTeam(WfAssignedActivityTemplate aat) throws WTException
WTException
protected boolean checkComplete() throws WTException
WTException
public Enumeration getBallots() throws WTException
WTException
protected boolean tally(WfTallyType tType, String operator, int value, String event) throws WfException
WfException
protected void deleteUncompletedWorkItems() throws WfException
WfException
private boolean checkRequiredBallots() throws WfException
WfException
private void revokeTaskBasedRights() throws WTException
WTException
public Vector checkBallotStatus() throws WfException
WfException
public void delegate(WorkItem workItem, WTPrincipal principal, WfAssignedActivity activity) throws WTException, WfException
WTException
WfException
protected void initOldBlobs() throws WfException
WfException
private void setTeamRights(WTPrincipalReference pRef, WorkItem wi) throws WTException
WTException
protected void revokeTeamRights(WorkItem wi) throws WTException
WTException
protected WTPrincipalReference checkDelegation(WTPrincipalReference pref) throws WfException
WfException
private boolean ignoreRole(WfAssignee assignee, WfActivity activity) throws WTException
WTException
protected WorkItem createWorkItem(WTPrincipal principal) throws WTException
WTException
private WorkItem createAWorkItem(WTPrincipalReference pRef) throws WTException
WTException
private static ObjectIdentifier getOid(Object obj)
private void transferAdHocPermissions(WorkItem workItem, WTPrincipalReference oldPRef, WTPrincipalReference newPRef) throws WTException
WTException
protected boolean isOffered() throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |