Process Class Relationships

filenet.vw.api
Class VWMapDefinition

java.lang.Object
  |
  +--filenet.vw.api.VWMapDefinition
All Implemented Interfaces:
java.io.Serializable

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

Use this class to access workflow steps and properties of the Workflow Map. A Workflow Map encapsulates the steps of 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
 VWMapNode changeStepType(int theStepId)
          Replaces a VWStepDefinition with a VWCompoundStepDefinition or replaces a VWCompoundStepDefinition with a VWStepDefinition.
 VWCompoundStepDefinition createCompoundStep(java.lang.String theStepName)
          Creates a compound step on the Workflow Map.
 VWStepDefinition createStep(java.lang.String theStepName)
          Creates a step on the Workflow Map.
 void deleteStep(int theStepId)
          Deletes a step from the Workflow Map, using an integer value for the step ID.
 int getContainingStepId(int theStepId)
          Gets the ID of the compound step which contains an instruction whose id is passed as a parameter to this method.
 java.lang.String getDescription()
          Gets the description of the Workflow Map.
 int getMapId()
          Retrieves the unique integer value of the workflow map ID, identifying a map within the containing workflow.
 java.lang.String getName()
          Gets the name of the Workflow Map.
 VWMapNode getStartStep()
          Gets the start step definition for the current map.
 VWMapNode getStep(int theStepId)
          Uses the integer value of a step ID on the current workflow map to get the associated step definition.
 VWMapNode[] getSteps()
          Gets the steps contained in the VWMapDefinition.
 VWMapNode[] pasteSteps(java.lang.String thePaste)
          Pastes steps into the workflow definition.
 void setDescription(java.lang.String theDescription)
          Sets the description for the Workflow Map.
 void setName(java.lang.String theName)
          Sets the name for the Workflow Map.
 java.lang.String toString()
          Gets the string version of the Workflow Map name.
 void toXML(java.lang.StringBuffer theBuffer)
          Appends an XML string that represents this VWMapDefinition object to the buffer specified by the input parameter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createStep

public VWStepDefinition createStep(java.lang.String theStepName)
                            throws VWException
Creates a step on the Workflow Map.
Parameters:
theStepName - The name of the step to create.
Returns:
A VWStepDefinition object.
Throws:
VWException - The method throws an exception if the string specified as the input theStepName parameter is invalid.
See Also:
VWStepDefinition

createCompoundStep

public VWCompoundStepDefinition createCompoundStep(java.lang.String theStepName)
                                            throws VWException
Creates a compound step on the Workflow Map.
Parameters:
theStepName - The name of the step to create.
Returns:
A VWCompoundStepDefinition object.
Throws:
VWException - Thrown if the string specified as the input theStepName parameter is invalid.
See Also:
VWCompoundStepDefinition

pasteSteps

public VWMapNode[] pasteSteps(java.lang.String thePaste)
                       throws VWException
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.
Throws:
VWException - Thrown if it cannot paste the XML-formatted step definition into the workflow definition.
See Also:
VWMapNode

deleteStep

public void deleteStep(int theStepId)
                throws VWException
Deletes a step from the Workflow Map, using an integer value for the step ID. Deleting a step results in deleting any route that has the step as a source or a destination.
Parameters:
theStepId - An integer value for the step ID to be deleted from the Workflow Map.
Throws:
VWException - The method throws an exception if no step with an ID matching the value input in the theStepId parameter exists.
See Also:
VWStepDefinition

getStep

public VWMapNode getStep(int theStepId)
                  throws VWException
Uses the integer value of a step ID on the current workflow map to get the associated step definition.
Parameters:
theStepId - An integer value containing the step ID for the definition.
Returns:
VWStepDefinition A VWStepDefinition object for the step specified in the input theStepId parameter.
Throws:
VWException - The method throws an exception if a VWStepDefinition object matching the step ID value input to the theStepId parameter does not exist.
See Also:
VWStepDefinition

getContainingStepId

public int getContainingStepId(int theStepId)
                        throws VWException
Gets the ID of the compound step which contains an instruction whose id is passed as a parameter to this method.

Parameters:
theStepId - An integer value containing a step ID.

