Interface IDfWorkflow
- All Superinterfaces:
IDfPersistentObject
,IDfTypedObject
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The state of the activity is Active.static final int
The state of the activity is Dormant.static final int
The state of the activity is Failed.static final int
The state of the activity is Finished.static final int
The state of the activity is Halted.static final int
The state of the activity is unknown.static final int
static final int
static final int
static final int
static final int
static final int
The state of the workflow task is Dormant.static final int
The state of the workflow task is Finished.static final int
The state of the workflow task is Halted.static final int
The state of the workflow task is Running.static final int
The state of the workflow task is Terminated.static final int
The state of the workflow task is unknown.Fields inherited from interface com.documentum.fc.client.IDfPersistentObject
CURRENCY_CHECK_ALWAYS, CURRENCY_CHECK_FIRST_ACCESS, CURRENCY_CHECK_NEVER, CURRENCY_CHECK_ONCE_PER_SCOPE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
Terminates a workflow.addAttachment
(String componentType, IDfId componentId) Adds an attachment to the workflow.addPackage
(String startActivityName, String inputPortName, String packageName, String packageType, String noteText, boolean notePersistent, IDfList componentId) Adds a package to a start activity in a workflow.addPackage
(String startActivityName, String inputPortName, String packageName, String packageType, String noteText, boolean notePersistent, IDfList componentId, IDfList componentName) Adds a package to a start activity in a workflow.addPackageEx
(String startActivityName, String inputPortName, String packageName, String packageType, String noteText, boolean notePersistent, IDfList componentId, int skillLevel) Adds a package to a start activity in the workflow and specifies a skill_level for the packageaddPackageEx
(String startActivityName, String inputPortName, String packageName, String packageType, String noteText, boolean notePersistent, IDfList componentId, IDfList componentName, int skillLevel) Adds a package to a start activity in the workflow and specifies a skill_level for the packagevoid
addPackageToInitiateAct
(String packageName, String packageType, IDfList componentId) This funtion would add the package to the start activities linked with the initiate activity that has been previously set by the setInitiateAct() API, if the package is defined on some input port of each start activity.void
addPackageToInitiateAct
(String packageName, String packageType, IDfList componentId, String noteText, boolean persistentNote, int skillLevel) This funtion would add the package to the start activities linked with the initiate activity that has been previously set by the setInitiateAct() API, if the package is defined on some input port of each start activity.void
execute()
Starts a workflow.getActDefId
(int valueIndex) Returns the object ID of an activity's definition.int
getActErrorno
(int valueIndex) Returns the error number for a failed activity operation.int
Returns the number of activity instances in the workflow.getActName
(int valueIndex) Returns the name of an activity.int
getActSeqno
(int valueIndex) Returns the sequence number of an activity.int
getActState
(int valueIndex) Returns the state of an activiity.Returns the alias set object id for the workflow instance.getAttachment
(IDfId attachmentId) Returns an attachment object given the ID of the object.Returns a list of all the workflow's attachments.int
getCompleteWitem
(int valueIndex) Returns the number of completed work items for an activity.Returns value of the 'correlation_identifier' attribute.Returns the name of the person who created the workflow.Returns value of the 'initiate_act' attribute.getInstructions
(int index) Returns the instructions attribute at the specified index.int
Returns the number of values the instructions attribute has.getLastPerformer
(int valueIndex) Returns the name of the performer who most recently completed a work item for a particular activity.getLastWitemId
(int valueIndex) Returns the object ID of the most recently completed work item for a particular activity.int
Returns the next sequence number in the workflow.Returns the name of the workflow object.int
getPackageSkillLevel
(String packageName) Returns the skill level of the given package.Returns value of the 'parent_act_name' attribute.int
Returns value of the 'parent_act_seqno' attribute.Returns value of the 'parent_id' attribute.Returns a list of user and group names for the specified performer activity name.int
getPerformerFlag
(int valueIndex) Indicates the activity performer's extra capabilities.getPerformers
(String actName) Returns a list of user and group names for the specified performer activity name.getPostTimer
(int valueIndex) Returns the post-timer value for an activity.getPreTimer
(int valueIndex) Returns the pre-timer value for an activity.Returns the object ID of the workflow's definition.boolean
getRepeatInvoke
(int valueIndex) Indicates whether the activity is repeatable.int
Returns the state of the workflow.Returns the start date of the workflow.Returns the name of the workflow's supervisor.int
getTotalWitem
(int valueIndex) Returns the number of work items generated by an activity.int
getTriggerInput
(int valueIndex) Returns the number of triggered input ports.int
getTriggerRevert
(int valueIndex) Returns a value indicating whether a revert port was triggered for an activity instance.int
getTriggerThresh
(int valueIndex) Returns the trigger threshold for an activity.void
halt
(int activitySeqNo) Halts an activity.void
haltAll()
Halts the workflow.void
haltEx
(int activitySeqNo, int suspendInterval) Halts an activity with a suspend interval.queue
(String supervisor, String eventType, int priority, boolean sendMail, IDfTime dueDate, String message) Sends an event to a workflow.void
removeAttachment
(IDfId attachmentId) Removes an attachment from the workflow.void
removePackage
(String startActivityName, String portName, String packageName) Removes a package from a start activity in the workflow.void
restart
(int activitySeqNo) Restarts a failed activity in the workflow.void
Restarts a halted workflow.void
restartEx
(int activitySeqNo, boolean manualComplete) Restarts a failed activity in the workflow and indicates whether the automatic task (if any) of this activity is intended to be manually completed.void
resume
(int activitySeqNo) Moves a halted activity to the active state.void
Moves a halted workflow to the running state.void
setInitiateAct
(String actName) Set initiate_act attribute of the workflowvoid
setInstructions
(int index, String instr) Sets the instructions attribute at a specified index.void
setObjectName
(String objectName) Sets the object name of a workflow object.void
setPackageSkillLevel
(String packageName, int skillLevel) Set the skill level of a given package.void
setParentActName
(String actName) Set parent_act_name attribute of the workflowvoid
setParentActSeqno
(int actSeqno) Set parent_act_seqno attribute of the workflowvoid
setParentId
(IDfId parentId) Set parent_id attribute of the workflowvoid
setPerformers
(String actName, IDfList userGroupList) Sets the performers attributes for the specified activity name.void
setProcessId
(IDfId processId) Sets the process ID for the workflow.void
setSupervisorName
(String supervisorName) Sets the name of the workflow supervisor.void
updateSupervisorName
(String supervisorName) Change the supervisor of a running workflow.Methods inherited from interface com.documentum.fc.client.IDfPersistentObject
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
Methods inherited from interface com.documentum.fc.client.IDfTypedObject
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
-
Field Details
-
DF_WF_STATE_UNKNOWN
static final int DF_WF_STATE_UNKNOWNThe state of the workflow task is unknown.- Since:
- 5.1
- See Also:
-
DF_WF_STATE_DORMANT
static final int DF_WF_STATE_DORMANTThe state of the workflow task is Dormant.- Since:
- 5.1
- See Also:
-
DF_WF_STATE_RUNNING
static final int DF_WF_STATE_RUNNINGThe state of the workflow task is Running.- Since:
- 5.1
- See Also:
-
DF_WF_STATE_FINISHED
static final int DF_WF_STATE_FINISHEDThe state of the workflow task is Finished.- Since:
- 5.1
- See Also:
-
DF_WF_STATE_HALTED
static final int DF_WF_STATE_HALTEDThe state of the workflow task is Halted.- Since:
- 5.1
- See Also:
-
DF_WF_STATE_TERMINATED
static final int DF_WF_STATE_TERMINATEDThe state of the workflow task is Terminated.- Since:
- 5.1
- See Also:
-
DF_REQ_END_NOTIFICATION
static final int DF_REQ_END_NOTIFICATIONFlag used for callingIDfSession.sendToDistributionListEx(com.documentum.fc.common.IDfList, com.documentum.fc.common.IDfList, java.lang.String, com.documentum.fc.common.IDfList, int, int)
. Use this flag when you want the sender to receive a notification when all recipients have completed their workflow tasks.Using this flag alone is equivalent to
IDfSession.sendToDistributionList(com.documentum.fc.common.IDfList, com.documentum.fc.common.IDfList, java.lang.String, com.documentum.fc.common.IDfList, int, boolean)
.- Since:
- 5.1
- See Also:
-
DF_REQ_SIGN_OFF
static final int DF_REQ_SIGN_OFFFlag used for callingIDfSession.sendToDistributionListEx(com.documentum.fc.common.IDfList, com.documentum.fc.common.IDfList, java.lang.String, com.documentum.fc.common.IDfList, int, int)
. Use this flag when you want the recipients to sign off the workflow tasks.- Since:
- 5.1
- See Also:
-
DF_SEQUENTIAL
static final int DF_SEQUENTIALFlag used for callingIDfSession.sendToDistributionListEx(com.documentum.fc.common.IDfList, com.documentum.fc.common.IDfList, java.lang.String, com.documentum.fc.common.IDfList, int, int)
. Use this flag when you want the recipients to receive the workflow tasks sequentially.- Since:
- 5.1
- See Also:
-
DF_ALLOW_REJECT_PREVIOUS
static final int DF_ALLOW_REJECT_PREVIOUSFlag used for callingIDfSession.sendToDistributionListEx(com.documentum.fc.common.IDfList, com.documentum.fc.common.IDfList, java.lang.String, com.documentum.fc.common.IDfList, int, int)
. Use this flag when you want the recipients to be able to reject their workflow tasks to the previous recipient if they are in a sequential ad-hoc workflow.- Since:
- 5.1
- See Also:
-
DF_ALLOW_REJECT_INITIATOR
static final int DF_ALLOW_REJECT_INITIATORFlag used for callingIDfSession.sendToDistributionListEx(com.documentum.fc.common.IDfList, com.documentum.fc.common.IDfList, java.lang.String, com.documentum.fc.common.IDfList, int, int)
. Use this flag when you want the recipients to be able to reject their workflow tasks to the sender if they are in a sequential ad-hoc workflow.- Since:
- 5.1
- See Also:
-
DF_ACT_STATE_UNKNOWN
static final int DF_ACT_STATE_UNKNOWNThe state of the activity is unknown.- Since:
- 5.3
- See Also:
-
DF_ACT_STATE_DORMANT
static final int DF_ACT_STATE_DORMANTThe state of the activity is Dormant.- Since:
- 5.3
- See Also:
-
DF_ACT_STATE_ACTIVE
static final int DF_ACT_STATE_ACTIVEThe state of the activity is Active.- Since:
- 5.3
- See Also:
-
DF_ACT_STATE_FINISHED
static final int DF_ACT_STATE_FINISHEDThe state of the activity is Finished.- Since:
- 5.3
- See Also:
-
DF_ACT_STATE_HALTED
static final int DF_ACT_STATE_HALTEDThe state of the activity is Halted.- Since:
- 5.3
- See Also:
-
DF_ACT_STATE_FAILED
static final int DF_ACT_STATE_FAILEDThe state of the activity is Failed.- Since:
- 5.3
- See Also:
-
-
Method Details
-
execute
Starts a workflow.A workflow is a runtime instance of a dm_process object. You must be the workflow creator or supervisor or a user with Sysadmin or Superuser privileges to use this method.
The following code example demonstrates how to create and execute a second workflow under the same process as a previously started workflow:
// Setup all params for sendToDistributionList() here... IDfId wfId = sess.sendToDistributionList(userList,groupList,"Please review",objList,5,false); IDfWorkflow wfObj = (IDfWorkflow)sess.getObject(wfId); IDfWorkflow wfObj2 = (IDfWorkflow)sess.newObject("dm_workflow"); wfObj2.setProcessId(wfObj.getProcessId()); wfObj2.setSupervisorName("someUser") wfObj2.save(); wfObj2.execute();
- Throws:
DfException
- if the server returns an error
-
restart
Restarts a failed activity in the workflow.You must be the workflow supervisor or a user with Sysadmin or Superuser privileges to use this method. Restarting a failed activity retries the operation that failed. If the operation succeeds, the activity is restarted. If the operation doesn't succeed, the
restart
method fails.If you want to restart a workflow, refer to
restartAll()
.The following code example demonstrates how to halt then restart an activity:
// Create all activity and process objects first... IDfWorkflow wfObj = (IDfWorkflow)sess.newObject("dm_workflow"); wfObj.setProcessId(procObj.getObjectId()); wfObj.setSupervisorName("someUser") wfObj.execute(); wfObj.addPackage(actObj1.getObjectName(), actObj1.getPortName(0), sysObj.getObjectName(), "dm_document", null, false, objList); for (int i = 0; i < wfObj.getActivityCount(); i++) { if (wfObj.getActState(i) == 4) { // Halt the "Failed" activity... wfObj.halt(wfObj.getActSeqno(i)); // ... // Do some other stuff here... // ... // Restart the halted activity... wfObj.restart(wfObj.getActSeqno(i)); } {
- Parameters:
activitySeqNo
- the sequence number of the activity that you want to restart. You can obtain this usinggetActSeqno(int)
.- Throws:
DfException
- if the activity is not in the failed state.- See Also:
-
restartEx
Restarts a failed activity in the workflow and indicates whether the automatic task (if any) of this activity is intended to be manually completed.This method is intended for internal use by Webtop or desktop client task manager, users should not use it. You must be the workflow supervisor or a user with Sysadmin or Superuser privileges to use this method. Restarting a failed activity retries the operation that failed. If the operation succeeds, the activity is restarted. If the operation doesn't succeed, the
restart
method fails.The following code example demonstrates how to halt then restart an activity:
// Create all activity and process objects first... IDfWorkflow wfObj = (IDfWorkflow)sess.newObject("dm_workflow"); wfObj.setProcessId(procObj.getObjectId()); wfObj.setSupervisorName("someUser") wfObj.execute(); wfObj.addPackage(actObj1.getObjectName(), actObj1.getPortName(0), sysObj.getObjectName(), "dm_document", null, false, objList); for (int i = 0; i < wfObj.getActivityCount(); i++) { if (wfObj.getActState(i) == 4) { // Halt the "Failed" activity... wfObj.halt(wfObj.getActSeqno(i)); // ... // Do some other stuff here... // ... // Restart the halted activity... wfObj.restartEx(wfObj.getActSeqno(i), true); } {
- Parameters:
activitySeqNo
- the sequence number of the activity that you want to restart. You can obtain this usinggetActSeqno(int)
. Provide a sequence number only when you want to restart an activity.manualComplete
- indicates whether the automatic task (if any) of this activity instance is intended to be manually completed. True means the automatic task is intended to be manually completed, therefore will not be processed by the workflow agent.- Throws:
DfException
- if the workflow is not in the halted state or the activity is not in the failed state.- See Also:
-
halt
Halts an activity.You must be the workflow supervisor or a user with Sysadmin or Superuser privileges to halt an activity. However, if enable_workitem_mgmt, a server.ini key,is set to true, any user can halt a running activity.
Halting an activity sets the activity's state to halted. The activity must be in the active state to be halted.
This method halts an activity until it is explicitly resumed. If you want to halt an activity for a specified time period, to be automatically resumed after the period expires, use
haltEx(int, int)
. To halt the entire workflow, usehaltAll()
.For more information about halting activities, refer to Server Fundamentals.
The following code example demonstrates how to halt all activities in the "Active" state:
// Create all activity and process objects first... IDfWorkflow wfObj = (IDfWorkflow)sess.newObject("dm_workflow"); wfObj.setProcessId(procObj.getObjectId()); wfObj.setSupervisorName("someUser") wfObj.execute(); wfObj.addPackage(actObj1.getObjectName(), actObj1.getPortName(0), sysObj.getObjectName(), "dm_document", null, false, objList); for (int i = 0; i < wfObj.getActivityCount(); i++) { if (wfObj.getActState(i) == 1) { // Halt the "Active" activity... wfObj.halt(wfObj.getActSeqno(i)); } {
- Parameters:
activitySeqNo
- the sequence number of the activity in the workflow. You can usegetActSeqno(int)
to obtain the sequence number.- Throws:
DfException
- if the activity is not in the active state- See Also:
-
haltEx
Halts an activity with a suspend interval.This method halts an activity for the specified time period and then automatically resumes the activity. To halt an activity for an indefinite length of time, use
halt(int)
. You must be the workflow supervisor or a user with Sysadmin or Superuser privileges to halt an activity. However, if enable_workitem_mgmt, a server.ini key,is set to true, any user can halt a running activity.Halting an activity sets the activity's state to halted. The activity must be in the active state to be halted. For more information about halting activities, refer to Server Fundamentals.
- Parameters:
activitySeqNo
- the sequence number of the activity in the workflow. You can usegetActSeqno(int)
to obtain the sequence number.suspendInterval
- the length of time, in minutes, in which the activity should be resumed after it is halted.- Throws:
DfException
- if the activity is not in the active state- See Also:
-
resume
Moves a halted activity to the active state.You must be the workflow supervisor or a user with Sysadmin or Superuser privileges to resume an activity. The activity must be in the halted state.
If you want to resume a workflow, refer to
resumeAll()
.For more information about resuming activities, refer to Server Fundamentals.
- Parameters:
activitySeqNo
- the sequence number of the activity in the workflow. You can usegetActSeqno(int)
to obtain the sequence number.- Throws:
DfException
- if the activity is not in the halted state- See Also:
-
restartAll
Restarts a halted workflow.You must be the workflow supervisor or a user with Sysadmin or Superuser privileges to resume a workflow.
Restarting a workflow removes all the current activity instances and generated work items and packages. The method regenerates runtime instances for the start activities in the workflow and resets any activity pre-timers. Do not use this method to restart individual activities in the workflow. Use
restart(int)
for that purpose.For more information about restarting workflows, refer to Server Fundamentals.
- Throws:
DfException
- if the workflow is not in the halted state- See Also:
-
abort
Terminates a workflow.You must be the workflow supervisor or a user with Sysadmin or Superuser privileges to terminate the workflow. The workflow must be in the running or halted state and there can be no active automatic activities.
This method sets the workflow's r_runtime_state attribute to terminated.
The following code example demonstrates how to start and abort a workflow:
IDfList userList = new DfList(); IDfList groupList = new DfList(); IDfList objList = new DfList(); userList.appendString("joeuser"); groupList.appendString("EngineeringGroup"); objList.append(new DfId("0900d5bb8001f900")); IDfId wfId = sess.sendToDistributionList(userList,groupList,"Please review",objList,5,false); IDfWorkflow wfObj = (IDfWorkflow)sess.getObject(wfId); wfObj.abort();
- Throws:
DfException
- if the server returns an error
-
queue
IDfId queue(String supervisor, String eventType, int priority, boolean sendMail, IDfTime dueDate, String message) throws DfException Sends an event to a workflow.Workflow activities can be triggered by events. If a triggering event is defined for an activity, the server checks the workflow's queue for the event when it evaluates the pre-conditions of the activity prior to starting the activity.
This method is the means by which such triggering events are sent to the workflow queue. To define a triggering event, use
IDfActivity.setTriggerEvent(java.lang.String)
.For more information about triggering events and activities, refer to Server Fundamentals.
The following code example demonstrates how to trigger an event by calling queue():
// Create all activity and process objects first, then start the // workflow - assume setTriggerEvent() was called when setting up // the first activity... IDfWorkflow wfObj = (IDfWorkflow)sess.newObject("dm_workflow"); wfObj.setProcessId(procObj.getObjectId()); wfObj.setSupervisorName("someUser") wfObj.execute(); // ...Perhaps in another app (or thread), an event is queued which triggers the workflow IDfTime t = new DfTime("08/09/2000", "mm/dd/yyyy"); IDfId inboxId = wfObj.queue("tuser","EventName",1,false,t,"Please review");
- Parameters:
supervisor
- the name of the workflow supervisor. You can specify this asnull
if you wish.eventType
- the name of the event. This argument must be specified.priority
- the importance of the event. This is optional and can be specified asnull
.sendMail
-true
if you want to send an email notification of the event to the workflow supervisor orfalse
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 ifsendMail
is set totrue
.- Returns:
- An IDfId interface to the queue item object that represents the queued event.
- Throws:
DfException
- if the server returns an error.
-
addPackage
IDfId addPackage(String startActivityName, String inputPortName, String packageName, String packageType, String noteText, boolean notePersistent, IDfList componentId) throws DfException Adds a package to a start activity in a workflow.You must be the workflow supervisor, the workflow creator, or a user with at least Sysadmin privileges to use this method. The workflow must be in the running state (r_runtime_state=1). The package may have one component or it may have no components. To add a package with no components, specify
componentId
as null. The start activity must have input ports and a defined pre-condition.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.Note: If you wish to specify a skill level for the package, use
addPackageEx(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, com.documentum.fc.common.IDfList, int)
. For more information about packages and package control, refer to Server Fundamentals. The Content Server Administrator's Guide describes how to enable or disable package control.The following code example demonstrates how to start routing object to users by calling
addPackage
on the first activity's input port:// Create all activity and process objects first... IDfWorkflow wfObj = (IDfWorkflow)sess.newObject("dm_workflow"); wfObj.setProcessId(procObj.getObjectId()); wfObj.setSupervisorName("someUser") wfObj.execute(); // Add a package to the first activity's input port thereby triggering the // object routing mechanism... wfBldrObj.addPackage(actObj1.getObjectName(), actObj1.getPortName(0), actObj1.getPackageName(), "dm_document", null, false, objList);
- Parameters:
startActivityName
- the name of one of the workflow's start activities.inputPortName
- the name of an input port in the start activity.packageName
- the name of a package. This must be a package that is already defined in the workflow definition.packageType
- the object type of the component. This is either the actual object type of the component or a supertype of the component.noteText
- a string that is either the note id or the note content. This can be empty if there is no note for the package.notePersistent
- set this totrue
if you want the note defined innoteText
to accompany the package through the entire workflow. Set this tofalse
if you only want the note to go to performers of the activities immediately following the start activity. ThenotePersistent
flag has no effect ifnoteText
is empty.componentId
- an IDfList object that contains the object ID of the package's component, or null- Returns:
- An IDfID interface to the package object
- Throws:
DfException
- if the server returns an error- See Also:
-
addPackageEx
IDfId addPackageEx(String startActivityName, String inputPortName, String packageName, String packageType, String noteText, boolean notePersistent, IDfList componentId, int skillLevel) throws DfException Adds a package to a start activity in the workflow and specifies a skill_level for the packageYou must be the workflow supervisor the workflow creator, or a user with at least Sysadmin privileges to use this method. The workflow must be in the running state (r_runtime_state=1). This method adds a package, consisting of one component or no components, to the workflow's start activity and specifies a skill level for the package. If you do not want to specify a skill level, set the argument to 0.
The package may have one component, or it may have no components. To add a package with no components, specify
componentIds
as null. The activity must have input ports and a defined pre-condition.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.For more information about packages, package control, and package skill levels, refer to Server Fundamentals. The Content Server Administrator's Guide describes how to enable or disable package control
The following code example demonstrates how to start routing object to users by calling
addPackage
on the first activity's input port:// Create all activity and process objects first... IDfWorkflow wfObj = (IDfWorkflow)sess.newObject("dm_workflow"); wfObj.setProcessId(procObj.getObjectId()); wfObj.setSupervisorName("someUser") wfObj.execute(); // Add a package to the first activity's input port thereby triggering the // object routing mechanism... wfBldrObj.addPackageEx(actObj1.getObjectName(), actObj1.getPortName(0), actObj1.getPackageName(), "dm_document", null, false, objList, skill_level);
- Parameters:
startActivityName
- the name of one of the workflow's start activities.inputPortName
- the name of an input port in the start activity.packageName
- the name of a package. This must be a package that is already defined in the workflow definition.packageType
- the object type of the component. This is either the actual object type of the component or a supertype of the component.noteText
- a string that is either the note id or the note content. This can be empty if there is no note for the package.notePersistent
- set this totrue
if you want the note defined innoteText
to accompany the package through the entire workflow. Set this tofalse
if you only want the note to go to performers of the activities immediately following the start activity. ThenotePersistent
flag has no effect ifnoteText
is empty.componentId
- an IDfList object that contains the object ID of the package's component, or nullskillLevel
- an Integer that indicates the required skill level of the package- Returns:
- An IDfID interface to the package object
- Throws:
DfException
- if the server returns an error- See Also:
-
addPackage
IDfId addPackage(String startActivityName, String inputPortName, String packageName, String packageType, String noteText, boolean notePersistent, IDfList componentId, IDfList componentName) throws DfException Adds a package to a start activity in a workflow.You must be the workflow supervisor, the workflow creator, or a user with at least Sysadmin privileges to use this method. The workflow must be in the running state (r_runtime_state=1). The package may have one component, or it may have no components. To add a package with no components, specify
componentIds
as null. The start activity must have input ports and a defined pre-condition.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.Note: If you wish to specify a skill level for the package, use
addPackageEx(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, com.documentum.fc.common.IDfList, int)
. For more information about packages and package control, refer to Server Fundamentals. The Content Server Administrator's Guide describes how to enable or disable package control.The following code example demonstrates how to start routing object to users by calling
addPackage
on the first activity's input port:// Create all activity and process objects first... IDfWorkflow wfObj = (IDfWorkflow)sess.newObject("dm_workflow"); wfObj.setProcessId(procObj.getObjectId()); wfObj.setSupervisorName("someUser") wfObj.execute(); // Add a package to the first activity's input port thereby triggering the // object routing mechanism... wfBldrObj.addPackage(actObj1.getObjectName(), actObj1.getPortName(0), actObj1.getPackageName(), "dm_document", null, false, objList);
- Parameters:
startActivityName
- the name of one of the workflow's start activities.inputPortName
- the name of an input port in the start activity.packageName
- the name of a package. This must be a package that is already defined in the workflow definition.packageType
- the object type of the component. This is either the actual object type of the component or a supertype of the component.noteText
- a string that is either the note id or the note content. This can be empty if there is no note for the package.notePersistent
- set this totrue
if you want the note defined innoteText
to accompany the package through the entire workflow. Set this tofalse
if you only want the note to go to performers of the activities immediately following the start activity. ThenotePersistent
flag has no effect ifnoteText
is empty.componentId
- an IDfList object that contains the object ID of the package's component, or nullcomponentName
- an IDfList object that contains the name of the package's component or null- Returns:
- An IDfID interface to the package object
- Throws:
DfException
- if the server returns an error- See Also:
-
addPackageEx
IDfId addPackageEx(String startActivityName, String inputPortName, String packageName, String packageType, String noteText, boolean notePersistent, IDfList componentId, IDfList componentName, int skillLevel) throws DfException Adds a package to a start activity in the workflow and specifies a skill_level for the packageYou must be the workflow supervisor the workflow creator, or a user with at least Sysadmin privileges to use this method. The workflow must be in the running state (r_runtime_state=1). This method adds a package, consisting of one or no components, to the workflow's start activity and specifies a skill level for the package. If you do not want to specify a skill level, set the argument to 0.
The package may have one component, or it may have no components. To add a package with no components, specify
componentIds
as null. The activity must have input ports and a defined pre-condition.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.For more information about packages, package control, and package skill levels, refer to Server Fundamentals. The Content Server Administrator's Guide describes how to enable or disable package control
The following code example demonstrates how to start routing object to users by calling
addPackage
on the first activity's input port:// Create all activity and process objects first... IDfWorkflow wfObj = (IDfWorkflow)sess.newObject("dm_workflow"); wfObj.setProcessId(procObj.getObjectId()); wfObj.setSupervisorName("someUser") wfObj.execute(); // Add a package to the first activity's input port thereby triggering the // object routing mechanism... wfBldrObj.addPackageEx(actObj1.getObjectName(), actObj1.getPortName(0), actObj1.getPackageName(), "dm_document", null, false, objList, skill_level);
- Parameters:
startActivityName
- the name of one of the workflow's start activities.inputPortName
- the name of an input port in the start activity.packageName
- the name of a package. This must be a package that is already defined in the workflow definition.packageType
- the object type of the component. This is either the actual object type of the component or a supertype of the component.noteText
- a string that is either the note id or the note content. This can be empty if there is no note for the package.notePersistent
- set this totrue
if you want the note defined innoteText
to accompany the package through the entire workflow. Set this tofalse
if you only want the note to go to performers of the activities immediately following the start activity. ThenotePersistent
flag has no effect ifnoteText
is empty.componentId
- an IDfList object that contains the object ID of the package's component, or nullcomponentName
- 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- Returns:
- An IDfID interface to the package object
- Throws:
DfException
- if the server returns an error- See Also:
-
removePackage
void removePackage(String startActivityName, String portName, String packageName) throws DfException Removes a package from a start activity in the workflow.You must be the workflow supervisor to use this method.
The following code example demonstrates how to remove a package from a start activity:
// Create all activity and process objects first... IDfWorkflow wfObj = (IDfWorkflow)sess.newObject("dm_workflow"); wfObj.setProcessId(procObj.getObjectId()); wfObj.setSupervisorName("someUser") wfObj.execute(); // Packages are added here via addPackage()... // ... // Let's say at some point during processing we don't want a package to be // dealt with by a particular user, hence, the following call is made... wfObj.removePackage(actObjN.getObjectName(), actObjN.getPortName(0), sysObj.getObjectName());
- Parameters:
startActivityName
- the name of the start activity from which you are removing the package.portName
- the name of the port with which the package is associated.packageName
- the name of the package you are removing.- Throws:
DfException
- if the server returns an error.- See Also:
-
getObjectName
Returns the name of the workflow object.A workflow object is the runtime instance of a dm_process object (a workflow definition). For more information about workflows and workflow definitions, refer to Server Fundamentals.
- Returns:
- The object name of the workflow
- Throws:
DfException
- if the server returns an error
-
setObjectName
Sets the object name of a workflow object.A workflow object is the runtime instance of a dm_process object (a workflow definition). For more information about workflows and workflow definitions, refer to Server Fundamentals.
- Parameters:
objectName
- the name you want to give the workflow object- Throws:
DfException
- if the server returns an error
-
getProcessId
Returns the object ID of the workflow's definition.Workflow definitions are stored in dm_process objects. Executing
getProcessId
returns the object ID of the process object on which the workflow is based.- Returns:
- An IDfId interface object that contains the object ID
- Throws:
DfException
- if the server returns an error
-
setProcessId
Sets the process ID for the workflow.A workflow is a runtime instance of a dm_process object. Process objects contain workflow definitions. When you build a workflow in an application, you must identify the process object on which the workflow is based by executing the
setProcessId
method.- Parameters:
processId
- the object ID of the process object containing the workflow's definition- Throws:
DfException
- if the server returns an error
-
getCreatorName
Returns the name of the person who created the workflow.- Returns:
- The name of the workflow's creator.
- Throws:
DfException
- if the server returns an error
-
getSupervisorName
Returns the name of the workflow's supervisor.The default is the creator of the workflow.
- Returns:
- The name of the supervisor.
- Throws:
DfException
- if the server returns an error
-
setSupervisorName
Sets the name of the workflow supervisor.- Parameters:
supervisorName
- the name of the supervisor- Throws:
DfException
- if the server returns an error
-
getRuntimeState
Returns the state of the workflow.- Returns:
- An integer representing the state of the
workflow. Valid values and their meanings are:
Value Meaning 0 Dormant 1 Running 2 Finished 3 Halted 4 Terminated
- Throws:
DfException
- if the server returns an error
-
getStartDate
Returns the start date of the workflow.This is the date on which the workflow was started. The start date is set automatically by the server.
- Returns:
- An IDfTime interface object that contains the start date
- Throws:
DfException
- if the server returns an error
-
getNextSeqno
Returns the next sequence number in the workflow.Sequence numbers are assigned to activity instances in the workflow. The next sequence number is the number to be assigned to the next activity instance.
- Returns:
- The next sequence number
- Throws:
DfException
- if the server returns an error
-
getActivityCount
Returns the number of activity instances in the workflow.Activities are instantiated when they are started. The instances are stored in a set of repeating attributes in the workflow object. This method effectively returns the number of activity instances by returning a count of the number of values in the workflow repeating attributes.
For more information about runtime activities, refer to Server Fundamentals.
- Returns:
- The number of activity instances in the workflow
- Throws:
DfException
- if the server returns an error
-
getActSeqno
Returns the sequence number of an activity.Information about instantiated activities, including their sequence number, is stored in a set of repeating attributes in the workflow object. The information at one index position across the attributes represents one instantiated activity.
To execute this method, you must provide the index position of the activity. Index positions begin at 0 and increment by 1 for each value in the repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.- Parameters:
valueIndex
- the index position of the activity- Returns:
- The activity's sequence number
- Throws:
DfException
- if the server returns an error
-
getActName
Returns the name of an activity.Information about instantiated activities is stored in a set of repeating attributes in the workflow object. The information at one index position across the attributes represents one instantiated activity.
To execute this method, you must provide the activity's index position in those repeating attributes. Index positions begin at 0 and increment by 1 for each value in the repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.- Parameters:
valueIndex
- the index position of the activity- Returns:
- The activity's name
- Throws:
DfException
- if the server returns an error
-
getActDefId
Returns the object ID of an activity's definition.Activity definitions are stored in dm_activity objects. The object ID of an activity's definition is part of the information about the activity that is stored in repeating attributes in the workflow object. The information at one index position across the attributes represents one instantiated activity.
To execute this method, you must provide the activity's index position in those repeating attributes. Index positions begin at 0 and increment by 1 for each value in the repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.- Parameters:
valueIndex
- the index position of the activity- Returns:
- An IDfId interface that contains the object ID of the activity's definition
- Throws:
DfException
- if the server returns an error
-
getActErrorno
Returns the error number for a failed activity operation.If an activity fails, the system records the error number associated with the failure. Use
getActErrorno
for failure recovery.To execute this method, you must provide the activity's index position in the repeating attributes that store information about activities in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.- Parameters:
valueIndex
- the index position of the activity- Returns:
- The error number of the error that caused the failure
- Throws:
DfException
- if the server returns an error
-
getActState
Returns the state of an activiity.To execute this method, you must provide the activity's index position in the repeating attributes that store information about activities in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.- Parameters:
valueIndex
- the index position of the activity- Returns:
- An integer value representing the state of the activity. Valid
values and their meanings are:
Value Meaning 0 Dormant 1 Active 2 Finished 3 Halted 4 Failed
- Throws:
DfException
- if the server returns an error
-
getRepeatInvoke
Indicates whether the activity is repeatable.If an activity is repeatable, it can be invoked more than once in the workflow.
To execute this method, you must provide the activity's index position in the repeating attributes that store activity information in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.- Parameters:
valueIndex
- the index position of the activity- Returns:
true
if the activity is repeatable;false
if it is not- Throws:
DfException
- if the server returns an error
-
getTriggerThresh
Returns the trigger threshold for an activity.An activity's trigger threshold is the number of input ports that must accept packages before the activity can be started.
To execute this method, you must provide the activity's index position in the repeating attributes that store activity information in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.- Parameters:
valueIndex
- the index position of the activity- Returns:
- The number of input ports required to accept packages to start the activity
- Throws:
DfException
- if the server returns an error- See Also:
-
getTriggerInput
Returns the number of triggered input ports.The server records each time an input port accepts a package. When the number reaches the activity's trigger threshold, the activity is started and no more packages are accepted.
To execute this method, you must provide the activity's index position in the repeating attributes that store activity information in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of activity instances, use
getActivityCount()
.For more information about input ports and how they are triggered, refer to Server Fundamentals.
The following code example demonstrates how to start routing objects to users by calling
addPackage
on the first activity's input port, then checking the number of triggered input ports for each activity instance:// Create all activity and process objects first... IDfWorkflow wfObj = (IDfWorkflow)sess.newObject("dm_workflow"); wfObj.setProcessId(procObj.getObjectId()); wfObj.setSupervisorName("someUser") wfObj.execute(); wfObj.addPackage(actObj1.getObjectName(), actObj1.getPortName(0), sysObj.getObjectName(), "dm_document", null, false, objList); for (int i = 0; i < wfObj.getActivityCount(); i++) { System.out.println("Activity " + i); System.out.println("Input Ports: + wfObj.getTriggerInput(i)); {
- Parameters:
valueIndex
- the index position of the activity.- Returns:
- the number of input ports triggered to start the activity.
- Throws:
DfException
- if the server returns an error.
-
getTriggerRevert
Returns a value indicating whether a revert port was triggered for an activity instance.A revert port accepts packages coming back to an activity. That is, an activity performer can choose to send a package back to a prior activity. The prior activity accepts such returns through a revert port. After an activity accepts a package through a revert port, the activity is started for the reverted package and no more packages are accepted through any port, revert or input. Consequently, the value returned by this method is either 0 (no revert ports triggered) or 1 (1 revert port triggered).
To execute this method, you must provide the activity's index position in the repeating attributes that store activity information in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.The following code example demonstrates how to start routing objects to users by calling
addPackage
on the first activity's input port, then checking if a revert port was triggered for each activity instance:// Create all activity and process objects first... IDfWorkflow wfObj = (IDfWorkflow)sess.newObject("dm_workflow"); wfObj.setProcessId(procObj.getObjectId()); wfObj.setSupervisorName("someUser") wfObj.execute(); wfObj.addPackage(actObj1.getObjectName(), actObj1.getPortName(0), sysObj.getObjectName(), "dm_document", null, false, objList); for (int i = 0; i < wfObj.getActivityCount(); i++) { System.out.println("Activity " + i); System.out.println("Revert Port Triggered: + wfObj.getTriggerInput(i)); {
- Parameters:
valueIndex
- the index position of the activity.- Returns:
- 0,no revert ports triggered, or 1, one revert port triggered.
- Throws:
DfException
- if the server returns an error.
-
getPreTimer
Returns the pre-timer value for an activity.The pre-timer value defines the date and time at which the activity is expected to start. If that date and time arrives and the activity hasn't started, the server sends a message to the workflow's supervisor.
The date and time is determined by the pre-timer value set in the activity's definition and the actual start date of the workflow.
To execute this method, you must provide the activity's index position in the repeating attributes that store activity information in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.- Parameters:
valueIndex
- the index position of the activity- Returns:
- An IDfTime interface object that contains the date and time
- Throws:
DfException
- if the server returns an error- See Also:
-
getPostTimer
Returns the post-timer value for an activity.The post-timer value defines date and time by which the activity is expected to be completed. The post-timer is started when the activity starts. If the date and time arrive before the activity is completed, a message is sent to the workflow supervisor.
The date and time are determined by the post-timer value set in the activity's definition and the actual start date of the activity.
To execute this method, you must provide the activity's index position in the repeating attributes that store activity information in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.- Parameters:
valueIndex
- the index position of the activity.- Returns:
- An IDfTime interface object that contains the date and time
- Throws:
DfException
- if the server returns an error- See Also:
-
getTotalWitem
Returns the number of work items generated by an activity.A work item object stores information about a task for a human or automatic performer. Workitems are generated by the workflow engine from an activity object. Users cannot create or modify workitems. >P> To execute this method, you must provide the activity's index position in the repeating attributes that store activity information in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.For more information about work items and their relationship to activities, refer to Server Fundamentals.
- Parameters:
valueIndex
- the index position of the activity- Returns:
- The number of work items generated by the activity
- Throws:
DfException
- if the server returns an error
-
getCompleteWitem
Returns the number of completed work items for an activity.A work item object stores information about a task for a human or automatic performer. Workitems are generated by the workflow engine from an activity object. Users cannot create or modify workitems. >P> To execute this method, you must provide the activity's index position in the repeating attributes that store activity information in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.For more information about work items and their relationship to activities, refer to Server Fundamentals.
- Parameters:
valueIndex
- the index position of the activity- Returns:
- The number of completed work items
- Throws:
DfException
- if the server returns an error
-
getLastPerformer
Returns the name of the performer who most recently completed a work item for a particular activity.To execute this method, you must provide the activity's index position in the repeating attributes that store activity information in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.For more information about work items and their relationship to activities, refer to Server Fundamentals.
- Parameters:
valueIndex
- the index position of the activity- Returns:
- The name of the last performer completing a work item in the activity
- Throws:
DfException
- if the server returns an error
-
getLastWitemId
Returns the object ID of the most recently completed work item for a particular activity.A work item object stores information about a task for a human or automatic performer. Workitems are generated by the workflow engine from an activity object. Users cannot create or modify workitems. >P> To execute this method, you must provide the activity's index position in the repeating attributes that store activity information in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.For more information about work items and their relationship to activities, refer to Server Fundamentals.
- Parameters:
valueIndex
- the index position of the activity- Returns:
- An IDfId interface to the object ID of the work item
- Throws:
DfException
- if the server returns an error
-
getPerformerFlag
Indicates the activity performer's extra capabilities.A workflow designer can give an activity performer the ability to delegate and/or extend an activity. This method returns an integer value that indicates whether an activity's performer has either or both or neither of these abilities.
To execute this method, you must provide the activity's index position in the repeating attributes that store activity information in the workflow. Index positions begin at 0 and increment by 1 for each value in a repeating attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use
getActivityCount()
.- Parameters:
valueIndex
- the index position of the activity- Returns:
- An integer that corresponds to the special abilities assigned
to the performer. Valid values and their meanings are:
Value Meaning 0 Performer cannot delegate or extend the activity 1 Performer can delegate the activity 2 Performer can extend the activity 3 Performer can delegate and extend the activity
- Throws:
DfException
- if the server returns an error- See Also:
-
haltAll
Halts the workflow.You must be the workflow supervisor or a user with Sysadmin or Superuser privileges to halt a workflow. The workflow must be in in the running state and cannot have any automatic activities in the acquired state.
Halting a workflow sets the workflow's state to halted and pauses all unfinished activities. Users cannot acquire tasks until the workflow is resumed. If you want to halt only one activity, use
halt(int)
orhaltEx(int, int)
.For more information about halting workflows, refer to Server Fundamentals.
- Throws:
DfException
- if the server returns an error- See Also:
-
resumeAll
Moves a halted workflow to the running state.You must be the workflow supervisor or a user with Sysadmin or Superuser privileges to resume a workflow.
Resuming a workflow sets the workflow's state to running. The workflow must be in the halted state to be resumed. Do not use this method to resume individual activities in the workflow. Use
resume(int)
for that purpose.For more information about resuming workflows, refer to Server Fundamentals.
- Throws:
DfException
- if the server returns an error- See Also:
-
getAliasSetId
Returns the alias set object id for the workflow instance.- Returns:
- The alias set object id of the workflow instance.
- Throws:
DfException
- if the server returns an error
-
getInstructionsCount
Returns the number of values the instructions attribute has.- Returns:
- value count of the attribute instructions
- Throws:
DfException
- if server error occurs- See Also:
-
getInstructions
Returns the instructions attribute at the specified index.- Parameters:
index
- Index at which instructions returns- Returns:
- instructions at index
- Throws:
DfException
- if server error occurs- See Also:
-
setInstructions
Sets the instructions attribute at a specified index.- Parameters:
index
- Index at which instructions setsinstr
- Name set to instructions- Throws:
DfException
- if server error occurs- See Also:
-
setPerformers
Sets the performers attributes for the specified activity name.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
- Parameters:
actName
- Activity name for which the performers is being setuserGroupList
- List of performers which contains user names and/or group names- Throws:
DfException
- if server error occurs
-
getPerformerActivityNames
Returns a list of user and group names for the specified performer activity name.- Returns:
- List of activity names for which performers have been set
- Throws:
DfException
- if server error occurs
-
getPerformers
Returns a list of user and group names for the specified performer activity name.- Parameters:
actName
- Activity name for which the performers is being returned- Returns:
- List of performers which contains user names and/or group names
- Throws:
DfException
- if server error occurs
-
updateSupervisorName
Change the supervisor of a running workflow.- Parameters:
supervisorName
- User name of the new workflow supervisor.- Throws:
DfException
- if a server error occurs- Since:
- 5.1
-
addAttachment
Adds an attachment to the workflow.You must be the workflow supervisor to use this method. And the workflow must be in active state.
This method adds an attachment, consisting of only one component, to the workflow.
- Parameters:
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.- Returns:
- An IDfID interface to the attachment object.
- Throws:
DfException
- if the server returns an error.- Since:
- 5.3
- See Also:
-
removeAttachment
Removes an attachment from the workflow.You must be the workflow supervisor to use this method. And the workflow must be in active state.
- Parameters:
attachmentId
- an object ID to the attachment you are removing.- Throws:
DfException
- if the server returns an error.- Since:
- 5.3
- See Also:
-
getAttachments
Returns a list of all the workflow's attachments.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_date
Refer to the description of the dmi_wf_attachment type in the EMC Documentum Object Reference Manual for a description of these attributes.- Returns:
- An IDfCollection object that contains the specifiec attributes of the attachment
- Throws:
DfException
- if the query failed or the session has timed out and cannot be reestablished- Since:
- 5.3
-
getAttachment
Returns an attachment object given the ID of the object.- Parameters:
attachmentId
- the object ID of the attachment.- Returns:
- an IDfWorkflowAttachment object.
- Throws:
DfException
- if the server returns an error.
-
setPackageSkillLevel
Set the skill level of a given package.- Parameters:
packageName
- the name of the package.skillLevel
- the skill level of the package.- Throws:
DfException
- if the server returns an error.
-
getPackageSkillLevel
Returns the skill level of the given package.If there is no user skill level for this package, return 0. If no package with the packageName defined, return 0.
- Parameters:
packageName
- the name of the package.- Returns:
- an integer.
- Throws:
DfException
- if the server returns an error.
-
getParentId
Returns value of the 'parent_id' attribute.- Returns:
- Id of the parent workflow object
- Throws:
DfException
-
setParentId
Set parent_id attribute of the workflow- Parameters:
parentId
-- Throws:
DfException
-
getParentActName
Returns value of the 'parent_act_name' attribute.- Returns:
- Act name of the parent workflow object from where the sub-process was launched
- Throws:
DfException
-
setParentActName
Set parent_act_name attribute of the workflow- Parameters:
actName
-- Throws:
DfException
-
getParentActSeqno
Returns value of the 'parent_act_seqno' attribute.- Returns:
- Act seqno of the parent workflow object from where the sub-process was launched
- Throws:
DfException
-
setParentActSeqno
Set parent_act_seqno attribute of the workflow- Parameters:
actSeqno
-- Throws:
DfException
-
getInitiateAct
Returns value of the 'initiate_act' attribute.- Returns:
- Name of the initiate activity that started the workflow
- Throws:
DfException
-
setInitiateAct
Set initiate_act attribute of the workflow- Throws:
DfException
-
addPackageToInitiateAct
void addPackageToInitiateAct(String packageName, String packageType, IDfList componentId) throws DfException This funtion would add the package to the start activities linked with the initiate activity that has been previously set by the setInitiateAct() API, if the package is defined on some input port of each start activity. If the setInitiateAct() API has not been called and therefore the initiate_act attribute has not been set yet, then this function would add the package to all start activities, if the package is defined on some input port of each start activity.- Parameters:
packageName
- the name of a package. This must be a package that is already defined in the workflow definition.packageType
- the object type of the component. This is either 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- Throws:
DfException
-
addPackageToInitiateAct
void addPackageToInitiateAct(String packageName, String packageType, IDfList componentId, String noteText, boolean persistentNote, int skillLevel) throws DfException This funtion would add the package to the start activities linked with the initiate activity that has been previously set by the setInitiateAct() API, if the package is defined on some input port of each start activity. If the setInitiateAct() API has not been called and therefore the initiate_act attribute has not been set yet, then this function would add the package to all start activities, if the package is defined on some input port of each start activity.- Parameters:
packageName
- the name of a package. This must be a package that is already defined in the workflow definition.packageType
- the object type of the component. This is either 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 nullnoteText
- a string that is either the note id or the note content. This can be empty if there is no note for the package.persistentNote
- set this totrue
if you want the note defined innoteText
to accompany the package through the entire workflow. Set this tofalse
if you only want the note to go to performers of the activities immediately following the start activity. ThenotePersistent
flag has no effect ifnoteText
is empty.skillLevel
- an Integer that indicates the required skill level of the package- Throws:
DfException
-
getCorrelationIdentifier
Returns value of the 'correlation_identifier' attribute.- Returns:
- String
- Throws:
DfException
-