filenet.vw.api

Class VWMapDefinition

  • java.lang.Object
    • filenet.vw.api.VWMapDefinition
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable


    public final class VWMapDefinition
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Cloneable
    Use this class to access workflow steps and properties of the workflow map. A workflow map encapsulates the steps represented in the graphical representation of a workflow and is similar to a Process Engine instruction sheet.
    Since:
    VWWS3.10
    See Also:
    VWStepDefinition, VWWorkflowDefinition, Serialized Form
    • Method Detail

      • createStep

        public VWStepDefinition createStep(java.lang.String theStepName)
                                    throws VWException
        Creates a step in this workflow map.
        Parameters:
        theStepName - A String containing the name of the step to create.
        Returns:
        A VWStepDefinition object specifying the step.
        Throws:
        VWException - Thrown if the string specified in theStepName parameter is invalid.
        See Also:
        VWStepDefinition
      • createCompoundStep

        public VWCompoundStepDefinition createCompoundStep(java.lang.String theStepName)
                                                    throws VWException
        Creates a compound step in this workflow map.
        Parameters:
        theStepName - A String containing the name of the step to create.
        Returns:
        A VWCompoundStepDefinition object specifying the compound step.
        Throws:
        VWException - Thrown if the string specified in theStepName parameter is invalid.
        See Also:
        VWCompoundStepDefinition
      • pasteSteps

        public VWMapNode[] pasteSteps(java.lang.String thePaste)
                               throws VWException
        Deprecated. use the IVWPastable paste(String) method instead. This method was deprecated because we can now paste VWTextAnnotations in addition to the VWMapNodes. This method may fail if it is used to paste an XML string that contains anything other than steps (i.e. classes that inherit from VWMapNode). Pastes steps into the workflow definition. The step definitions are contained in an XML-formatted string.
        Parameters:
        thePaste - An XML-formatted string containing the step definitions to be pasted into the map.
        Returns:
        an array of map nodes.
        Throws:
        VWException - Thrown if it cannot paste the XML-formatted step definition into the workflow definition.
        See Also:
        VWMapNode
      • paste

        public IVWPastable[] paste(java.lang.String thePaste)
                            throws VWException
        Pastes steps and text annotations into the workflow definition. The step definitions and text annotation definitions are contained in an XML-formatted string.
        Parameters:
        thePaste - An XML-formatted String containing the step definitions and text annotations to be pasted into the map.
        Returns:
        An array of IVWPastable objects representing the step and annotation definitions.
        Throws:
        VWException - Thrown if the XML-formatted step definition cannot be pasted into into the workflow definition.
        See Also:
        VWMapNode
      • deleteStep

        public void deleteStep(int theStepId)
                        throws VWException
        Deletes a step from the workflow map. Deleting a step results in deleting any route that has the step as a source or a destination.
        Parameters:
        theStepId - An integer identifying the ID of the step to be deleted from the workflow map.
        Throws:
        VWException - Thrown if a VWStepDefinition object having the specified ID cannot be found.
        See Also:
        VWStepDefinition
      • getStep

        public VWMapNode getStep(int theStepId)
                          throws VWException
        Gets the step definition identified by the specified ID. If a translation source exists, the authored step name is translated.

        Note: The translation is done only at run time, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

        Parameters:
        theStepId - An integer identifying the step ID for the definition.
        Returns:
        VWStepDefinition A VWStepDefinition object for the step specified in theStepId. If a translation source exists the translated step name is returned; otherwise, the authored step name is returned.
        Throws:
        VWException - Thrown if a VWStepDefinition object having the step ID specified cannot be found.
        See Also:
        VWStepDefinition
      • getContainingStepId

        public int getContainingStepId(int theStepId)
                                throws VWException
        Gets the ID of the compound step that contains the instruction referenced by the specified ID.
        Parameters:
        theStepId - An integer identifying the step ID of the contained instruction.
        Returns:
        An integer identifying the ID of the (containing) compound step, if theStepId is the ID of an instruction in a compound step in this map. If theStepId identifies a step or compound step that exists in this map, but does not contain the specified instruction, then -1 is returned.
        Throws:
        VWException - Thrown if the specified ID does not identify any step or instruction in this map.
      • getStartStep

        public VWMapNode getStartStep()
                               throws VWException
        Gets the start step definition for this map. The start step of a map is automatically created when the map is created. It is the first step to be executed when the map is executed. If a translation source exists, the authored name of the step is translated.

        Note: The translation is done only at run time, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

        The main workflow map, identified by its ID of zero (0), has a start step named "LaunchStep".

        Note: A start step cannot be deleted and cannot be a destination of any route.

        Returns:
        A VWMapNode object (of any type) specifying the start step of this map. Calling this method on the main workflow map returns the "LaunchStep" node. A workflow map other than the main map returns the first step in that map (which will not be the launch step for the workflow). If a translation source exists the translated step name is returned; otherwise, the authored step name is returned.
        Throws:
        VWException - Thrown if an error occurs while attempting to find the start step in this map (such as when no start step exists in the map).
        See Also:
        VWStepDefinition
      • getDescription

        public java.lang.String getDescription()
        Gets the description of this map. If a translation source exists, the authored description is translated.

        Note: The translation is done only at run time, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

        Returns:
        A String containing the translated description of this map, if a translation source exists; otherwise, the authored description is returned.
      • setDescription

        public void setDescription(java.lang.String theDescription)
        Sets the description for this map.
        Parameters:
        theDescription - A String containing the description of this map.
      • getAuthoredName

        public java.lang.String getAuthoredName()
        Gets the authored name of this map.
        Returns:
        A String containing the authored name of this map.
        Since:
        PE 4.5.1
      • getName

        public java.lang.String getName()
        Gets the name of this map. If a translation source exists, the authored name is translated.

        Note: The translation is done only at run time, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

        Returns:
        A String containing the translated name of this map, if a translation source exists; otherwise the authored name is returned.
      • setName

        public void setName(java.lang.String theName)
                     throws VWException
        Sets the name for this map.
        Parameters:
        theName - A String containing the name for this workflow map.
        Throws:
        VWException - Thrown the parameter is null or invalid.
      • toString

        public java.lang.String toString()
        Gets the String representation of this map name.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A String containing this map name.
      • changeStepType

        public VWMapNode changeStepType(int theStepId)
                                 throws VWException
        Replaces in this map either a step (VWStepDefinition) with a compound step (VWCompoundStepDefinition), or a compound step with a step.

        Warning: Information specific to the step type will be lost (such as instructions in the VWCompoundStepDefinition object; or parameters, participants, responses and queue name in the VWStepDefinition object).

        The following limitations apply:

        • The type of the launch step cannot be changed.
        • This method creates a new VWMapNode object in this map, deleting the pre-existing VWMapNode object. However, information contained in the VWMapNode base class (such as the step ID, location, and route information) will be retained.

        For optimal performance, any active references to the pre-existing VWMapNode object should be cleared so that the object can be garbage-collected.

        Parameters:
        theStepId - An integer containing the step ID of the step or compound step to be replaced.
        Returns:
        The new VWMapNode object created in this map.
        Throws:
        VWException - Thrown under these conditions:
        • The specified step ID identifies the launch step
        • The specified step ID is not valid.
        See Also:
        VWMapNode, VWStepDefinition, VWCompoundStepDefinition
      • getSteps

        public VWMapNode[] getSteps()
                             throws VWException
        Gets all of the steps contained in this map. If a translation source exists, the authored step name is translated.

        Note: The translation is done only at run time, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

        Returns:
        An array of VWMapNode objects representing all of the steps contained in this map. There are no empty elements in the array (has the same number of elements as the number of steps in the map). If a translation source exists the translated step names are returned; otherwise, the authored step names are returned. If no steps are defined in the map, null is returned.
        Throws:
        VWException - Thrown if an error occurs.
      • getTextAnnotations

        public VWTextAnnotationDefinition[] getTextAnnotations()
                                                        throws VWException
        Gets all of the annotations contained in this map.
        Returns:
        An array of VWTextAnnotationDefinition objects representing all of the annotations contained in this map. There are no empty elements in the array (has the same number of elements as the number of annotations in the map). If no annotations are defined in the map, null is returned.
        Throws:
        VWException - Thrown if an error occurs.
      • deleteTextAnnotation

        public void deleteTextAnnotation(int theAnnotationId)
                                  throws VWException
        Deletes an annotation from this map.
        Parameters:
        theAnnotationId - An integer specifying the ID of the annotation to delete.
        Throws:
        VWException - Thrown if the annotation ID is invalid.
      • getTextAnnotation

        public VWTextAnnotationDefinition getTextAnnotation(int theAnnotationId)
                                                     throws VWException
        Gets the annotation object in this map based on the specified ID.
        Parameters:
        theAnnotationId - An integer specifying the annotation ID.
        Returns:
        The VWTextAnnotationDefinition object referenced by the specified ID.
        Throws:
        VWException - Thrown if the specified ID is invalid.
        See Also:
        VWTextAnnotationDefinition
      • createTextAnnotation

        public VWTextAnnotationDefinition createTextAnnotation(java.lang.String theMessage)
                                                        throws VWException
        Creates a new annotation for this map.
        Parameters:
        theMessage - A String containing the message text for the annotation.
        Returns:
        The VWTextAnnotationDefinition object created.
        Throws:
        VWException
      • normalize

        public void normalize()
                       throws VWException
        Ensures that the start step (the step having an ID of zero) is the first step in this map. If the start step is not currently the first step, it switches positions with the existing first step.
        Throws:
        VWException - Thrown if an error occurs.
      • getMapId

        public int getMapId()
                     throws VWException
        Gets this map ID. This identifies this map within the containing workflow.

        Use map ID values in run time situations to associate server instruction sheets with the corresponding VWMapDefinition objects. Log queries are another common situation for map ID use.

        The reserved map IDs and their associated map names are as follows:

        Map Name Map ID
        Workflow -2
        Terminate -3
        Malfunction -4
        QueueAssertionViolation -5
        Recovery -6
        Tracker -7

        Other non-inherited maps are assigned IDs in order of creation, begining with 0 and incrementing by 1.

        Returns:
        An integer identifying the map Id for this map, or -1 if the map does not have a valid map ID. Map IDs are valid only in workflow definitions retrieved from the server.
        Throws:
        VWException - Thrown if this map ID is not found.

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