Returns:
If theStepId parameter is the ID of an instruction in a compound step in this map, then this method returns the ID of the containing compound step.

If theStepId parameter is the ID of a VWStepDefinition or a VWCompoundStepDefinition in this map, then this method returns -1.

Throws:
VWException - The method throws an exception if theStepId parameter does not occur as the ID of a step or instruction in this map.

getStartStep

public VWMapNode getStartStep()
                       throws VWException
Gets the start step definition for the current map. The system automatically creates the start step of a map when the map is created. Uniquely, a start step cannot be deleted and cannot be a destination of any route. It is the first step to be executed when the map is executed. The main Workflow Map, identified by its ID of zero (0), has a first step that is uniquely named "LaunchStep".
Returns:
A VWMapNode object of any type for the start step of the current map. Calling the method on the "Workflow" map will return the "Launch" step. A Workflow Map other than the main map will return the first step in that map, which will not be the launch step for the workflow.
Throws:
VWException - Thrown if an error occurs while searching the Workflow Map for the start step; for instance, if no start step exists in the map.
See Also:
VWStepDefinition

getDescription

public java.lang.String getDescription()
Gets the description of the Workflow Map.
Returns:
The Workflow Map description.

setDescription

public void setDescription(java.lang.String theDescription)
Sets the description for the Workflow Map.
Parameters:
theDescription - The new description of the Workflow Map object.

getName

public java.lang.String getName()
Gets the name of the Workflow Map.
Returns:
The Workflow Map name.

setName

public void setName(java.lang.String theName)
             throws VWException
Sets the name for the Workflow Map.
Parameters:
theName - The new name for the Workflow Map.
Throws:
VWException - The method throws an exception if theName parameter is empty or null.

toString

public java.lang.String toString()
Gets the string version of the Workflow Map name.
Overrides:
toString in class java.lang.Object
Returns:
A string containing a representation of the Workflow Map name.

changeStepType

public VWMapNode changeStepType(int theStepId)
                         throws VWException
Replaces a VWStepDefinition with a VWCompoundStepDefinition or replaces a VWCompoundStepDefinition with a VWStepDefinition.

LIMITATION:

The type of the launch step cannot be changed. Information in the VWMapNode base class, like the step ID, location, and route information, will be retained.

WARNING:

Information specific to the step type, like instructions in a VWCompoundStepDefinition or parameters, participants, responses and queue name in a VWStepDefinition, will be lost.

Note that this method will create a new VWMapNode and the old VWMapNode will be deleted from the map.

PERFORMANCE SUGGESTION:

Any active references to the old VWMapNode should be cleared so that the object can be garbage-collected.

Parameters:
theStepId - an integer containing the stepId of the step to be converted
Returns:
the new VWMapNode object.
Throws:
VWException - Thrown if an error occurs; for example, if theStepId parameter is not a valid step ID.
See Also:
VWMapNode, VWStepDefinition, VWCompoundStepDefinition

getSteps

public VWMapNode[] getSteps()
                     throws VWException
Gets the steps contained in the VWMapDefinition.
Returns:
An array of all VWMapNode objects contained in this VWMapDefinition object. The returned array has the same number of elements as the number of steps in the Workflow Map; there are no empty elements in the array. If there are no steps defined in the Workflow Map, the method returns null.

getMapId

public int getMapId()
             throws VWException
Retrieves the unique integer value of the workflow map ID, identifying a 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.

Reserved map IDs and their associated System map names are shown below:

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 that is the value of the mapId for this map, or -1 to indicate that the map does not have a valid map ID. Map Ids are only valid in workflow definitions retrieved from the server.
Throws:
VWException - Thrown if this method cannot get the integer value of the work flow map ID.

toXML

public void toXML(java.lang.StringBuffer theBuffer)
           throws VWException
Appends an XML string that represents this VWMapDefinition object to the buffer specified by the input parameter.

Warning: This XML string is non-extensible, and cannot be modified in any way.

Parameters:
theBuffer - A string buffer that this method will append with XML content.
Throws:
VWException -  
See Also:
VWXMLUtil


Copyright © 2002, 2003 FileNet Corporation. All rights reserved.