Process API

filenet.vw.api
Class VWWorkflowCollectionDefinition

java.lang.Object
  extended by filenet.vw.api.VWWorkflowCollectionDefinition
All Implemented Interfaces:
java.io.Serializable

public final class VWWorkflowCollectionDefinition
extends java.lang.Object
implements java.io.Serializable

Represents zero or more workflow definitions.

Since:
P8 4.0
See Also:
VWWorkflowDefinition, Serialized Form

Field Summary
static int COLLECTION_EXTENSION_SCENARIO_COLLECTION
          Indicates that the extension object is a scenario collection.
static java.lang.String COLLECTION_VALIDATION_KEY
          The key for the collection validation errors in the HashMap object returned by the validate method.
static int WORKFLOW_COLLECTION_SOURCE_NEW
          Indicates there is no source of the workflow collection (it is new).
static int WORKFLOW_COLLECTION_SOURCE_PEP
          Indicates a PEP file is the source of the workflow collection.
static int WORKFLOW_COLLECTION_SOURCE_XPDL
          Indicates an XPDL file is the source of the workflow collection.
 
Constructor Summary
VWWorkflowCollectionDefinition()
           
 
Method Summary
static java.lang.String _get_FILE_AUTHOR()
          For FileNet internal use only, do not call.
static java.lang.String _get_FILE_DATE()
          For FileNet internal use only, do not call.
static java.lang.String _get_FILE_REVISION()
          For FileNet internal use only, do not call.
 void addWorkflow(VWWorkflowDefinition theWorkflow)
          Adds a workflow to this collection.
 java.lang.String asXPDLString()
          Retrieves an XPDL formatted representation of this instance.
 void export(java.io.OutputStream theStream, VWSession session)
          Writes this instance in a self-contained form to a specified output stream.
 void exportToFile(java.lang.String theFileName, VWSession session)
          Writes this instance in a self-contained form to a specified file.
 java.lang.String getApplicationSpaceName()
          Get the application name
 java.lang.String getAuthorTool()
          Identifies the application that generated this instance.
 java.lang.String getDescription()
          Returns a description of this collection.
 VWWorkflowDefinition getMainWorkflow()
          Gets a reference to the main workflow in this instance.
 java.lang.String getName()
          Gets the name of this instance.
 int getSource()
          Identifies the source of this collection.
 VWWorkflowDefinition getWorkflow(java.lang.String theName)
          Retrieves a workflow definition from this collection, based on the specified name.
 int getWorkflowIndex(java.lang.String theName)
          Returns the index into the array of workflow definitions in this collection for specified workflow.
 VWWorkflowDefinition[] getWorkflows()
          Gets the set of workflows associated with this collection.
 boolean isExistingWorkflowName(java.lang.String theName)
          Check to see whether a workflow definition having the specified name exists in this collection.
static VWWorkflowCollectionDefinition read(java.io.InputStream theStream)
          Evaluates and creates a workflow collection based on the values read from a specified input stream.
static VWWorkflowCollectionDefinition readFromFile(java.lang.String theFileName)
          Evaluates and creates a workflow collection based on the values read from a specified file.
 java.lang.Object registerCollectionExtension(int nExtensionType, filenet.vw.api.IVWCollectionExtension collectionExtension)
          Register a collection extension
 VWWorkflowDefinition removeWorkflow(java.lang.String theWorkflowName)
          Removes the specified workflow from this collection.
 void setApplicationSpaceName(java.lang.String newApplicationSpaceName)
          Set the application space name
 void setAuthorTool(java.lang.String theAuthorTool)
          Specifies the identifier for the application that generated this instance.
 void setDescription(java.lang.String theDescription)
          Specifies a description for this collection.
 void setMainWorkflowByName(java.lang.String theName)
          Specifies the the main workflow in this collection.
 void setName(java.lang.String theName)
          Changes the name of this instance.
 void toXPDL(java.lang.StringBuffer theBuffer)
          Appends an XPDL string representing this instance to the buffer specified.
 java.util.HashMap validate(VWSession theSession, boolean fixupSteps)
          Validates this instance.
 void write(java.io.OutputStream theStream)
          Writes this instance to a specified output stream.
 void writeToFile(java.lang.String theFileName)
          Writes this instance to a specified file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WORKFLOW_COLLECTION_SOURCE_NEW

