public interface IDfWorkflowBuilder
Modifier and Type | Field and Description |
---|---|
static int |
DF_WB_CAN_START
The workflow can be started.
|
static int |
DF_WB_NO_EXECUTE_PERMISSION
The user doesn't have Execute permission on the workflow.
|
static int |
DF_WB_NO_RELATE_PERMISSION
The user doesn't have Relate permission on the workflow.
|
static int |
DF_WB_UNINSTALLED_PROCESS
The workflow's associated process object is not installed.
|
Modifier and Type | Method and Description |
---|---|
IDfId |
addPackage(java.lang.String startActivityName,
java.lang.String inputPortName,
java.lang.String packageName,
java.lang.String packageType,
java.lang.String noteText,
boolean notePersistent,
IDfList componentIds)
Adds a package to a start activity in the workflow.
|
IDfProcess |
getProcess()
Returns the process object on which the workflow is based.
|
IDfList |
getStartActivityIds()
Returns the object IDs of the start activities in the workflow's definition.
|
IDfList |
getStartActivityNames()
Returns the names of the start activities in the workflow's definition.
|
int |
getStartStatus()
Indicates whether the user can start the workflow.
|
IDfWorkflow |
getWorkflow()
Returns the workflow object.
|
IDfId |
getWorkflowAliasSetId()
Returns the alias set object id of the workflow object.
|
IDfId |
initWorkflow()
Creates and saves the workflow object in the Documentum server.
|
boolean |
isRunnable()
Indicates whether the workflow's definition is in the installed state.
|
void |
removePackage(java.lang.String activityName,
java.lang.String portName,
java.lang.String packagename)
Removes a package definition from an activity.
|
IDfId |
runWorkflow()
Executes the workflow object.
|
IDfId |
startWorkflow()
Deprecated.
|
static final int DF_WB_CAN_START
static final int DF_WB_UNINSTALLED_PROCESS
static final int DF_WB_NO_RELATE_PERMISSION
static final int DF_WB_NO_EXECUTE_PERMISSION
IDfList getStartActivityIds() throws DfException
Activities are defined as start, end, or step activities. These categories indicate the relative position of the activity in the workflow. A workflow can have multiple start and step activities, but only one end activity.
For more information about start, step, and end activities, refer to Server Fundamentals.
DfException
- if the server returns an errorIDfList getStartActivityNames() throws DfException
Activities are defined as start, end, or step activities. These categories indicate the relative position of the activity in the workflow. A workflow can have multiple start and step activities, but only one end activity.
For more information about start, step, and end activities, refer to Server Fundamentals.
DfException
- if the server returns an errorint getStartStatus() throws DfException
To start a workflow, the dm_process object that contains its definition must be in the installed state. Additionally, the user starting the workflow must have Relate and Execute permissions on the process object.
Relate permission is a base object-level permission. Execute permission is an extended object-level permission. For more information about process definition states and object-level permissions, refer to Server Fundamentals.
DfException
- if the server returns an errorIDfId addPackage(java.lang.String startActivityName, java.lang.String inputPortName, java.lang.String packageName, java.lang.String packageType, java.lang.String noteText, boolean notePersistent, IDfList componentIds) throws DfException
Packages contain the objects on which the workflow activities perform work. You can add a package to a start activity if that activity has at least one input port and a defined pre-condition. The package must be a package that is already specified in the activity's definition. For more information about packages and adding packages to activities, 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:
// Create all activity and process objects first... IDfWorkflowBuilder wfBldrObj = sess.newWorkflowBuilder(procObj.getObjectId()); IDfId wfId = wfBldrObj.startWorkflow(); wfBldrObj.addPackage(actObj1.getObjectName(), actObj1.getPortName(0), sysObj.getObjectName(), "dm_sysobject", null, false, objList);
startActivityName
- the name of one of the workflow's start activities.inputPortName
- the name of an input port of the start activity.packageName
- the name of an existing package in the activity.packageType
- the object type of the package's components.
This must be the real object type, not a supertype, and must match the
object type specified in the package definition in the activity.noteText
- defines a message to send to the package's recipients.
This parameter can be empty if there is no note.notePersistent
- set this to true
if you
want to send the note defined in noteText
to the performers of
all activities receiving this package. If you set it to false
,
the note is sent only to the performers of the activities that
immediately follow the start activity.componentIds
- an IDfList object that contains the object IDs of
the package's components.DfException
- if the server returns an error.void removePackage(java.lang.String activityName, java.lang.String portName, java.lang.String packagename) throws DfException
Packages represent the object on which the activity performs its work. This method removes a package from an activity in the workflow. For more information about removing packages, refer to Server Fundamentals.
The following code example demonstrates how to remove a package from a start activity:
// Create all activity and process objects first... IDfWorkflowBuilder wfBldrObj = sess.newWorkflowBuilder(procObj.getObjectId()); IDfId wfId1 = wfBldrObj.initWorkflow(); IDfId wfId2 = wfBldrObj.runWorkflow(); // 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... wfBldrObj.removePackage(actObjN.getObjectName(), actObjN.getPortName(0), sysObj.getObjectName());
activityName
- the name of the activity.portName
- the name of the port with which the package is associated.packagename
- the name of the package.DfException
- if the server returns an error.IDfId startWorkflow() throws DfException
A workflow is a runtime instance of a dm_process object. Process
objects store workflow definitions in the
repository. To start a
workflow, the process object must be in the installed state and
the user must have Relate and Execute permissions on
the process object. (Relate
permission is a base object-level permission and Execute is
an extended object-level permission.)
To determine whether the workflow can be started, use getStartStatus()
or isRunnable()
.
Starting a workflow generates a dm_workflow object. If this method
is successful, it returns the object ID of the workflow object.
THIS METHOD IS DEPRECATED -- use initWorkflow
and then
runWorkflow
instead.
DfException
- if the server returns an errorboolean isRunnable() throws DfException
Workflow definitions are stored in the repository as dm_process objects. To start a runtime instance of the workflow, its corresponding process object must be in the installed state.
For more information about process states, refer to Server Fundamentals.
true
if the process object is in the installed state;
false
if notDfException
- if the server returns an errorIDfProcess getProcess() throws DfException
Workflow definitions are stored in the repository as dm_process objects.
DfException
- if the server returns an errorIDfWorkflow getWorkflow() throws DfException
A workflow object represents a runtime instance of a dm_process object.
DfException
- if the server returns an errorIDfId initWorkflow() throws DfException
After initializing the workflow via this method, you should call
runWorkflow
to starting the workflow.
The following code example demonstrates how to initialize and start a workflow:
// Create all activity and process objects first... IDfWorkflowBuilder wfBldrObj = sess.newWorkflowBuilder(procObj.getObjectId()); IDfId wfId1 = wfBldrObj.initWorkflow(); IDfId wfId2 = wfBldrObj.runWorkflow();
DfException
- if the server returns an error.runWorkflow()
IDfId runWorkflow() throws DfException
A workflow is a runtime instance of a dm_process object. Process
objects store workflow definitions in the Documentum server.
To start a workflow, the process object must be in the installed state
and the user must have Relate and Execute permissions on
the process object.
To determine whether the workflow can be started, use getStartStatus()
or isRunnable()
.
This call should occur after a call to initWorkflow
which
saves the workflow object in the Documentum server.
The following code example demonstrates how to initialize and start a workflow:
// Create all activity and process objects first... IDfWorkflowBuilder wfBldrObj = sess.newWorkflowBuilder(procObj.getObjectId()); IDfId wfId1 = wfBldrObj.initWorkflow(); IDfId wfId2 = wfBldrObj.runWorkflow();
DfException
- if the server returns an error.initWorkflow()
IDfId getWorkflowAliasSetId() throws DfException
DfException
- if the server returns an errorCopyright 1994-2023 OpenText Corporation. All rights reserved.