filenet.vw.api

Class VWWorkflowCollectionDefinition

  • java.lang.Object
    • 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 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
    • Constructor Detail

      • VWWorkflowCollectionDefinition

        public VWWorkflowCollectionDefinition()
    • Method Detail

      • 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:
        VWWorkflowCollectionDefinition.COLLECTION_VALIDATION_KEY, VWValidationError, VWWorkflowDefinition.setValidateFlag(boolean), VWWorkflowDefinition.getValidateFlag()
      • validate

        public java.util.HashMap validate(VWSession theSession,
                                          VWSystemConfiguration theSystemConfig,
                                          java.lang.String sdfFileContents)
                                   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. 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.
        theSystemConfig - A VWSystemConfiguration object to be used for validation (instead of retrieving this information from the Process Engine server). This value can be null.
        sdfFileContents - A String containing the contents of a solution definition file (SDF). This file is created by IBM Case Manager Builder.
        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
        Since:
        PE 5.0.0.0
        See Also:
        VWWorkflowCollectionDefinition.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
      • replaceWorkflow

        public VWWorkflowDefinition replaceWorkflow(VWWorkflowDefinition theWorkflow)
                                             throws VWException
        Replaces a workflow in this collection. The given workflow definition will be added to the collection even if a workflow of the same name is not found.
        Parameters:
        theWorkflow - The workflow that will replace the existing workflow of the same name in this collection.
        Returns:
        A VWWorkflowDefinition object for the workflow removed.
        Throws:
        VWException - Thrown for various reasons.
        Since:
        PE 5.2.0.1
        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:
        VWWorkflowCollectionDefinition.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:
        VWWorkflowCollectionDefinition.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:
        VWWorkflowCollectionDefinition.read(InputStream)
      • 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:
        VWWorkflowCollectionDefinition.read(InputStream)
      • 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
        Deprecated. Use write() or writeToFile() methods.
        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.
      • 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
      • registerCollectionExtension

        public java.lang.Object registerCollectionExtension(int nExtensionType,
                                                            filenet.vw.api.IVWCollectionExtension collectionExtension)
        Register a collection extension
        Parameters:
        nExtensionType - The extension type. One of:
        collectionExtension - A class that implements IVWCollectionExtension.
        Returns:
        An object containing the "raw" information for the specified collection extension.
        Since:
        P8 4.5.0
      • getCollectionExtension

        public filenet.vw.api.IVWCollectionExtension getCollectionExtension(int nExtensionType)
        Get a registered collection extension
        Parameters:
        nExtensionType - The extension type. One of:
        Returns:
        A class that implements IVWCollectionExtension.
        Since:
        PE 5.2.0.2
      • getXpdlSourceVersion

        public java.lang.String getXpdlSourceVersion()
        Gets the XPDL version of the source document.
        Returns:
        A String containing the source XPDL version of the document.
        Since:
        PE 5.0.0.0
      • registerExternalWorkflowsFromCollection

        public void registerExternalWorkflowsFromCollection(VWWorkflowCollectionDefinition theWorkflowCollection)
                                                     throws VWException
        Adds the workflow definitions from the specified workflow collection to this workflow collection's list of external workflow definitions. Workflow definitions with duplicate names are not allowed and will be skipped. Used by validation.
        Parameters:
        theWorkflowCollection - A VWWorkflowCollectionDefinition object containing external workflow definitions.
        Throws:
        VWException - Thrown for various causes.
        Since:
        PE 5.0.0.2
        See Also:
        VWWorkflowCollectionDefinition.clearExternalWorkflows(), VWWorkflowDefinition

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