public static final int WORKFLOW_COLLECTION_SOURCE_NEW
Indicates there is no source of the workflow collection (it is new).

See Also:
Constant Field Values

WORKFLOW_COLLECTION_SOURCE_PEP

public static final int WORKFLOW_COLLECTION_SOURCE_PEP
Indicates a PEP file is the source of the workflow collection.

See Also:
Constant Field Values

WORKFLOW_COLLECTION_SOURCE_XPDL

public static final int WORKFLOW_COLLECTION_SOURCE_XPDL
Indicates an XPDL file is the source of the workflow collection.

See Also:
Constant Field Values

COLLECTION_VALIDATION_KEY

public static final java.lang.String COLLECTION_VALIDATION_KEY
The key for the collection validation errors in the HashMap object returned by the validate method.

See Also:
Constant Field Values

COLLECTION_EXTENSION_SCENARIO_COLLECTION

public static final int COLLECTION_EXTENSION_SCENARIO_COLLECTION
Indicates that the extension object is a scenario collection.

See Also:
registerCollectionExtension(int, IVWCollectionExtension), Constant Field Values
Constructor Detail

VWWorkflowCollectionDefinition

public VWWorkflowCollectionDefinition()
Method Detail

_get_FILE_DATE

public static java.lang.String _get_FILE_DATE()
For FileNet internal use only, do not call.

Returns:
the file date
Since:
P8 4.0

_get_FILE_AUTHOR

public static java.lang.String _get_FILE_AUTHOR()
For FileNet internal use only, do not call.

Returns:
the file author
Since:
P8 4.0

_get_FILE_REVISION

public static java.lang.String _get_FILE_REVISION()
For FileNet internal use only, do not call.

Returns:
the file revision
Since:
P8 4.0

validate

public java.util.HashMap validate(VWSession theSession,
                                  boolean fixupSteps)
                           throws VWException
Validates this instance. Only those workflows in the collection that have their validate flag set will be validated (see VWWorkflowDefinition.setValidateFlag).

