public interface IDfWorkitem extends IDfPersistentObject
Modifier and Type | Field and Description |
---|---|
static int |
DF_WI_STATE_ACQUIRED
The state of the workitem is Acquired.
|
static int |
DF_WI_STATE_AHALTED
The state of the workitem is AHalted.
|
static int |
DF_WI_STATE_DHALTED
The state of the workitem is DHalted.
|
static int |
DF_WI_STATE_DORMANT
The state of the workitem is Dormant.
|
static int |
DF_WI_STATE_FAULTED
The state of the workitem is Faulted.
|
static int |
DF_WI_STATE_FINISHED
The state of the workitem is Finished.
|
static int |
DF_WI_STATE_PAUSED
The state of the workitem is Paused.
|
static int |
DF_WI_STATE_PHALTED
The state of the workitem is PHalted.
|
static int |
DF_WI_STATE_UNKNOWN
The state of the workitem is unknown.
|
CURRENCY_CHECK_ALWAYS, CURRENCY_CHECK_FIRST_ACCESS, CURRENCY_CHECK_NEVER, CURRENCY_CHECK_ONCE_PER_SCOPE
Modifier and Type | Method and Description |
---|---|
void |
acquire()
Acquires a work item for the current user.
|
IDfId |
addAttachment(java.lang.String componentType,
IDfId componentId)
Adds an attachment to the workflow.
|
IDfId |
addPackage(java.lang.String packageName,
java.lang.String packageType,
IDfList componentId)
Adds a package to a work item.
|
IDfId |
addPackage(java.lang.String packageName,
java.lang.String packageType,
IDfList componentId,
IDfList componentName)
Adds a package to a work item.
|
IDfId |
addPackageEx(java.lang.String packageName,
java.lang.String packageType,
IDfList componentId,
IDfList componentName,
int skillLevel)
Adds a package to a work item and specifies a skill level for the package.
|
IDfId |
addPackageEx(java.lang.String packageName,
java.lang.String packageType,
IDfList componentId,
int skillLevel)
Adds a package to a work item and specifies a skill level for the package.
|
void |
complete()
Marks a work item as finished.
|
void |
completeEx(int returnValue,
java.lang.String execOSError,
IDfId execResultId)
Marks the work item as complete.
|
void |
completeEx2(int returnValue,
java.lang.String execOSError,
IDfId execResultId,
int userTime,
double userCost)
Marks the work item as complete.
|
void |
delegateTask(java.lang.String user)
Delegates the work item to someone else.
|
IDfId |
getActDefId()
Returns the object ID of the activity definition whose runtime instance
generated the work item.
|
IDfActivity |
getActivity()
Returns the work item's corresponding activity object.
|
int |
getActSeqno()
Returns the sequence number of the activity with which the work item is associated.
|
IDfCollection |
getAllPackages(java.lang.String additionalAttributes)
Returns a query result collection containing the following attributes:
String documentIDs object ID's of documents, separated by commas
String r_package_name
String r_packageType
String i_package_oprtn
IDfId r_note_id
This differs from getPackages by returning both visible and invisible packages.
|
IDfWorkflowAttachment |
getAttachment(IDfId attachmentId)
Returns an attachment object given the ID of the object.
|
IDfCollection |
getAttachments()
Returns a list of all the workflow's attachments.
|
IDfId |
getAutoMethodId()
Returns the object ID of the method that invokes the work item's application.
|
IDfTime |
getCreationDate()
Returns the date on which the work item was created.
|
IDfTime |
getDueDate()
Returns the work item's due date.
|
java.lang.String |
getExecOsError()
Returns the error string, if any.
|
IDfId |
getExecResultId()
Returns the object ID of the document containing the results
of the application's execution.
|
int |
getExecRetriedCount()
Returns value of the r_exec_retried_count attribute.
|
java.lang.String |
getExtendedPerformer(int valueIndex)
Returns the name of an extended performer.
|
int |
getExtendedPerformerCount()
Returns the number of extended performers for the work item.
|
IDfList |
getForwardActivities()
Returns a list of IDfActivity interfaces that have at least one input
port linked to one of the current activity's output ports.
|
IDfTime |
getLaunchTimeout()
Returns the launch timeout value of this work item.
|
IDfCollection |
getMissingOutputPackages()
Returns a collection whose result objects describe all output
ports in the work item that don't have a package.
|
IDfList |
getNextActivityNames()
Retrieves all activities that immediately follow this work item.
|
java.lang.String |
getOutputPort(int valueIndex)
Returns the name of an output port of the work item.
|
int |
getOutputPortCount()
Returns the number of output ports for the work item.
|
IDfPackage |
getPackage(IDfId packageId)
Returns a package object given the ID of the object.
|
IDfCollection |
getPackages(java.lang.String additionalAttributes)
Returns a list of all the work item's packages.
|
java.lang.String |
getPerformerName()
Returns the name of the work item's performer.
|
IDfList |
getPreviousActivityNames()
Retrieves all activities that immediately preceeded this work item.
|
int |
getPriority()
Returns the priority assigned to the work item.
|
IDfId |
getQueueItemId()
Returns the object ID of the queue item corresponding to the work item.
|
IDfList |
getRejectActivities()
Returns a list of activity objects that have at least one
revert port.
|
int |
getReturnValue()
Returns the return value.
|
int |
getRuntimeState()
Returns the work item's state.
|
int |
getSkillLevel()
Returns the skill level of the task.
|
IDfId |
getTargetTaskId()
Returns value of the r_target_task_id attribute
|
double |
getUserCost()
Returns the user assignable cost provided at completion time.
|
int |
getUserTime()
Returns the user assignable time provided at completion time.
|
IDfId |
getWorkflowId()
Returns the object ID of the workflow that contains this work item.
|
boolean |
isDelegatable()
Indicates whether the work item can be delegated.
|
boolean |
isExecLaunch()
Indicates whether the application failed.
|
boolean |
isExecTimeOut()
Indicates whether the application timed out.
|
boolean |
isManualExecution()
Indicates whether the work item's associated activity is a manual activity.
|
boolean |
isManualTransition()
Indicates whether the work item's transition is manual.
|
boolean |
isRepeatable()
Indicates whether the work item can be repeated.
|
boolean |
isSignOffRequired()
Indicates whether the work item requires a sign off.
|
void |
pause()
Pauses the work item.
|
IDfId |
queue(java.lang.String user,
java.lang.String eventType,
int priority,
boolean sendMail,
IDfTime dueDate,
java.lang.String message)
Sends an event to a workitem.
|
void |
removeAttachment(IDfId attachmentId)
Removes an attachment from the workflow.
|
void |
removePackage(java.lang.String packageName)
Removes a package from the work item.
|
void |
repeat(IDfList list)
Defines an extended round of work item performers.
|
void |
resume()
Moves a paused work item to the dormant state.
|
void |
setOutput(IDfList list)
Sets the output ports.
|
void |
setOutputByActivities(IDfList actList)
Defines the next activities to be assigned packages in the workflow.
|
void |
setPackageSkillLevel(java.lang.String packageName,
int skillLevel)
Set the skill level of a given package.
|
void |
setPerformers(java.lang.String actName,
IDfList userGroupList)
Sets the performers attributes for the specified activity name.
|
void |
setPriority(int newPriority)
Sets the priority.
|
addChildRelative, addParentRelative, apiExec, apiGet, apiSet, destroy, fetch, fetchWithCaching, getAttrAssistance, getAttrAssistanceWithValues, getAttrAsstDependencies, getChildRelatives, getParentRelatives, getPartition, getType, getValidator, getVStamp, getWidgetType, isDeleted, isDirty, isInstanceOf, isNew, isReplica, lock, lockEx, registerEvent, removeChildRelative, removeParentRelative, revert, save, setPartition, signoff, unRegisterEvent, unRegisterEventEx, validateAllRules, validateAttrRules, validateAttrRulesWithValue, validateAttrRulesWithValues, validateObjRules, validateObjRulesWithValues
appendBoolean, appendDouble, appendId, appendInt, appendString, appendTime, appendValue, dump, enumAttrs, findAttrIndex, findBoolean, findDouble, findId, findInt, findString, findTime, findValue, getAllRepeatingStrings, getAttr, getAttrCount, getAttrDataType, getBoolean, getDouble, getId, getInt, getLong, getObjectId, getObjectSession, getOriginalSession, getRepeatingBoolean, getRepeatingDouble, getRepeatingId, getRepeatingInt, getRepeatingLong, getRepeatingString, getRepeatingTime, getRepeatingValue, getSession, getSessionManager, getString, getTime, getValue, getValueAt, getValueCount, hasAttr, insertBoolean, insertDouble, insertId, insertInt, insertString, insertTime, insertValue, isAttrRepeating, isNull, remove, removeAll, setBoolean, setDouble, setId, setInt, setNull, setRepeatingBoolean, setRepeatingDouble, setRepeatingId, setRepeatingInt, setRepeatingString, setRepeatingTime, setRepeatingValue, setSessionManager, setString, setTime, setValue, truncate
static final int DF_WI_STATE_UNKNOWN
static final int DF_WI_STATE_DORMANT
static final int DF_WI_STATE_ACQUIRED
static final int DF_WI_STATE_FINISHED
static final int DF_WI_STATE_PAUSED
static final int DF_WI_STATE_DHALTED
static final int DF_WI_STATE_AHALTED
static final int DF_WI_STATE_PHALTED
static final int DF_WI_STATE_FAULTED
IDfList getNextActivityNames() throws DfException
For information about activities and how they are ordered within a workflow, refer to Server Fundamentals.
The following code example demonstrates how to obtain an IDfWorkitem interface then display all activities that follow the current activity:
IDfCollection tasks = sess.getTasks("someUser", DfSession.DF_TASKS, null, "task_name"); while (tasks.next()) { IDfWorkitem wi = (IDfWorkitem)sess.getObject(tasks.getId("item_id")); IDfList listObj = wi.getNextActivityNames(); for (int i = 0; i < listObj.getCount(); i++) { IDfActivity act = (IDfActivity)listObj.get(i); System.out.println("Next Activities: " + act.getObjectName()); } }
DfException
- if the query failed or
the session has timed out and cannot be re-established.IDfList getPreviousActivityNames() throws DfException
For information about activities and how they are ordered within a workflow, refer to Server Fundamentals.
DfException
- if the query failed or
the session has timed out and cannot be re-establishedIDfCollection getPackages(java.lang.String additionalAttributes) throws DfException
This method returns a collection that contains one query result object for each package. The query result objects have the following attributes:
r_object_id r_component_id r_package_name r_package_type i_package_oprtn r_note_idplus any additional attributes passed in with the
additionalAttributes
parameter. Refer to the description of the dmi_package type in the EMC Documentum Object Reference Manual for a description of these attributes.
additionalAttributes
- the additional package attributes that you
want to retrieveDfException
- if the query failed or
the session has timed out and cannot be reestablishedIDfId addPackage(java.lang.String packageName, java.lang.String packageType, IDfList componentId) throws DfException
Packages represent the object or objects on which the work item's performer operates. This method can be used by the work item performer, the workflow supervisor, or a user with Sysadmin or Superuser privileges. The work item must be in the acquired state. Since 6.7, Content-Server also allows adding package to a failed (apaused) automatic work item.
A package may have one component or no components. To add a package with no
components, specify componentId
as null.
If package control is not enabled at either the process (workflow) or repository
level, the method obtains the name of the component specified in componentId
and records the name in the package's r_component_name attribute.
If you wish to add a package with a specified skill level, use addPackageEx(java.lang.String, java.lang.String, com.documentum.fc.common.IDfList, int)
.
If you wish to add a note to the package, call IDfPackage.appendNote(java.lang.String, boolean)
after addPackage
.
For information about work items, packages, and package control, refer to Server Fundamentals. The Content Server Administrator's Guide describes how to enable or disable package control.
packageName
- the name of the package. This must be unique among the
work item packages.packageType
- the object type of the package. This is the actual object type
of the component or a supertype of the component.componentId
- an IDfList object that contains the object ID of the package's component, or null.DfException
- if the server returns an erroraddPackageEx(java.lang.String, java.lang.String, com.documentum.fc.common.IDfList, int)
IDfId addPackageEx(java.lang.String packageName, java.lang.String packageType, IDfList componentId, int skillLevel) throws DfException
Packages represent the object or objects on which the work item's performer operates. A skill level is effective only for work items generated from activities placed on a workqueue. This method can be used by the work item performer, the workflow supervisor, or a user with Sysadmin or Superuser privileges. The work item must be in the acquired state. Since 6.7, Content-Server also allows adding package to a failed (apaused) automatic work item.
A package may have one component or no components. To add a package with no components,
specify componentId
as null.
If package control is not enabled at either the process (workflow) or repository
level, the method obtains the name of the component specified in componentId
and records the name in the package's r_component_name attribute.
If you wish to add a note to the package, call IDfPackage.appendNote(java.lang.String, boolean)
after addPackage
.
For information about work items, packages, and package control, refer to Server Fundamentals. The Content Server Administrator's Guide describes how to enable or disable package contro. Refer to the Business Process Manager documentation for complete information about using skill levels.
packageName
- the name of the package. This must be unique among the
work item packages.packageType
- the object type of the package. This is the actual object type
of the component or a supertype of the component.componentId
- an IDfList object that contains the object ID of the
package's component.skillLevel
- an Integer that indicates the required skill level of the package.DfException
- if the server returns an errorIDfId addPackage(java.lang.String packageName, java.lang.String packageType, IDfList componentId, IDfList componentName) throws DfException
Packages represent the object or objects on which the work item's performer operates. This method can be used by the work item performer, the workflow supervisor, or a user with Sysadmin or Superuser privileges. The work item must be in the acquired state. Since 6.7, Content-Server also allows adding package to a failed (apaused) automatic work item.
A package may have one component or no components. To add a package with no
components, specify componentId
as null.
If package control is not enabled at either the process (workflow) or repository
level, the method obtains the name of the component specified in componentId
and records the name in the package's r_component_name attribute.
If you wish to add a package with a specified skill level, use addPackageEx(java.lang.String, java.lang.String, com.documentum.fc.common.IDfList, int)
.
If you wish to add a note to the package, call IDfPackage.appendNote(java.lang.String, boolean)
after addPackage
.
For information about work items, packages, and package control, refer to Server Fundamentals. The Content Server Administrator's Guide describes how to enable or disable package control.
packageName
- the name of the package. This must be unique among the
work item packages.packageType
- the object type of the package. This is the actual object type
of the component or a supertype of the component.componentId
- an IDfList object that contains the object ID of the
package's component, or null.componentName
- an IDfList object that contains the name of the package's component or nullDfException
- if the server returns an erroraddPackageEx(java.lang.String, java.lang.String, com.documentum.fc.common.IDfList, int)
IDfId addPackageEx(java.lang.String packageName, java.lang.String packageType, IDfList componentId, IDfList componentName, int skillLevel) throws DfException
Packages represent the object or objects on which the work item's performer operates. A skill level is effective only for work items generated from activities placed on a workqueue. This method can be used by the work item performer, the workflow supervisor, or a user with Sysadmin or Superuser privileges. The work item must be in the acquired state. Since 6.7, Content-Server also allows adding package to a failed (apaused) automatic work item.
A package may have one component or no components. To add a package with no components,
specify componentId
as null.
If package control is not enabled at either the process (workflow) or repository
level, the method obtains the name of the component specified in componentId
and records the name in the package's r_component_name attribute.
If you wish to add a note to the package, call IDfPackage.appendNote(java.lang.String, boolean)
after addPackage
.
For information about work items, packages, and package control, refer to Server Fundamentals. The Content Server Administrator's Guide describes how to enable or disable package contro. Refer to the Business Process Manager documentation for complete information about using skill levels.
packageName
- the name of the package. This must be unique among the
work item packages.packageType
- the object type of the package. This is the actual object type
of the component or a supertype of the component.componentId
- an IDfList object that contains the object ID of the
package's component.componentName
- an IDfList object that contains the name of the package's component or nullskillLevel
- an Integer that indicates the required skill level of the package.DfException
- if the server returns an errorIDfPackage getPackage(IDfId packageId) throws DfException
Packages represent the object on which the work item's performer operates. For information about work items and packages, refer to Server Fundamentals.
The following code example demonstrates how to obtain an IDfWorkitem interface then display all packages for the current activity:
IDfCollection tasks = sess.getTasks("someUser", DfSession.DF_TASKS, null, "task_name"); while (tasks.next()) { IDfWorkitem wi = (IDfWorkitem)sess.getObject(tasks.getId("item_id")); IDfActivity act = wi.getActivity(); for (int i = 0; i < act.getPackageCount(); i++) { IDfId packageId = act.getPackageId(i); IDfPackage packageObj = wi.getPackage(packageId); System.out.println("Package Name: " + packageObj.getPackageName()); } }
packageId
- the object ID of the package.DfException
- if the server returns an error.void removePackage(java.lang.String packageName) throws DfException
Packages represent the object on which the work item's performer operates. This method can be used by the work item performer, the workflow supervisor, or a user with Sysadmin or Superuser privileges. The work item must be in the acquired state. Since 6.7, Content-Server also allows removing package from a failed (apaused) automatic work item. For information about work items and packages, refer to Server Fundamentals.
packageName
- the name of the package that you want to removeDfException
- if the server returns an errorvoid acquire() throws DfException
Work items are tasks in the workflow. After a work item appears
in a performer's inbox, the performer must acquire
the work item
before beginning work on the item. The user issuing this method must be the
work item's performer or, if the assigned performer is a group, a member of the group,
the workflow supervisor, or a user with Sysadmin or
Superuser privileges.
Note: If the enable_workitem_mgmt server.ini key is set to true, any user can acquire the work item. This key is set to false by default. The workflow must be in the running state, the activity that generated the work item must be in the installed state, and the work item must be in the dormant state.
Executing this methods changes the work item's state to acquired, sets the actual_start_date attribute of the associated dmi_queue_item object, and sets the work item's r_performer_name attribute to the current user. Re-run the inbox query to refresh the inbox if you want the user to see the changes.
For more information about workflows, refer to Server Fundamentals.
The following code example demonstrates how to obtain an IDfWorkitem interface, then acquire and complete the task:
IDfCollection tasks = sess.getTasks("someUser", DfSession.DF_TASKS, null, "task_name"); while (tasks.next()) { IDfPersistentObject pObj = sess.getObjectByQualification("dmi_queue_item where r_object_id='" + tasks.getId("r_object_id").toString() + "'"); // Make sure the task(s) for this user are associated with the workflow if (pObj.getId("router_id").toString().equals(wfId.getId())) { IDfWorkitem wi = (IDfWorkitem)sess.getObject(tasks.getId("item_id")); wi.acquire(); // Do some processing on the work item here wi.complete(); } }
DfException
- if the server returns an error.complete()
,
delegateTask(java.lang.String)
void repeat(IDfList list) throws DfException
If an activity is defined as repeatable, the performer can designate additional performers for the associated work item. After the first performer completes the activity, the server puts the associated work item in the inboxes of the designated extended performers.
For more information about this feature, refer to Server Fundamentals.
list
- an IDfList object containing the names of the repository users and groups
designated as extended performersDfException
- if the server returns an errorIDfActivity.setRepeatableInvoke(boolean)
void setOutput(IDfList list) throws DfException
Typically, when a work item is completed, the server uses information in the workflow and activity definitions to determine the output ports. However, you can use this method to manually identify the output ports.
The work item must be in the acquired state and the person issuing this method must be the activity's performer, the workflow supervisor, or a superuser.
list
- an IDfList object that contains a list of the ports.
These ports must already be defined for this work item.DfException
- if the server returns an errorvoid delegateTask(java.lang.String user) throws DfException
The work item's performer must have the ability to delegate the work item. That
ability is set using IDfActivity.setPerformerFlag(int)
.
For more information about work item delegation, refer to
Server Fundamentals.
user
- the name of the user to whom the work item is delegatedDfException
- if the server returns an errorIDfActivity getActivity() throws DfException
Every work item is associated with an activity. When the activity is started, the server generates the associated work items and puts them in the inboxes of the designated activity performers.
The following code example demonstrates how to obtain an IDfWorkitem interface then obtain the corresponding activity object:
IDfCollection tasks = sess.getTasks("someUser", DfSession.DF_TASKS, null, "task_name"); while (tasks.next()) { IDfWorkitem wi = (IDfWorkitem)sess.getObject(tasks.getId("item_id")); IDfActivity act = wi.getActivity(); System.out.println("Activity Name: " + act.getObjectName()); }
DfException
- if the server returns an error.boolean isDelegatable() throws DfException
A work item can be delegated if its performer has been given
the ability to delegate activities. When this is the case, the work
item performer can give the work item to another user. Delegation is done
with the method delegateTask(java.lang.String)
.
For more information about delegating work items, refer to Server Fundamentals.
true
if task can be delegated; false
if
it cannotDfException
- if the server returns an errorboolean isRepeatable() throws DfException
If an activity is defined as repeatable, the performer can designate additional (extended) performers for the associated work item. After the first performer completes the work item, the server puts the work item in the inboxes of the designated extended performers.
For more information about the extension feature, refer to Server Fundamentals.
true
if the work item can be repeated; false
if it cannotDfException
- if the server returns an errorIDfActivity.setRepeatableInvoke(boolean)
void pause() throws DfException
The work item must be in the dormant state. The user issuing this method must be the workflow supervisor or a user with Sysadmin or Superuser privileges. If the method is successful, the work item's state is set to paused.
Executing this methods changes information in the queue item associated with the work item. Re-run the inbox query to refresh the inbox if you want the user to see the changes.
For more information about manipulating work item states, refer to Server Fundamentals.
DfException
- if the server returns an errorvoid resume() throws DfException
The user issuing this method must be the workflow supervisor or a user with Sysadmin or Superuser privileges. If the method is successful, the work item's state is set to dormant.
Executing this methods changes information in the queue item associated with the work item. Re-run the inbox query to refresh the inbox if you want the user to see the changes.
For more information about manipulating work item states, refer to Server Fundamentals.
DfException
- if the server returns an errorvoid complete() throws DfException
The user issuing this method must be the work item's performer, the workflow supervisor, or a user with Sysadmin or Superuser privileges. The work item must be in the acquired state. If the method is successful, it sets the work item's state to finished.
Note: If the activity that generated this work item has sign_off_required set
to true, then the IDfPersistentObject.signoff(java.lang.String, java.lang.String, java.lang.String)
method must be executed successfully before
the complete
method can be executed. To determine if a signoff is
required, use the isSignOffRequired()
method.
Executing this method changes information in the queue item associated with the work item. Re-run the inbox query to refresh the inbox if you want the user to see the changes.
The method also updates the r_complete_witem and r_last_performer attributes for the activity runtime instance in the workflow object.
To provide a return value, record an error message or
result document ID, then use completeEx(int, java.lang.String, com.documentum.fc.common.IDfId)
instead of this method.
For more information about manipulating work item states,
refer to Server Fundamentals.
If the activity that generated the work item has a route case transition defined using an XPath condition, you cannot use this method inside a user-defined transaction.
The following code example demonstrates how to obtain an IDfWorkitem interface, then acquire and complete the task:
IDfCollection tasks = sess.getTasks("someUser", DfSession.DF_TASKS, null, "task_name"); while (tasks.next()) { IDfPersistentObject pObj = sess.getObjectByQualification("dmi_queue_item where r_object_id='" + tasks.getId("r_object_id").toString() + "'"); // Make sure the task(s) for this user are associated with the workflow if (pObj.getId("router_id").toString().equals(wfId.getId())) { IDfWorkitem wi = (IDfWorkitem)sess.getObject(tasks.getId("item_id")); wi.acquire(); // Do some processing on the work item here wi.complete(); } }
DfException
- if the server returns an error.acquire()
,
delegateTask(java.lang.String)
void completeEx2(int returnValue, java.lang.String execOSError, IDfId execResultId, int userTime, double userCost) throws DfException
The user issuing this method must be the work item's performer, the workflow supervisor, or a user with Sysadmin or Superuser privileges. The work item must be in the acquired state. If the method is successful, it sets the work item's state to finished.
Use this method instead of complete()
when you want
to record a return value, OS error number, or result document ID for
the completed work item.
Executing this method changes information in the queue item associated with the work item. Re-run the inbox query to refresh the inbox if you want the user to see the changes.
The method also updates the r_complete_witem and r_last_performer attributes for the activity runtime instance in the workflow object.
Note: If the activity that generated this work item has sign_off_required set
to true, then the IDfPersistentObject.signoff(java.lang.String, java.lang.String, java.lang.String)
method must be executed successfully before
the completeEx
method can be executed. To determine if a signoff is
required, use the isSignOffRequired()
method.
returnValue
- set this to 0 to indicate that the work item
completed successfully. Set this to a non-zero integer to indicate the
work item did not complete successfully. The actual non-zero value you
use will depend on your business rules.execOSError
- set this to the error number or message that indicates
the cause of failure. This may be up to 255 characters.execResultId
- an IDfId object that contains the object ID of the
document whose content contains the results of the work item's execution.
This parameter is valid only for automatic activities.userTime
- an integer value that indicates the time user spent on this task.userCost
- a double value that indicates the cost user spent on this task.DfException
- if the server returns an errorIDfId getWorkflowId() throws DfException
DfException
- if the server returns an errorint getActSeqno() throws DfException
Activities occur in a defined sequence. When each activity is started, the server assigns the activity a sequence number.
DfException
- if the server returns an errorjava.lang.String getPerformerName() throws DfException
The performer is the person or group to whom the work item is assigned. The performer is specified in the associated activity's definition.
DfException
- if the server returns an errorIDfTime getCreationDate() throws DfException
When an activity is started, the server generates the needed work items and puts them in the inboxes of the designated performers. This method returns the date on which that occurred for this work item.
DfException
- if the server returns an errorIDfTime getDueDate() throws DfException
The due date is the date by which the work item is expected to be completed.
DfException
- if the server returns an errorint getPriority() throws DfException
The priority is user-defined. It is set when the activity is added to the workflow definition. For more information about priorities, refer to Server Fundamentals.
DfException
- if the server returns an errorIDfProcess.addActivity(java.lang.String, com.documentum.fc.common.IDfId, java.lang.String, int)
IDfId getAutoMethodId() throws DfException
getAutoMethodId
is only valid if the work item is generated
from an automatic activity. An automatic activity is an activity whose
operations are performed by an application.
This method returns the ID of the method object which invokes the application that performs the work item operations.
For more information about automatic activities, refer to Server Fundamentals.
DfException
- if the server returns an errorint getReturnValue() throws DfException
The return value indicates whether the work item was successfully
completed. It is set when the performer marks the work item as complete
using the completeEx(int, java.lang.String, com.documentum.fc.common.IDfId)
method.
DfException
- if the server returns an errorIDfId getExecResultId() throws DfException
This method is valid only for automatic activities. The operations
associated with automatic activities are performed by an application.
The workflow designer can choose to save the application's results to
a document (refer to IDfActivity.setExecSaveResults(boolean)
).
For more information about executing automatic activities, refer to Server Fundamentals.
DfException
- if the server returns an errorboolean isExecLaunch() throws DfException
This method is valid only for automatic activities. The exec launch value is set by the method associated with the activity that generated the work item. The value matches the value in the launch_failed attribute of result object returned by the method.
For more information about a method's query result object and its attributes, refer to the description in the DQL EXECUTE statement description in the DQL Reference Manual.
true
if the method's application did not complete
successfully; false
if the application is successfull
the return value is non-zeroDfException
- if the server returns an errorboolean isExecTimeOut() throws DfException
This method is valid only for automatic activities. The method tells you whether the application that performs the work item's operations has timed out. You can specify a timeout period in the method definition, in the activity's definition, or in both (the application is invoked by a method). A timeout specified in the activity definition overrides a timeout specified in the method's definition.
For information about defining methods, refer to the Server Administrator's Guide.
true
if the application has timed out;
false
if it has notDfException
- if the server returns an errorIDfActivity.setExecTimeOut(int)
java.lang.String getExecOsError() throws DfException
This method is valid only for automatic activities. If the application that performs the activity's operations fails, the system records the error string if possible.
For information about automatic activities and their execution, refer to Server Fundamentals.
DfException
- if the server returns an errorjava.lang.String getOutputPort(int valueIndex) throws DfException
Output ports are recorded in a repeating attribute in work items. To execute this method, you must provide the output port's index position in the repeating attribute.
Index positions begin at 0
and increment by 1 for each value in the attribute, up to
n-1, where n is the total number of values
in the attribute. To obtain the total number of values, use
getOutputPortCount()
.
valueIndex
- the index position of the output portDfException
- if the server returns an errorint getOutputPortCount() throws DfException
DfException
- if the server returns an errorjava.lang.String getExtendedPerformer(int valueIndex) throws DfException
If the activity that generated the work item is repeatable, the work item's performer can designate one or more users to perform the work item again in a extended round of operations. When the first performer finishes the work item, the server checks whether any extended performers are defined. If so, the server creates a new work item for each user or group in the list of extended performers.
The list of extended performers is recorded in the work item in a
repeating attribute. To
execute getExtendedPerformer
, you must provide the extended
performer's index position in the repeating attribute.
Index positions begin at 0
and increment by 1 for each value in the attribute, up to
n-1, where n is the total number of values
in the attribute. To obtain the total number of values, use
getExtendedPerformerCount()
.
valueIndex
- the index position of the extended performerDfException
- if the server returns an errorint getExtendedPerformerCount() throws DfException
This method is valid only for work items generated by repeatable activities. Repeatable activities allow their performers to designate another set of users to perform the associated work items again, after the first performance is completed. The second set of performers are called the extended performers. For more information about repeatable activities and extended performers, refer to Server Fundamentals.
DfException
- if the server returns an errorint getRuntimeState() throws DfException
For information about work item states, refer to Server Fundamentals.
Value Meaning 0 Dormant 1 Acquired 2 Finished 3 Paused
DfException
- if the server returns an errorIDfId getQueueItemId() throws DfException
Every work item has a corresponding queue item that represents the queued
work item in a user's inbox. For information about the attributes of the
queue item, refer to the EMC Documentum Object Reference Manual. To manipulate
the queue item, use the IDfQueueItem
interface.
The following code example demonstrates how to obtain an IDfQueueItem interface:
IDfCollection tasks = sess.getTasks("someUser", DfSession.DF_TASKS, null, "task_name"); while (tasks.next()) { IDfWorkitem wi = (IDfWorkitem)sess.getObject(tasks.getId("item_id")); IDfId queueItemId = wi.getQueueItemId(); IDfQueueItem qi = (IDfQueueItem)sess.getObject(queueItemId); System.out.println("Item Name: " + qi.getItemName()); }
DfException
- if the server returns an error.IDfId getActDefId() throws DfException
Activity defintions are stored in dm_activity objects. When an activity is started, the server generates the activity's runtime instance and the required work items. The work items are queued to the specified performers.
DfException
- if the server returns an errorboolean isSignOffRequired() throws DfException
The workflow designer can define an activity such that its generated work items must be signed off by the performers as part of the completion requirements. This method indicates whether the work item has such a requirement.
true
if sign off is required; false
if notDfException
- if the server returns an errorboolean isManualTransition() throws DfException
Each activity has a transition type that defines how the transition from that activity to the next is handled by the workflow. Transition types are specified when the activity is defined. There are three valid transition types: prescribed, manual, and automatic. For information about these, refer to Server Fundamentals.
true
if the transition type is manual; false
if it is notDfException
- if the server returns an errorIDfList getRejectActivities() throws DfException
A revert port allows an activity to accept packages that have been sent back by a following activity.
For more information about revert ports, refer to Server Fundamentals.
DfException
- if the server returns an errorIDfList getForwardActivities() throws DfException
Input and output ports are the means by which a package moves through a workflow. The ports are defined in activity definitions. The links between the ports are defined in the workflow's definition. For more detailed information about ports and links, refer to Server Fundamentals.
The following code example demonstrates how to obtain an IDfWorkitem interface then display all activities who have input ports connected to the current activity's output port:
IDfCollection tasks = sess.getTasks("someUser", DfSession.DF_TASKS, null, "task_name"); while (tasks.next()) { IDfWorkitem wi = (IDfWorkitem)sess.getObject(tasks.getId("item_id")); IDfList listObj = wi.getForwardActivities(); for (int i = 0; i < listObj.getCount(); i++) { IDfActivity act = (IDfActivity)listObj.get(i); System.out.println("Activity Name: " + act.getObjectName()); } }
DfException
- if the server returns an error.void setOutputByActivities(IDfList actList) throws DfException
This method defines, by name, the activities that follow this work item. Typically, when a work item is completed, the server uses information in the workflow and activity definitions to determine the output ports. However, you can use this method to manually identify the output ports.
The following code example demonstrates how to obtain an IDfWorkitem interface then set the output to the last activity in the workflow:
IDfCollection tasks = sess.getTasks("someUser", DfSession.DF_TASKS, null, "task_name"); while (tasks.next()) { IDfWorkitem wi = (IDfWorkitem)sess.getObject(tasks.getId("item_id")); IDfList listObj = wi.getNextActivityNames(); for (int i = 0; i < listObj.getCount(); i++) { // Loop to the last activity... } // Set the output to the last activity thus skipping the // other activities in this workflow IDfActivity act = (IDfActivity)listObj.get(i - 1); IDfList actList = new IDfList(); actList.append(act); wi.setOutputByActivities(actList); }
actList
- an IDfList object that contains a list of the activity names.DfException
- if the server returns an error.IDfCollection getMissingOutputPackages() throws DfException
Before a work item can be considered completed, all output ports must have an associated package. This method returns the output ports that are awaiting packages and the binding conditions for each package.
For more information about ports, packages, and package binding conditions, refer to Server Fundamentals.
r_port_type r_port_name r_package_name r_package_type r_package_label r_package_flag (if the repository supports this attribute)
DfException
- if the server returns an error.void completeEx(int returnValue, java.lang.String execOSError, IDfId execResultId) throws DfException
The user issuing this method must be the work item's performer, the workflow supervisor, or a user with Sysadmin or Superuser privileges. The work item must be in the acquired state. If the method is successful, it sets the work item's state to finished.
Use this method instead of complete()
when you want
to record a return value, OS error number, or result document ID for
the completed work item.
Executing this method changes information in the queue item associated with the work item. Re-run the inbox query to refresh the inbox if you want the user to see the changes.
returnValue
- set this to 0 to indicate that the work item
completed successfully. Set this to a non-zero integer to indicate the
work item didn't complete successfully. The actual non-zero value you
use will depend on your business rules.execOSError
- set this to the error number or message that indicates
the cause of failure.execResultId
- an IDfId object that contains the object ID of the
document whose content contains the results of the work item's execution.
This parameter is valid only for automatic activities.DfException
- if the server returns an errorboolean isManualExecution() throws DfException
Activities are defined as manual or automatic. If an activity is manual, the work item is performed by a human being. If the activity is automatic, the work item is performed by an application or procedure.
true
if the associated activity is a manual activity;
false
if it is notDfException
- if the server returns an errorIDfTime getLaunchTimeout() throws DfException
DfException
- if server error occursvoid setPerformers(java.lang.String actName, IDfList userGroupList) throws DfException
The values for the performer list depends on the performer type of the specified activity. Here is the valid values for each performer type:
Performer Type Valid performers 0 - Workflow Supervisor No effect 1 - Repository Owner No effect 2 - Last Performer No effect 3 - Specific User A single user name 4 - All Users From Group A single group name 5 - Single User From Group A single group name 6 - Least Loaded User From Group A single group name 8, 9 - Some Users (Sequentially) Any numbers of user names and/or group names (Note: For each group name provided, only one task will be generated and the first user who acquires the task owns the task.) 10 - Single User From Work Queue A single group name
actName
- Activity name for which the performers is being setuserGroupList
- List of performers which contains user names and/or group namesDfException
- if server error occursvoid setPriority(int newPriority) throws DfException
The workitem can not be in finished state. The workflow must be in running state.
The person issuing this method must be the workflow supervisor or superuser, the workitem's performers can not change priority of their workitems. If enable_workitem_mgmt is set to T in server.ini file, then any user can issue this method.
newPriority
- set priority of the workitem to newPriorityDfException
- if server error occursIDfId addAttachment(java.lang.String componentType, IDfId componentId) throws DfException
You must be the task performer to use this method. And the task must be in active state.
This method adds an attachment, consisting of only one component, to the workflow.
componentType
- the object type of the component. This is either the
actual object type of the component or a supertype of the component.componentId
- an object ID to the package's components.DfException
- if the server returns an error.removeAttachment(com.documentum.fc.common.IDfId)
void removeAttachment(IDfId attachmentId) throws DfException
You must be the task performer to use this method. And the task must be in active state.
attachmentId
- an object ID to the attachment you are removing.DfException
- if the server returns an error.addAttachment(java.lang.String, com.documentum.fc.common.IDfId)
IDfCollection getAttachments() throws DfException
This method returns a collection that contains one query result object for each attachment. The query result objects have the following attributes:
r_object_id r_component_id r_component_name r_component_type r_creator_name r_creation_dateRefer to the description of the dmi_wf_attachment type in the EMC Documentum Object Reference Manual for a description of these attributes.
DfException
- if the query failed or
the session has timed out and cannot be reestablishedIDfWorkflowAttachment getAttachment(IDfId attachmentId) throws DfException
attachmentId
- the object ID of the attachment.DfException
- if the server returns an error.IDfCollection getAllPackages(java.lang.String additionalAttributes) throws DfException
This differs from getPackages by returning both visible and invisible packages.
additionalAttributes
- for the query string. The parameter has
the form of a comma delimited stringDfException
- if the query failed or the session has timed out and cannot be reestablished.double getUserCost() throws DfException
DfException
int getUserTime() throws DfException
DfException
IDfId queue(java.lang.String user, java.lang.String eventType, int priority, boolean sendMail, IDfTime dueDate, java.lang.String message) throws DfException
The following code example demonstrates how to trigger an event by calling queue():
IDfWorkitem wkitem = ... IDfTime t = new DfTime("08/09/2000", "mm/dd/yyyy"); IDfId inboxId = wkitem.queue("tuser","EventName",1,false,t,"Please review");
user
- the name of the user. You can specify this as null
if you wish, which is interpreted to mean the workflow supervisor.eventType
- the name of the event. This argument must be specified.priority
- the importance of the event. This is optional and can be
specified as null
.sendMail
- true
if you want to send an email notification
of the event to the workflow supervisor or false
if you do not.dueDate
- specifies a date for the completion of the work represented
by the queued object.message
- a message included in the email notification sent to the
workflow supervisor. Include a message only if sendMail
is
set to true
.DfException
- if the server returns an error.void setPackageSkillLevel(java.lang.String packageName, int skillLevel) throws DfException
packageName
- the name of the package.skillLevel
- the skill level of the package.DfException
- if the server returns an error.int getSkillLevel() throws DfException
The skill_level is stored in the 'position' attibute of the task's queueitem.
DfException
- if the server returns an error.IDfId getTargetTaskId() throws DfException
DfException
int getExecRetriedCount() throws DfException
DfException
Copyright 1994-2023 OpenText Corporation. All rights reserved.