Interface IDfProcess

All Superinterfaces:
IDfPersistentObject, IDfSysObject, IDfTypedObject

public interface IDfProcess extends IDfSysObject
Methods you use to create and manipulate process objects, the objects that store workflow definitions in the repository.
  • Field Details

  • Method Details

    • validate

      void validate() throws DfException
      Validates the workflow definition.

      You must have at least Relate permission on the process object or be a user with Sysadmin or Superuser privileges to use this method.

      The workflow definition must be in the draft state to be validated. Validating a workflow definition ensures that:

      • All referenced activities exist and are in the validated state
      • The ports identified as source and destination ports exist and are connectable
      • There is only one link defined for each source/destination port pair
      • There is one and only one end activity defined
      If the method succeeds, the workflow definition's state is set to validated.

      If the activities are not validated, you can use validateProcessAndActivities() to validate both the workflow and the activities in one step.

      For more information about what constitutes a valid workflow definition, refer to Server Fundamentals.

      Throws:
      DfException - if the server returns an error
      See Also:
    • validateEx

      void validateEx(boolean checkActivity) throws DfException
      Validates the workflow definition.

      You must have at least Relate permission on the process object or be a user with Sysadmin or Superuser privileges to use this method.

      The workflow definition must be in the draft state to be validated. Validating a workflow definition ensures that:

      • All referenced activities exist and are in the validated state
      • The ports identified as source and destination ports exist and are connectable
      • There is only one link defined for each source/destination port pair
      • There is one and only one end activity defined
      If the method succeeds, the workflow definition's state is set to validated.

      If the activities are not validated, you can use validateProcessAndActivities() to validate both the workflow and the activities in one step.

      For more information about what constitutes a valid workflow definition, refer to Server Fundamentals.

      Parameters:
      checkActivity - indicates whether to validate the activites referenced by the process definition.
      Throws:
      DfException - if the server returns an error
      See Also:
    • invalidate

      void invalidate() throws DfException
      Moves the validated workflow definition back to the draft state.

      You must have at least Relate permission on the process object or be a user with Sysadmin or Superuser privileges to use this method.

      For more information about validating workflow definitions, refer to Server Fundamentals.

      Throws:
      DfException - if the server returns an error
    • validateProcessAndActivities

      void validateProcessAndActivities() throws DfException
      Validates the workflow defintion and its referenced activities.

      You must have at least Relate permission on the process object or be a user with Sysadmin or Superuser privileges to use this method.

      Before a workflow definition can be set to the validated state, all of the activities referenced in the definition must be in the validated state. You can do that using IDfActivity.validate() when you create the activity definitions or you can use this method to validate the activities and the workflow definition in one step.

      For information about what constitutes valid activities and workflows, refer to Server Fundamentals.

      Throws:
      DfException - if the server returns an error
      See Also:
    • install

      void install(boolean installActivity, boolean resume) throws DfException
      Installs a validated workflow definition.

      You must have at least Relate permission on the process object or be a user with Sysadmin or Superuser privileges to use this method.

      Installing a workflow definition moves it to the installed state. All activities referenced in the definition must be in the installed state to install the workflow definition. If you did not install the activities using IDfActivity.install() when you created their definitions, you can use the installActivity argument in this method to install them as part of the workflow definition's installation. However, if you use this argument to install activities, note that the method does not validate the draft activities before installing them.

      If there are runtime instances of the workflow definition, use the resume parameter to indicate whether to abort or resume those instances after the definition is installed.

      Parameters:
      installActivity - true to install the referenced activities; false if the activites are already installed
      resume - true to resume any runtime instances that are based on this workflow definition; false to abort those runtime instances
      Throws:
      DfException - if the server returns an error
    • uninstall

      void uninstall() throws DfException
      Moves the installed workflow definition back to the validated state.

      You must have at least Relate permission on the process object or be a user with Sysadmin or Superuser privileges to use this method.

      Uninstalling a workflow definition halts all runtime instances of the workflow.

      Throws:
      DfException - if the server returns an error
    • addActivity

      void addActivity(String actName, IDfId actId, String actType, int actPriority) throws DfException
      Adds an activity to the workflow definition.

      Before you can add an activity to a workflow definition, you must create the activity's definition. To do this, use the methods in the IDfActivity interface.

      There are no permissions needed to execute addActivity; however, when the workflow definition is saved, the user saving the definition must either have at least Sysadmin privileges or at least Relate permission on the activities in the definition.

      Parameters:
      actName - the name of the activity as specified in the activity's definition
      actId - an IDfId interface object that contains the object ID of the dm_activity object representing the activity's definition
      actType - the type of the activity. One of: begin, step, or end. If you specify this as null, step is assumed.
      actPriority - the activity's priority
      Throws:
      DfException - if the server returns an error
    • removeActivity

      void removeActivity(String actName) throws DfException
      Removes an activity from the workflow definition.

      The workflow definition must be in the uninstalled state.

      Removing an activity fails if the activity is referenced by any links in the workflow definition. To remove the activity, you must first remove any links that reference the activity.

      There are no permissions checked when removing an activity; however, when the workflow definition is saved, the user saving it must have at least Sysadmin privileges or at least Relate permission on the activities in the definition.

      For information about how activities and links are connected in the workflow definition, refer to Server Fundamentals.

      Parameters:
      actName - the name of the activity
      Throws:
      DfException - if the server returns an error
      See Also:
    • addLink

      void addLink(String linkName, String linkSrcActivity, String linkSrcPortName, String linkDestActivity, String linkDstPortName) throws DfException
      Adds a link to a workflow definition.

      Links connect an output port of an activity to the input port of another activity in the workflow definition. Each link must have a unique name within the workflow definition.

      The activities and ports must exist before you add a link to the definition.

      For information about how links and ports function, refer to Server Fundamentals.

      Parameters:
      linkName - the name of the link. This must be unique within the workflow definition.
      linkSrcActivity - the name of the source activity
      linkSrcPortName - the name of an output port in the source activity
      linkDestActivity - the name of the destination activity
      linkDstPortName - the name of an input port in the destination activity
      Throws:
      DfException - if the server returns an error
    • removeLink

      void removeLink(String linkName) throws DfException
      Removes a link from the workflow definition.

      Links connect an output port of an activity to the input port of another activity in the workflow definition.

      For information about how links and ports function, refer to Server Fundamentals.

      Parameters:
      linkName - the name of the link you want to remove
      Throws:
      DfException - if the server returns an error
    • isPrivate

      boolean isPrivate() throws DfException
      Indicates whether the workflow is private or public.

      A private workflow definition is intended for use only by the user who created the definition. A public definition is intended for use by anyone.

      The server does not enforce this constraint. The constraint is purely informational and for the use of client applications.

      Returns:
      true if the definition is intended for use only by the user who created it; false if it is intended for use by anyone
      Throws:
      DfException - if the server returns an error
    • setPrivate

      void setPrivate(boolean isPrivate) throws DfException
      Defines whether the workflow definition is private or public.

      A private workflow definition is intended for use only by the user who created the definition. A public definition is intended for use by anyone.

      The server does not enforce this constraint. The constraint is purely informational and for the use of client applications if desired.

      Parameters:
      isPrivate - set this to true to indicate that the definition is private or to false to indicate it is public.
      Throws:
      DfException - if the server returns an error
    • getDefinitionState

      int getDefinitionState() throws DfException
      Returns the state of the workflow definition.

      Returns:
      An integer value that corresponds to the state of the workflow definition. Valid values and their meanings are:
       Value    Meaning
       0        Draft
       1        Validated
       2        Installed
      Throws:
      DfException - if the server returns an error
    • getActivityCount

      int getActivityCount() throws DfException
      Returns the number of activities in the workflow.

      Activity information is stored in the workflow definition in repeating attributes. The values at any one index position in those attributes represent one activity.

      For information about the individual attributes that store activity information, refer to the EMC Documentum Object Reference Manual or Server Fundamentals.

      Returns:
      The number of activities in the workflow definition
      Throws:
      DfException - if the server returns an error
    • getActivityName

      String getActivityName(int actIndex) throws DfException
      Returns an activity name.

      Activity information is stored in the workflow definition in repeating attributes. The values at any one index position in those attributes represent one activity.

      To execute this method, you must identify the activity by its index position in the repeating attributes. Index positions begin at 0 and increment by 1 for each value in the attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use getActivityCount().

      Parameters:
      actIndex - the index position of the activity
      Returns:
      The activity name
      Throws:
      DfException - if the server returns an error
    • getActivityPriority

      int getActivityPriority(int actIndex) throws DfException
      Returns an activity's priority.

      Activity information is stored in the workflow definition in repeating attributes. The values at any one index position in those attributes represent one activity.

      To execute this method, you must identify the activity by its index position in the repeating attributes. Index positions begin at 0 and increment by 1 for each value in the attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use getActivityCount().

      Parameters:
      actIndex - the index position of the activity
      Returns:
      The activity's priority
      Throws:
      DfException - if the server returns an error
    • getActivityType

      int getActivityType(int actIndex) throws DfException
      Returns an activity's type.

      Activity information is stored in the workflow definition in repeating attributes. The values at any one index position in those attributes represent one activity.

      To execute this method, you must identify the activity by its index position in the repeating attributes. Index positions begin at 0 and increment by 1 for each value in the attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use getActivityCount().

      Parameters:
      actIndex - the index position of the activity
      Returns:
      An integer value corresponding to the activity's type. Valid values and their meanings are:
       Value    Meaning
       0        Step
       1        Begin
       2        End
      Throws:
      DfException - if the server returns an error
    • getActivityTypeByName

      int getActivityTypeByName(String actName) throws DfException
      Given an activity name, return the type of the activity.
      Parameters:
      actName -
      Returns:
      The type of the activity would be one of the following constants: IDfProcess.ACT_TYPE_STEP IDfProcess.ACT_TYPE_BEGIN IDfProcess.ACT_TYPE_END IDfProcess.ACT_TYPE_EXCEPTION IDfProcess.ACT_TYPE_INITIATE
      Throws:
      DfException
    • getActivityIdByName

      IDfId getActivityIdByName(String actName) throws DfException
      Given an activity name, return the id of the activity.
      Parameters:
      actName -
      Returns:
      The id of the activity
      Throws:
      DfException
    • getActivityDefId

      IDfId getActivityDefId(int actIndex) throws DfException
      Returns the object ID of an activity's definition.

      An activity definition is stored in the repository in a dm_activity object. This method returns the object ID of the activity object representing a specified activity.

      To execute this method, you must provide the activity's index position in the workflow definition's repeating attributes. Index positions begin at 0 and increment by 1 for each value in the attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use getActivityCount().

      Parameters:
      actIndex - the index position of the activity
      Returns:
      An IDfId interface object that contains the object ID of the activity's definition
      Throws:
      DfException - if the server returns an error
    • getProcessLinkCount

      int getProcessLinkCount() throws DfException
      Returns the number of links in the workflow definition.

      Links connect an output port of an activity to the input port of another activity in the workflow definition.

      For more information about links, refer to Server Fundamentals.

      Returns:
      The number of links in the workflow definition
      Throws:
      DfException - if the server returns an error
    • getLinkName

      String getLinkName(int linkIndex) throws DfException
      Returns a link name.

      Link definitions are stored in repeating attributes in the workflow definition. The values at one index position across the attributes represent one link.

      To execute this method, you must provide the link's index position in the repeating attributes that store link definitions. Index positions begin at 0 and increment by 1 for each value in the attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use getProcessLinkCount().

      Parameters:
      linkIndex - the index position of the link.
      Returns:
      The name of the link
      Throws:
      DfException - if the server returns an error
    • getLinkSrcActivity

      String getLinkSrcActivity(int linkIndex) throws DfException
      Returns a link's source activity.

      Links connect an output port of an activity to the input port of another activity. This method returns name of the activity that contains the output port for a specified link. That activity is called the link's source activity.

      To execute this method, you must identify the link by its index position in the repeating attributes that store link definitions. Index positions begin at 0 and increment by 1 for each value in the attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use getProcessLinkCount().

      Parameters:
      linkIndex - the index position of the link
      Returns:
      The name of the link's source activity
      Throws:
      DfException - if the server returns an error
    • getLinkSrcPort

      String getLinkSrcPort(int linkIndex) throws DfException
      Returns a link's source port.

      Links connect an output port of an activity to the input port of another activity. This method returns the name of the output port in the source activity for a specified link.

      To execute this method, you must identify the link by its index position in the repeating attributes that store link defintions. Index positions begin at 0 and increment by 1 for each value in the attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use getProcessLinkCount().

      Parameters:
      linkIndex - the index position of the link
      Returns:
      The name of the source activity's output port
      Throws:
      DfException - if the server returns an error
    • getLinkDestActivity

      String getLinkDestActivity(int linkIndex) throws DfException
      Returns a link's destination activity.

      Links connect an output port of an activity to the input port of another activity. This method returns the name of the activity that contains the input port for a specified link. That activity is called the link's destination activity.

      To execute this method, you must identify the link by its index position in the repeating attributes that store link definitions. Index positions begin at 0 and increment by 1 for each value in the attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use getProcessLinkCount().

      Parameters:
      linkIndex - the index position of the link
      Returns:
      The name of the destination activity
      Throws:
      DfException - if the server returns an error
    • getLinkDestPort

      String getLinkDestPort(int linkIndex) throws DfException
      Returns a link's destination port.

      Links connect an output port of an activity to the input port of another activity. This method returns the name of the inpout port in the destination activity for a specified link.

      To execute this method, you must identify the link by its index position in the repeating attributes that store link defintions. Index positions begin at 0 and increment by 1 for each value in the attribute, up to n-1 where n is the total number of values in the attribute. To obtain the total number of values, use getProcessLinkCount().

      Parameters:
      linkIndex - the index position of the link
      Returns:
      The name of the destination activity's input port
      Throws:
      DfException - if the server returns an error
    • getPerformerAliasId

      IDfId getPerformerAliasId() throws DfException
      Returns process's performer alias set object id.

      Returns:
      The object id of the performer alias set of the process
      Throws:
      DfException - if the server returns an error
    • setPerformerAliasId

      void setPerformerAliasId(IDfId aliasId) throws DfException
      Defines the process's performer alias set object id.

      Parameters:
      aliasId - the object id of the alias set
      Throws:
      DfException - if the server returns an error
    • getActChooseNameCount

      int getActChooseNameCount() throws DfException
      Returns the number of values in the act_choose_name attribute.

      Returns:
      value count of the attribute act_choose_name
      Throws:
      DfException - if server error occurs
      See Also:
    • getActChooseName

      String getActChooseName(int index) throws DfException
      Returns the act_choose_name attribute value at the specified index.

      Parameters:
      index - Index position of the value to be returned
      Returns:
      act_choose_name value at specified index position
      Throws:
      DfException - if server error occurs
      See Also:
    • setActChooseName

      void setActChooseName(int index, String name) throws DfException
      Sets the act_choose_name attribute at a specified index position.

      Parameters:
      index - Index position at which to set the value
      name - Name to be set
      Throws:
      DfException - if server error occurs
      See Also:
    • getActChooseByCount

      int getActChooseByCount() throws DfException
      Returns the number of values in the act_choose_by attribute.

      Returns:
      value count of the attribute act_choose_by
      Throws:
      DfException - if server error occurs
      See Also:
    • getActChooseBy

      String getActChooseBy(int index) throws DfException
      Returns the act_choose_by attribute value at the specified index position.

      Parameters:
      index - Index position of the value to be returned
      Returns:
      act_choose_by value at the specified index position
      Throws:
      DfException - if server error occurs
      See Also:
    • setActChooseBy

      void setActChooseBy(int index, String name) throws DfException
      Sets the act_choose_by attribute value at the specified index position.

      Parameters:
      index - Index position at which to set the value
      name - Name to be set
      Throws:
      DfException - if server error occurs
      See Also:
    • getActChooseForCount

      int getActChooseForCount() throws DfException
      Returns the number of values in the act_choose_for attribute.

      Returns:
      value count of the attribute act_choose_for
      Throws:
      DfException - if server error occurs
      See Also:
    • getActChooseFor

      String getActChooseFor(int index) throws DfException
      Returns the act_choose_for attribute value at the specified index position.

      Parameters:
      index - Index position of the value to be returned
      Returns:
      act_choose_for value at the specified index position
      Throws:
      DfException - if server error occurs
      See Also:
    • setActChooseFor

      void setActChooseFor(int index, String name) throws DfException
      Sets the act_choose_for attribute at a specified index position.

      Parameters:
      index - Index position at which to set the value
      name - Name to be set
      Throws:
      DfException - if server error occurs
      See Also:
    • getPackageControl

      int getPackageControl() throws DfException
      Returns the value of the package_control attribute.

      This attribute setting enables or disables package control at the workflow level. Package control determines whether the server sets the r_component_name attribute of dmi_package objects generated from this workflow template.

      Note: Package control may also be enabled or disabled at the repository level. For more information about package control, refer to the Content Server Fundamentals.

      Returns:
      0, meaning package control is disabled; 1, meaning the package control is enabled
      Throws:
      DfException
    • setPackageControl

      void setPackageControl(int packageControl) throws DfException
      Sets the package_control attribute.

      This attribute setting enables or disables package control at the workflow level. Package control determines whether the server sets the r_component_name attribute of dmi_package objects generated from this workflow template.

      Note: Package control may also be enabled or disabled at the repository level. For more information about package control, refer to the Content Server Fundamentals.

      Parameters:
      packageControl - 0 disables package control at workflow level; 1 enables package control at workflow level
      Throws:
      DfException
    • setPackageSchemaUri

      void setPackageSchemaUri(String packageName, String schemaUri) throws DfException
      Creates a relation between an XML schema URI and a package. If a schema is already associated with this package, that association is replaced with this new association.
      Parameters:
      packageName - the name of the package to which the schema is related
      schemaUri - URL to an externally located schema
      Throws:
      DfException - if a server error occurs
    • setPackageSchemaId

      void setPackageSchemaId(String packageName, IDfId schemaId) throws DfException
      Creates a relation between an XML schema document and a package. If a schema is already associated with this package, that association is replaced with this new association.
      Parameters:
      packageName - the name of the package to which the schema is related
      schemaId - the id of a sysobject containing the XML schema as content
      Throws:
      DfException - if a server error occurs
    • removePackageSchemaAssociation

      void removePackageSchemaAssociation(String packageName) throws DfException
      Removes the association of an XML schema document to a package. If no association exists the call is ignored.
      Parameters:
      packageName - the name of the package to which the schema is related
      Throws:
      DfException - if a server error occurs
    • getPackageSchemaUri

      String getPackageSchemaUri(String packageName) throws DfException
      Returns the URL of an externally located schema if one exists.
      Parameters:
      packageName - the name of the package to which the schema is related
      Returns:
      the URL of an externally located schema, if one exists, otherwise null
      Throws:
      DfException - if a server error occurs
    • getPackageSchemaId

      IDfId getPackageSchemaId(String packageName) throws DfException
      Returns the object id of an XML schema if one exists.
      Parameters:
      packageName - the name of the package to which the schema is related
      Returns:
      the object id of an XML schema, if one exists, otherwise null
      Throws:
      DfException - if a server error occurs
    • appendActPerformer

      void appendActPerformer(int actPerfRule, String actPerfFrom, String actPerfTo) throws DfException
      Append values to parallel attributes: act_performer_rule/act_performer_from/act_performer_to
      Parameters:
      actPerfRule - the rule to select performers
      actPerfFrom - Name of the activity from which the performers are selected
      actPerfTo - Name of the activity whose performers are selected
      Throws:
      DfException
    • removeActPerformer

      void removeActPerformer(int index) throws DfException
      Remove the act_performer_rule/act_performer_from/act_performer_to values at the corresponding index position.
      Parameters:
      index - Index position at which to remove the values
      Throws:
      DfException
    • getActPerformerCount

      int getActPerformerCount() throws DfException
      Return the number of entries of the parallel attributes: act_performer_rule/act_performer_from/act_performer_to
      Throws:
      DfException
    • getStartActivities

      IDfList getStartActivities(String initiateAct) throws DfException
      Return the list of start activities linked with the given initiate activity. If the initiateAct passed in is null, then return all start activities.
      Parameters:
      initiateAct -
      Returns:
      A string list. Returns null if the given initiate activity does not exist.
      Throws:
      DfException