Parameters:
theSession - The current VWSession object if logged on. This is needed for various parts of the validation process. This can be null; however, areas of validation requiring a logon will not be validated.
fixupSteps - A boolean value of true to indicate that the step ID values for joins (steps that are AND'd) are to be filled in. Specify false if you do not want the step IDs to be filled in for the join, or to indicate that the caller has already specified the join step IDs.
Returns:
A HashMap object, where the keys are COLLECTION_VALIDATION_KEY (for the validation errors), and the names of the workflows in this collection.

The values associated with the keys in the HashMap are arrays of VWValidationError objects that describe the validation errors encountered if the corresponding workflow is invalid. If the workflow definition is found to be valid, the object associated with the key will be a zero length array (VWValidationError[0]). If the corresponding workflow has the validate flag set to false, the workflow will not be validated and the object in the HashMap corresponding to the name of that workflow will be null.

Throws:
VWException
See Also:
COLLECTION_VALIDATION_KEY, VWValidationError, VWWorkflowDefinition.setValidateFlag(boolean), VWWorkflowDefinition.getValidateFlag()

addWorkflow

public void addWorkflow(VWWorkflowDefinition theWorkflow)
                 throws VWException
Adds a workflow to this collection.

Parameters:
theWorkflow - A VWWorkflowDefinition object for the workflow to be added into this collection.
Throws:
VWException - Thrown if a workflow with the same name as the workflow being added already exists in this workflow collection.
See Also:
VWWorkflowDefinition

removeWorkflow

public VWWorkflowDefinition removeWorkflow(java.lang.String theWorkflowName)
                                    throws VWException
Removes the specified workflow from this collection.

Parameters:
theWorkflowName - A String containing the name of the workflow to be deleted.
Returns:
A VWWorkflowDefinition object for the workflow removed.
Throws:
VWException - Thrown if the specified workflow name is null or invalid.
See Also:
VWWorkflowDefinition

getName

public java.lang.String getName()
Gets the name of this instance.

Returns:
A String containing the name of this workflow collection, or null if unassigned.

setName

public void setName(java.lang.String theName)
             throws VWException
Changes the name of this instance.

Parameters:
theName - A String containing the name of this workflow collection, or null.
Throws:
VWException - Thrown if an error occurs.

getAuthorTool

public java.lang.String getAuthorTool()
Identifies the application that generated this instance.

Returns:
authorTool A String identifying the application that generated this workflow collection, or null if unassigned.

setAuthorTool

public void setAuthorTool(java.lang.String theAuthorTool)
                   throws VWException
Specifies the identifier for the application that generated this instance.

Parameters:
theAuthorTool - A String identifying the application that generated this workflow collection. This can be null if you do not want to identify this application.
Throws:
VWException

getDescription

public java.lang.String getDescription()
Returns a description of this collection.

Returns:
A String containing a description of this workflow collection, or null if unassigned.

setDescription

public void setDescription(java.lang.String theDescription)
Specifies a description for this collection.

Parameters:
theDescription - A String containing the description for this workflow collection. This can be null if you do not want to supply a description.

getWorkflow

public VWWorkflowDefinition getWorkflow(java.lang.String theName)
                                 throws VWException
Retrieves a workflow definition from this collection, based on the specified name.

Parameters:
theName - A String containing the name of the workflow to retrieve from this instance.
Returns:
A VWWorkflowDefinition object representing the specified workflow.
Throws:
VWException - Thrown if the specified workflow cannot be found in this collection.
See Also:
VWWorkflowDefinition

getWorkflows

public VWWorkflowDefinition[] getWorkflows()
                                    throws VWException
Gets the set of workflows associated with this collection.

Returns:
An array of VWWorkflowDefinition objects representing all of the workflows in this collection.
Throws:
VWException - Thrown if an error occurs while attempting to retrieve the workflow objects in this collection.
See Also:
VWWorkflowDefinition

getWorkflowIndex

public int getWorkflowIndex(java.lang.String theName)
                     throws VWException
Returns the index into the array of workflow definitions in this collection for specified workflow.

Parameters:
theName - A String containing the name of the workflow in this collection.
Returns:
The index into the array of workflows in this collection for the specified workflow.
Throws:
VWException - Thrown if the specified workflow cannot be found in this collection.
See Also:
VWWorkflowDefinition

read

public static VWWorkflowCollectionDefinition read(java.io.InputStream theStream)
                                           throws VWException
Evaluates and creates a workflow collection based on the values read from a specified input stream.

Parameters:
theStream - An InputStream object from which to read the VWWorkflowCollectionDefinition object definition.
Returns:
A VWWorkflowCollectionDefinition object representing an instance of the data read from the specified stream.
Throws:
VWException - Thrown if a workflow collection cannot be evaluated from the input stream specified.
See Also:
write(java.io.OutputStream)

readFromFile

public static VWWorkflowCollectionDefinition readFromFile(java.lang.String theFileName)
                                                   throws VWException
Evaluates and creates a workflow collection based on the values read from a specified file.

Parameters:
theFileName - A String containing the name of the file from which to read the VWWorkflowCollectionDefinition object definition.
Returns:
A VWWorkflowCollectionDefinition object representing an instance of the data read from the specified file.
Throws:
VWException - Thrown if a workflow collection cannot be evaluated from the file specified.
See Also:
writeToFile(java.lang.String)

write

public void write(java.io.OutputStream theStream)
           throws VWException
Writes this instance to a specified output stream.

Parameters:
theStream - An OutputStream object to which to write this collection.
Throws:
VWException - Thrown if this instance cannot be written to the OutputStream specified.
See Also:
read(InputStream)

writeToFile

public void writeToFile(java.lang.String theFileName)
                 throws VWException
Writes this instance to a specified file.

Parameters:
theFileName - A String containing the name of the file to which to write this collection.
Throws:
VWException - Thrown if this instance cannot be written to the file specified.
See Also:
readFromFile(java.lang.String), write(java.io.OutputStream)

export

public void export(java.io.OutputStream theStream,
                   VWSession session)
            throws VWException
Writes this instance in a self-contained form to a specified output stream. All workflows in this collection are flattened and all workflows specified in create instructions are added to the collection.

Parameters:
theStream - An OutputStream object to which to write this collection.
session - A VWSession object
Throws:
VWException - Thrown if this instance cannot be written to the output stream specified.
See Also:
read(InputStream)

exportToFile

public void exportToFile(java.lang.String theFileName,
                         VWSession session)
                  throws VWException
Writes this instance in a self-contained form to a specified file. All workflows in this collection are flattened and all workflows specified in create instructions are added to the collection.

Parameters:
theFileName - A String containing the name of the file to which to write this collection.
session - A VWSession object
Throws:
VWException - Thrown if this instance cannot be written to the file specified.
See Also:
readFromFile(java.lang.String), write(java.io.OutputStream)

asXPDLString

public java.lang.String asXPDLString()
                              throws VWException
Retrieves an XPDL formatted representation of this instance.

Returns:
A String containing a well-formed XPDL representation of this collection.
Throws:
VWException - Thrown if an XPDL-formatted representation of this collection cannot be retrieved.
See Also:
VWWorkflowCollectionDefinition.write

toXPDL

public void toXPDL(java.lang.StringBuffer theBuffer)
            throws VWException
Appends an XPDL string representing this instance to the buffer specified.

Warning: This XPDL string is nonextensible, and cannot be modified in any way.

Parameters:
theBuffer - A StringBuffer that will be appended with the XPDL content.
Throws:
VWException - Thrown if the specified buffer is null.
See Also:
VWXMLUtil

isExistingWorkflowName

public boolean isExistingWorkflowName(java.lang.String theName)
                               throws VWException
Check to see whether a workflow definition having the specified name exists in this collection.

Parameters:
theName - Name of the workflow being checked for.
Returns:
true if a workflow definition having the specified name exists in this collection.
Throws:
VWException - Thrown when a low-level array access error occurs.
Since:
P8 4.0.1
See Also:
VWWorkflowDefinition

getMainWorkflow

public VWWorkflowDefinition getMainWorkflow()
Gets a reference to the main workflow in this instance.

Returns:
A VWWorkflowDefinition object for the main workflow in this collection. If the main workflow is not yet specified, this object references the initial workflow in the sequence.

setMainWorkflowByName

public void setMainWorkflowByName(java.lang.String theName)
                           throws VWException
Specifies the the main workflow in this collection.

Parameters:
theName - A String containing the name of the workflow to assign as the main workflow in this collection. The specified workflow must exist in this collection.
Throws:
VWException - Thrown if a the specified workflow does not exist in this collection.

getApplicationSpaceName

public java.lang.String getApplicationSpaceName()
Get the application name

Returns:
the application space name. The value is null by default.
Since:
P8 4.5.0

setApplicationSpaceName

public void setApplicationSpaceName(java.lang.String newApplicationSpaceName)
Set the application space name

Parameters:
newApplicationSpaceName - the new application space name
Since:
P8 4.5.0

getSource

public int getSource()
Identifies the source of this collection. The source can be from an XPDL file, a PEP file, or no file (a new collection).

Returns:
An integer corresponding to one of the following:

registerCollectionExtension

public java.lang.Object registerCollectionExtension(int nExtensionType,
                                                    filenet.vw.api.IVWCollectionExtension collectionExtension)
Register a collection extension

Parameters:
nExtensionType - the extension type
collectionExtension - a class that implements IVWCollectionExtension
Returns:
the collection extension information
Since:
P8 4.5.0

Process API

© Copyright IBM Corporation 2002, 2008. All rights reserved.