com.ibm.pim.workflow
Interface Workflow


public interface Workflow

Interface for the Workflow object. Provides methods to manipulate the internal MDMPIM Workflow object.

Since:
6.0.0

Field Summary
static java.lang.String copyright
           
 
Method Summary
 NestedWorkflowStep addNestedWorkflowStep(Workflow innerWorkflow)
          Add another workflow as a nested workflow step into this workflow.
 WorkflowStep addStep(java.lang.String workflowStepName, java.lang.String workflowStepDescription, WorkflowStep.Type workflowStepType)
          Add a workflow step to this workflow
 void delete()
          Delete this workflow
 AccessControlGroup getAccessControlGroup()
          Get the access control group of the workflow.
 java.util.Collection<CollaborationArea> getCollaborationAreas()
          Get a collection of Collaboration areas that use this workflow
 java.lang.String getDescription()
          Get the description of the Workflow.
 WorkflowStep getFailureStep()
          Get the Failure Step of this workflow.
 Fixit getFixit()
          Get Fixit for this Workflow
 java.util.Collection<Hierarchy> getHierarchiesForRecategorization()
          Get the current hierarchies in use when recategorization items/categories from within collaboration areas based on this workflow.
 WorkflowStep getInitialStep()
          Get the Initial Step of this workflow.
 java.lang.String getName()
          Get the name of the Workflow.
 WorkflowStep getStep(java.lang.String workflowStepName)
          Retrieve a workflow step from this workflow by name
 java.util.Collection<WorkflowStep> getSteps()
          Get all the steps in this workflow.
 WorkflowStep getSuccessStep()
          Get the Success Step of this workflow.
 boolean isCategoryWorkflow()
          Check if this is a category workflow.
 boolean isInUse()
          Report if the workflow is being used by any collaboration areas which are non-empty (if this is true, the workflow cannot be edited).
 boolean isItemWorkflow()
          Check if this is an item workflow.
 void save()
          Commit changes to the workflow design.
 void setAccessControlGroup(AccessControlGroup acg)
          Set the access control group for a workflow.
 void setDescription(java.lang.String description)
          Set the description of the workflow, overriding the current description.
 void setHierarchiesForRecategorization(java.util.Collection<Hierarchy> hierarchies)
          Set a collection of hierarchies to be used when recategorizing items/categories from within this workflow.
 void setName(java.lang.String name)
          Set the name of the workflow, overriding the current name.
 boolean validate()
          Validate the workflow graph to determine whether it can be saved.
 

Field Detail

copyright

static final java.lang.String copyright
See Also:
Constant Field Values
Method Detail

isInUse

boolean isInUse()
Report if the workflow is being used by any collaboration areas which are non-empty (if this is true, the workflow cannot be edited).

Returns:
true if the workflow is in use (i.e. one or more associated collaboration areas is non-empty)
Throws:
PIMInternalException - If an internal error occurs

save

void save()
Commit changes to the workflow design. If this is not done after a workflow modification or a modification to steps in that workflow, then the changes will be lost.

Throws:
PIMInternalException - If an internal error occurs, or if the workflow graph cannot be saved due to an invalid workflow graph, or if the workflow is in use and therefore cannot be modified
PIMAuthorizationException - If the user does not have the equivalent of Permission.WORKFLOW_EDIT

validate

boolean validate()
Validate the workflow graph to determine whether it can be saved. Note that save() will do this automatically, but this gives the user the opportunity to determine in advance whether an exception would be thrown from the save() method.

Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

getHierarchiesForRecategorization

java.util.Collection<Hierarchy> getHierarchiesForRecategorization()
Get the current hierarchies in use when recategorization items/categories from within collaboration areas based on this workflow.

Returns:
a Collection of Hierarchy objects.
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - Reserved for future use

setHierarchiesForRecategorization

void setHierarchiesForRecategorization(java.util.Collection<Hierarchy> hierarchies)
Set a collection of hierarchies to be used when recategorizing items/categories from within this workflow.

Parameters:
hierarchies - a Collection of hierarchies for use when recategorizing items/categories within this workflow
Throws:
PIMInternalException - If an internal error occurs,
java.lang.IllegalArgumentException - If null Collection is passed
PIMAuthorizationException - If the user does not have the equivalent of Permission.WORKFLOW_EDIT

getName

java.lang.String getName()
Get the name of the Workflow.

Returns:
the name of the workflow
Throws:
PIMInternalException - If an internal error occurs

getDescription

java.lang.String getDescription()
Get the description of the Workflow.

Returns:
the description of the workflow
Throws:
PIMInternalException - If an internal error occurs

setName

