Process API

filenet.vw.api
Class VWMapDefinition

java.lang.Object
  extended by 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 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.
 VWMapNode changeStepType(int theStepId)
          Replaces in this map either a step (VWStepDefinition) with a compound step (VWCompoundStepDefinition), or a compound step with a step.
 VWCompoundStepDefinition createCompoundStep(java.lang.String theStepName)
          Creates a compound step in this workflow map.
 VWStepDefinition createStep(java.lang.String theStepName)
          Creates a step in this workflow map.
 VWTextAnnotationDefinition createTextAnnotation(java.lang.String theMessage)
          Creates a new annotation for this map.
 void deleteStep(int theStepId)
          Deletes a step from the workflow map.
 void deleteTextAnnotation(int theAnnotationId)
          Deletes an annotation from this map.
 int getContainingStepId(int theStepId)
          Gets the ID of the compound step that contains the instruction referenced by the specified ID.
 java.lang.String getDescription()
          Gets the description of this map.
 int getMapId()
          Gets this map ID.
 java.lang.String getName()
          Gets the name of this map.
 VWMapNode getStartStep()
          Gets the start step definition for this map.
 VWMapNode getStep(int theStepId)
          Gets the step definition identified by the specified ID.
 VWMapNode[] getSteps()
          Gets all of the steps contained in this map.
 VWTextAnnotationDefinition getTextAnnotation(int theAnnotationId)
          Gets the annotation object in this map based on the specified ID.
 VWTextAnnotationDefinition[] getTextAnnotations()
          Gets all of the annotations contained in this map.
 void normalize()
          Ensures that the start step (the step having an ID of zero) is the first step in this map.
 IVWPastable[] paste(java.lang.String thePaste)
          Pastes steps and text annotations into the workflow definition.
 VWMapNode[] pasteSteps(java.lang.String thePaste)
          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.
 void setDescription(java.lang.String theDescription)
          Sets the description for this map.
 void setName(java.lang.String theName)
          Sets the name for this map.
 java.lang.String toString()
          Gets the String representation of this map name.
 void toXML(java.lang.StringBuffer theBuffer)
          Appends an XML string representing this instance to the buffer specified.
 void toXPDL(java.lang.String indentA, java.lang.StringBuffer theBuffer)
          Appends an XPDL string representing this instance to the buffer specified.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

_get_FILE_AUTHOR

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

Returns:
the file author

_get_FILE_REVISION

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

Returns:
the file revision

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 runtime, 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 runtime, 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 runtime, 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.

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 runtime, 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:

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 runtime, 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 runtime 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.

toXML

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

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

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

toXPDL

public void toXPDL(java.lang.String indentA,
                   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:
indentA - A String specifying the initial indentation for this XPDL section.
theBuffer - A StringBuffer that will be appended with the XPDL content.
Throws:
VWException - Thrown if the specified buffer is null.
See Also:
VWXMLUtil

Process API

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