Package com.documentum.fc.client

# Interface IDfWorkflow

All Superinterfaces:
  `IDfPersistentObject`, `IDfTypedObject`

public interface IDfWorkflow extends IDfPersistentObject
This interface provides methods that allow you to create, start, and manage a workflow. The methods in this interface are called by the StartWorkflow and Inbox SBOs. You can also use the StartWorkflow SBO to create a new workflow and the Inbox SBO to manage tasks. For more information, refer the SBO Javadocs.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `DF_ACT_STATE_ACTIVE`
  The state of the activity is Active.
  `static final int`
  `DF_ACT_STATE_DORMANT`
  The state of the activity is Dormant.
  `static final int`
  `DF_ACT_STATE_FAILED`
  The state of the activity is Failed.
  `static final int`
  `DF_ACT_STATE_FINISHED`
  The state of the activity is Finished.
  `static final int`
  `DF_ACT_STATE_HALTED`
  The state of the activity is Halted.
  `static final int`
  `DF_ACT_STATE_UNKNOWN`
  The state of the activity is unknown.
  `static final int`
  `DF_ALLOW_REJECT_INITIATOR`
  Flag used for calling `IDfSession.sendToDistributionListEx(com.documentum.fc.common.IDfList, com.documentum.fc.common.IDfList, java.lang.String, com.documentum.fc.common.IDfList, int, int)`.
  `static final int`
  `DF_ALLOW_REJECT_PREVIOUS`
  Flag used for calling `IDfSession.sendToDistributionListEx(com.documentum.fc.common.IDfList, com.documentum.fc.common.IDfList, java.lang.String, com.documentum.fc.common.IDfList, int, int)`.
  `static final int`
  `DF_REQ_END_NOTIFICATION`
  Flag used for calling `IDfSession.sendToDistributionListEx(com.documentum.fc.common.IDfList, com.documentum.fc.common.IDfList, java.lang.String, com.documentum.fc.common.IDfList, int, int)`.
  `static final int`
  `DF_REQ_SIGN_OFF`
  Flag used for calling `IDfSession.sendToDistributionListEx(com.documentum.fc.common.IDfList, com.documentum.fc.common.IDfList, java.lang.String, com.documentum.fc.common.IDfList, int, int)`.
  `static final int`
  `DF_SEQUENTIAL`
  Flag used for calling `IDfSession.sendToDistributionListEx(com.documentum.fc.common.IDfList, com.documentum.fc.common.IDfList, java.lang.String, com.documentum.fc.common.IDfList, int, int)`.
  `static final int`
  `DF_WF_STATE_DORMANT`
  The state of the workflow task is Dormant.
  `static final int`
  `DF_WF_STATE_FINISHED`
  The state of the workflow task is Finished.
  `static final int`
  `DF_WF_STATE_HALTED`
  The state of the workflow task is Halted.
  `static final int`
  `DF_WF_STATE_RUNNING`
  The state of the workflow task is Running.
  `static final int`
  `DF_WF_STATE_TERMINATED`
  The state of the workflow task is Terminated.
  `static final int`
  `DF_WF_STATE_UNKNOWN`
  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 Type
  Method
  Description
  `void`
  `abort()`
  Terminates a workflow.
  `IDfId`
  `addAttachment(String componentType, IDfId componentId)`
  Adds an attachment to the workflow.
  `IDfId`
  `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.
  `IDfId`
  `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.
  `IDfId`
  `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 package
  `IDfId`
  `addPackageEx(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 package
  `void`
  `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.
  `IDfId`
  `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`
  `getActivityCount()`
  Returns the number of activity instances in the workflow.
  `String`
  `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.
  `IDfId`
  `getAliasSetId()`
  Returns the alias set object id for the workflow instance.
  `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.
  `int`
  `getCompleteWitem(int valueIndex)`
  Returns the number of completed work items for an activity.
  `String`
  `getCorrelationIdentifier()`
  Returns value of the 'correlation_identifier' attribute.
  `String`
  `getCreatorName()`
  Returns the name of the person who created the workflow.
  `String`
  `getInitiateAct()`
  Returns value of the 'initiate_act' attribute.
  `String`
  `getInstructions(int index)`
  Returns the instructions attribute at the specified index.
  `int`
  `getInstructionsCount()`
  Returns the number of values the instructions attribute has.
  `String`
  `getLastPerformer(int valueIndex)`
  Returns the name of the performer who most recently completed a work item for a particular activity.
  `IDfId`
  `getLastWitemId(int valueIndex)`
  Returns the object ID of the most recently completed work item for a particular activity.
  `int`
  `getNextSeqno()`
  Returns the next sequence number in the workflow.
  `String`
  `getObjectName()`
  Returns the name of the workflow object.
  `int`
  `getPackageSkillLevel(String packageName)`
  Returns the skill level of the given package.
  `String`
  `getParentActName()`
  Returns value of the 'parent_act_name' attribute.
  `int`
  `getParentActSeqno()`
  Returns value of the 'parent_act_seqno' attribute.
  `IDfId`
  `getParentId()`
  Returns value of the 'parent_id' attribute.
  `IDfList`
  `getPerformerActivityNames()`
  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.
  `IDfList`
  `getPerformers(String actName)`
  Returns a list of user and group names for the specified performer activity name.
  `IDfTime`
  `getPostTimer(int valueIndex)`
  Returns the post-timer value for an activity.
  `IDfTime`
  `getPreTimer(int valueIndex)`
  Returns the pre-timer value for an activity.
  `IDfId`
  `getProcessId()`
  Returns the object ID of the workflow's definition.
  `boolean`
  `getRepeatInvoke(int valueIndex)`
  Indicates whether the activity is repeatable.
  `int`
  `getRuntimeState()`
  Returns the state of the workflow.
  `IDfTime`
  `getStartDate()`
  Returns the start date of the workflow.
  `String`
  `getSupervisorName()`
  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.
  `IDfId`
  `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`
  `restartAll()`
  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`
  `resumeAll()`
  Moves a halted workflow to the running state.
  `void`
  `setInitiateAct(String actName)`
  Set initiate_act attribute of the workflow
  `void`
  `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 workflow
  `void`
  `setParentActSeqno(int actSeqno)`
  Set parent_act_seqno attribute of the workflow
  `void`
  `setParentId(IDfId parentId)`
  Set parent_id attribute of the workflow
  `void`
  `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_UNKNOWN
    The state of the workflow task is unknown.
    Since:
      5.1
    See Also:
      - Constant Field Values

  - ### DF_WF_STATE_DORMANT

    static final int DF_WF_STATE_DORMANT
    The state of the workflow task is Dormant.
    Since:
      5.1
    See Also:
      - Constant Field Values

  - ### DF_WF_STATE_RUNNING

    static final int DF_WF_STATE_RUNNING
    The state of the workflow task is Running.
    Since:
      5.1
    See Also:
      - Constant Field Values

  - ### DF_WF_STATE_FINISHED

    static final int DF_WF_STATE_FINISHED
    The state of the workflow task is Finished.
    Since:
      5.1
    See Also:
      - Constant Field Values

  - ### DF_WF_STATE_HALTED

    static final int DF_WF_STATE_HALTED
    The state of the workflow task is Halted.
    Since:
      5.1
    See Also:
      - Constant Field Values

  - ### DF_WF_STATE_TERMINATED

    static final int DF_WF_STATE_TERMINATED
    The state of the workflow task is Terminated.
    Since:
      5.1
    See Also:
      - Constant Field Values

  - ### DF_REQ_END_NOTIFICATION

    static final int DF_REQ_END_NOTIFICATION
    Flag used for calling `IDfSession.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:
      - Constant Field Values

  - ### DF_REQ_SIGN_OFF

    static final int DF_REQ_SIGN_OFF
    Flag used for calling `IDfSession.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:
      - Constant Field Values

  - ### DF_SEQUENTIAL

    static final int DF_SEQUENTIAL
    Flag used for calling `IDfSession.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:
      - Constant Field Values

  - ### DF_ALLOW_REJECT_PREVIOUS

    static final int DF_ALLOW_REJECT_PREVIOUS
    Flag used for calling `IDfSession.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:
      - Constant Field Values

  - ### DF_ALLOW_REJECT_INITIATOR

    static final int DF_ALLOW_REJECT_INITIATOR
    Flag used for calling `IDfSession.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:
      - Constant Field Values

  - ### DF_ACT_STATE_UNKNOWN

    static final int DF_ACT_STATE_UNKNOWN
    The state of the activity is unknown.
    Since:
      5.3
    See Also:
      - Constant Field Values

  - ### DF_ACT_STATE_DORMANT

    static final int DF_ACT_STATE_DORMANT
    The state of the activity is Dormant.
    Since:
      5.3
    See Also:
      - Constant Field Values

  - ### DF_ACT_STATE_ACTIVE

    static final int DF_ACT_STATE_ACTIVE
    The state of the activity is Active.
    Since:
      5.3
    See Also:
      - Constant Field Values

  - ### DF_ACT_STATE_FINISHED

    static final int DF_ACT_STATE_FINISHED
    The state of the activity is Finished.
    Since:
      5.3
    See Also:
      - Constant Field Values

  - ### DF_ACT_STATE_HALTED

    static final int DF_ACT_STATE_HALTED
    The state of the activity is Halted.
    Since:
      5.3
    See Also:
      - Constant Field Values

  - ### DF_ACT_STATE_FAILED

    static final int DF_ACT_STATE_FAILED
    The state of the activity is Failed.
    Since:
      5.3
    See Also:
      - Constant Field Values

- ## Method Details

  - ### execute

    void execute() throws DfException
    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

    void restart(int activitySeqNo) throws DfException
    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 using `getActSeqno(int)`.
    Throws:
      `DfException` - if the activity is not in the failed state.
    See Also:
      - `halt(int)`

  - ### restartEx

    void restartEx(int activitySeqNo, boolean manualComplete) throws DfException
    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 using `getActSeqno(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(int)`

  - ### halt

    void halt(int activitySeqNo) throws DfException
    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, use `haltAll()`.

    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 use `getActSeqno(int)` to obtain the sequence number.
    Throws:
      `DfException` - if the activity is not in the active state
    See Also:
      - `haltAll()`

  - ### haltEx

    void haltEx(int activitySeqNo, int suspendInterval) throws DfException
    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 use `getActSeqno(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:
      - `haltAll()`

  - ### resume

    void resume(int activitySeqNo) throws DfException
    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 use `getActSeqno(int)` to obtain the sequence number.
    Throws:
      `DfException` - if the activity is not in the halted state
    See Also:
      - `resumeAll()`

  - ### restartAll

    void restartAll() throws DfException
    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:
      - `restart(int)`

  - ### abort

    void abort() throws DfException
    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 as `null` 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 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`.
    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 to `true` if you want the note defined in `noteText` to accompany the package through the entire workflow. Set this to `false` if you only want the note to go to performers of the activities immediately following the start activity. The `notePersistent` flag has no effect if `noteText` 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:
      - `removePackage(java.lang.String, java.lang.String, java.lang.String)`
      - `addPackageEx(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, com.documentum.fc.common.IDfList, int)`

  - ### 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 package

    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). 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 to `true` if you want the note defined in `noteText` to accompany the package through the entire workflow. Set this to `false` if you only want the note to go to performers of the activities immediately following the start activity. The `notePersistent` flag has no effect if `noteText` is empty.
      `componentId` - an IDfList object that contains the object ID of the package's component, or null
      `skillLevel` - 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(java.lang.String, java.lang.String, java.lang.String)`

  - ### 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 to `true` if you want the note defined in `noteText` to accompany the package through the entire workflow. Set this to `false` if you only want the note to go to performers of the activities immediately following the start activity. The `notePersistent` flag has no effect if `noteText` is empty.
      `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 null
    Returns:
      An IDfID interface to the package object
    Throws:
      `DfException` - if the server returns an error
    See Also:
      - `removePackage(java.lang.String, java.lang.String, java.lang.String)`
      - `addPackageEx(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, com.documentum.fc.common.IDfList, int)`

  - ### 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 package

    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). 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 to `true` if you want the note defined in `noteText` to accompany the package through the entire workflow. Set this to `false` if you only want the note to go to performers of the activities immediately following the start activity. The `notePersistent` flag has no effect if `noteText` is empty.
      `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 null
      `skillLevel` - 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(java.lang.String, java.lang.String, java.lang.String)`

  - ### 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:
      - `addPackage(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, com.documentum.fc.common.IDfList)`

  - ### getObjectName

    String getObjectName() throws DfException
    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

    void setObjectName(String objectName) throws DfException
    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

    IDfId getProcessId() throws DfException
    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

    void setProcessId(IDfId processId) throws DfException
    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

    String getCreatorName() throws DfException
    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

    String getSupervisorName() throws DfException
    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

    void setSupervisorName(String supervisorName) throws DfException
    Sets the name of the workflow supervisor.

    Parameters:
      `supervisorName` - the name of the supervisor
    Throws:
      `DfException` - if the server returns an error

  - ### getRuntimeState

    int getRuntimeState() throws DfException
    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

    IDfTime getStartDate() throws DfException
    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

    int getNextSeqno() throws DfException
    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

    int getActivityCount() throws DfException
    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

    int getActSeqno(int valueIndex) throws DfException
    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

    String getActName(int valueIndex) throws DfException
    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

    IDfId getActDefId(int valueIndex) throws DfException
    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

    int getActErrorno(int valueIndex) throws DfException
    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

    int getActState(int valueIndex) throws DfException
    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

    boolean getRepeatInvoke(int valueIndex) throws DfException
    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

    int getTriggerThresh(int valueIndex) throws DfException
    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:
      - `IDfActivity.setTriggerThreshold(int)`

  - ### getTriggerInput

    int getTriggerInput(int valueIndex) throws DfException
    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

    int getTriggerRevert(int valueIndex) throws DfException
    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

    IDfTime getPreTimer(int valueIndex) throws DfException
    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:
      - `IDfActivity.setPreTimer(int)`

  - ### getPostTimer

    IDfTime getPostTimer(int valueIndex) throws DfException
    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:
      - `IDfActivity.setPostTimer(int)`

  - ### getTotalWitem

    int getTotalWitem(int valueIndex) throws DfException
    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

    int getCompleteWitem(int valueIndex) throws DfException
    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

    String getLastPerformer(int valueIndex) throws DfException
    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

    IDfId getLastWitemId(int valueIndex) throws DfException
    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

    int getPerformerFlag(int valueIndex) throws DfException
    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:
      - `IDfActivity.setPerformerFlag(int)`

  - ### haltAll

    void haltAll() throws DfException
    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)` or `haltEx(int, int)`.

    For more information about halting workflows, refer to Server Fundamentals.

    Throws:
      `DfException` - if the server returns an error
    See Also:
      - `halt(int)`
      - `haltEx(int, int)`

  - ### resumeAll

    void resumeAll() throws DfException
    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:
      - `resume(int)`

  - ### getAliasSetId

    IDfId getAliasSetId() throws DfException
    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

    int getInstructionsCount() throws DfException
    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(int)`
      - `setInstructions(int, java.lang.String)`

  - ### getInstructions

    String getInstructions(int index) throws DfException
    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:
      - `getInstructionsCount()`
      - `setInstructions(int, java.lang.String)`

  - ### setInstructions

    void setInstructions(int index, String instr) throws DfException
    Sets the instructions attribute at a specified index.

    Parameters:
      `index` - Index at which instructions sets
      `instr` - Name set to instructions
    Throws:
      `DfException` - if server error occurs
    See Also:
      - `getInstructionsCount()`
      - `getInstructions(int)`

  - ### setPerformers

    void setPerformers(String actName, IDfList userGroupList) throws DfException
    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 set
      `userGroupList` - List of performers which contains user names and/or group names
    Throws:
      `DfException` - if server error occurs

  - ### getPerformerActivityNames

    IDfList getPerformerActivityNames() throws DfException
    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

    IDfList getPerformers(String actName) throws DfException
    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

    void updateSupervisorName(String supervisorName) throws DfException
    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

    IDfId addAttachment(String componentType, IDfId componentId) throws DfException
    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(com.documentum.fc.common.IDfId)`

  - ### removeAttachment

    void removeAttachment(IDfId attachmentId) throws DfException
    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:
      - `addAttachment(java.lang.String, com.documentum.fc.common.IDfId)`

  - ### getAttachments

    IDfCollection getAttachments() throws DfException
    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

    IDfWorkflowAttachment getAttachment(IDfId attachmentId) throws DfException
    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

    void setPackageSkillLevel(String packageName, int skillLevel) throws DfException
    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

    int getPackageSkillLevel(String packageName) throws DfException
    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

    IDfId getParentId() throws DfException
    Returns value of the 'parent_id' attribute.
    Returns:
      Id of the parent workflow object
    Throws:
      `DfException`

  - ### setParentId

    void setParentId(IDfId parentId) throws DfException
    Set parent_id attribute of the workflow
    Parameters:
      `parentId` -
    Throws:
      `DfException`

  - ### getParentActName

    String getParentActName() throws DfException
    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

    void setParentActName(String actName) throws DfException
    Set parent_act_name attribute of the workflow
    Parameters:
      `actName` -
    Throws:
      `DfException`

  - ### getParentActSeqno

    int getParentActSeqno() throws DfException
    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

    void setParentActSeqno(int actSeqno) throws DfException
    Set parent_act_seqno attribute of the workflow
    Parameters:
      `actSeqno` -
    Throws:
      `DfException`

  - ### getInitiateAct

    String getInitiateAct() throws DfException
    Returns value of the 'initiate_act' attribute.
    Returns:
      Name of the initiate activity that started the workflow
    Throws:
      `DfException`

  - ### setInitiateAct

    void setInitiateAct(String actName) throws DfException
    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 null
      `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.
      `persistentNote` - set this to `true` if you want the note defined in `noteText` to accompany the package through the entire workflow. Set this to `false` if you only want the note to go to performers of the activities immediately following the start activity. The `notePersistent` flag has no effect if `noteText` is empty.
      `skillLevel` - an Integer that indicates the required skill level of the package
    Throws:
      `DfException`

  - ### getCorrelationIdentifier

    String getCorrelationIdentifier() throws DfException
    Returns value of the 'correlation_identifier' attribute.
    Returns:
      String
    Throws:
      `DfException`