void setName(java.lang.String name)
Set the name of the workflow, overriding the current name.

Parameters:
name - the new name for the workflow
Throws:
PIMInternalException - If an internal error occurs, or if a workflow with this name already exists
java.lang.IllegalArgumentException - If null or empty String is passed
PIMAuthorizationException - If the user does not have the equivalent of Permission.WORKFLOW_EDIT

setDescription

void setDescription(java.lang.String description)
Set the description of the workflow, overriding the current description.

Parameters:
description - the new description for the workflow
Throws:
PIMInternalException - If an internal error occurs,
java.lang.IllegalArgumentException - If null Collection is passed
PIMAuthorizationException - If the user does not have the equivalent of Permission.WORKFLOW_EDIT

setAccessControlGroup

void setAccessControlGroup(AccessControlGroup acg)
Set the access control group for a workflow.

Parameters:
acg - the new access control group for the workflow
Throws:
PIMInternalException - If an internal error occurs,
java.lang.IllegalArgumentException - If null Collection is passed
PIMAuthorizationException - If the user does not have the equivalent of Permission.WORKFLOW_EDIT

getAccessControlGroup

AccessControlGroup getAccessControlGroup()
Get the access control group of the workflow.

Returns:
the access control group for the workflow
Throws:
PIMInternalException - If an internal error occurs

isCategoryWorkflow

boolean isCategoryWorkflow()
Check if this is a category workflow.

Returns:
true if this is a category workflow, else false
Throws:
PIMInternalException - If an internal error occurs

isItemWorkflow

boolean isItemWorkflow()
Check if this is an item workflow.

Returns:
true if this is an item workflow, else false
Throws:
PIMInternalException - If an internal error occurs

getSteps

java.util.Collection<WorkflowStep> getSteps()
Get all the steps in this workflow.

Returns:
a Collection of all the workflow steps currently used in the design of this workflow.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

getCollaborationAreas

java.util.Collection<CollaborationArea> getCollaborationAreas()
Get a collection of Collaboration areas that use this workflow

Returns:
a Collection of all collaboration areas that use this workflow.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

getInitialStep

WorkflowStep getInitialStep()
Get the Initial Step of this workflow.

Returns:
the initial step of the workflow
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

getSuccessStep

WorkflowStep getSuccessStep()
Get the Success Step of this workflow.

Returns:
the success step of the workflow
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

getFailureStep

WorkflowStep getFailureStep()
Get the Failure Step of this workflow.

Returns:
the failure step of the workflow
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

getFixit

Fixit getFixit()
Get Fixit for this Workflow

Returns:
a reference to Fixit for this workflow
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

addStep

WorkflowStep addStep(java.lang.String workflowStepName,
                     java.lang.String workflowStepDescription,
                     WorkflowStep.Type workflowStepType)
Add a workflow step to this workflow

Parameters:
workflowStepName - the name for the new workflow step
workflowStepDescription - the description for the new workflow step
workflowStepType - the type for the new workflow step.
Returns:
a new WorkflowStep for this workflow, of the specified type. This must be added into the workflow graph (e.g. via WorkflowStep.setNextStep() method) before the workflow can be saved .
Throws:
PIMInternalException - If an internal error occurs, or if a step with the specified name already exists, or if the specified type cannot be created (e.g. because you cannot have two Initial steps)
java.lang.IllegalArgumentException - If null or empty String/WorkflowStep.Type is passed
PIMAuthorizationException - If the user does not have the equivalent of Permission.WORKFLOW_EDIT

addNestedWorkflowStep

NestedWorkflowStep addNestedWorkflowStep(Workflow innerWorkflow)
Add another workflow as a nested workflow step into this workflow.

Parameters:
innerWorkflow - the workflow to be used for the nested workflow step
Returns:
a new NestedWorkflowStep for this workflow, using the specified workflow as the inner workflow.
Throws:
PIMInternalException - If an internal error occurs, or if the Workflow cannot be used as an inner workflow (for example, because it is the same Workflow to be added to, which would create an infinite loop)
java.lang.IllegalArgumentException - If null Workflow is passed
PIMAuthorizationException - If the user does not have the equivalent of Permission.WORKFLOW_EDIT

delete

void delete()
Delete this workflow

Throws:
PIMInternalException - If an internal error occurs, or if the workflow is in use and therefore cannot be modified
PIMAuthorizationException - If the user does not have the equivalent of Permission.WORKFLOW_DELETE

getStep

WorkflowStep getStep(java.lang.String workflowStepName)
Retrieve a workflow step from this workflow by name

Parameters:
workflowStepName - the name of the step to be retrieved
Returns:
the workflow step with the specified name
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - If null or empty String is passed