Process Class Relationships

filenet.vw.api
Class VWValidationError

java.lang.Object
  |
  +--filenet.vw.api.VWValidationError

public final class VWValidationError
extends java.lang.Object

Use this class to access information about errors encountered during the workflow definition validation process.

Since:
VWWS3.10

Field Summary
static int VALIDATION_LEVEL_ERROR
          Integer value of 1. A VWValidationError level value which indicates that a validation error WILL either cause transfer to fail or cause a problem at run-time.
static int VALIDATION_LEVEL_WARNING
          Integer value of 2. A VWValidationError level value which indicates that a validation error MAY either cause transfer to fail or cause a problem at run-time.
static int VALIDATION_TYPE_FIELD
          Integer value 4. Specifies that the validation item is a field.
static int VALIDATION_TYPE_INSTRUCTION
          Integer value 7. Specifies that the validation item is a instruction.
static int VALIDATION_TYPE_MILESTONE
          Integer value 8. Specifies that the validation item is a milestone.
static int VALIDATION_TYPE_PARAMETER
          Integer value 3. Specifies that the validation item is a parameter.
static int VALIDATION_TYPE_ROUTE
          Integer value 2. Specifies that the validation item is a route.
static int VALIDATION_TYPE_STEP
          Integer value of 1. Specifies that the validation item is a step.
static int VALIDATION_TYPE_WORKFLOW
          Integer value 6. Specifies that the validation item is a workflow.
 
Method Summary
 int getErrorType()
          Retrieves the value in the errorType property of this validation error.
 int getId()
          Deprecated. Replaced by getStepId(), VWMapDefinition.getMapId(), and getSubStepId() in combination. For compatibility, this method returns a Step ID, but the use of sub-maps in the workflow definition means that a Step ID alone is no longer sufficient to locate the object causing a validation error.

Note An error in a simple step requires the Step ID and the Map ID; an error in a compound step instruction requires a Map ID, a Step ID, and a sub-step ID.

 java.lang.String getInfo()
          Retrieves detailed information regarding the validation error, such as the name of a field or a parameter.
 int getLevel()
          Gets the value of the level property of the current validation error.
 java.lang.String getMapName()
          Gets the value in the map name property of this validation error.
 java.lang.String getMessage()
          Retrieves the value in the message property of this validation error.
 java.lang.String getName()
          Gets the name of the object that contains the error.
 int getStepId()
          Gets an integer value that is the step Id property of the current validation error.
 int getSubStepId()
          Gets an integer value that is the Id property of the object that caused the current validation error, within the current step.
 java.lang.String toString()
          Gets a string that represents this validation object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VALIDATION_TYPE_STEP

public static final int VALIDATION_TYPE_STEP
Integer value of 1. Specifies that the validation item is a step.

VALIDATION_TYPE_ROUTE

public static final int VALIDATION_TYPE_ROUTE
Integer value 2. Specifies that the validation item is a route.

VALIDATION_TYPE_PARAMETER

public static final int VALIDATION_TYPE_PARAMETER
Integer value 3. Specifies that the validation item is a parameter.

VALIDATION_TYPE_FIELD

public static final int VALIDATION_TYPE_FIELD
Integer value 4. Specifies that the validation item is a field.

VALIDATION_TYPE_WORKFLOW

public static final int VALIDATION_TYPE_WORKFLOW
Integer value 6. Specifies that the validation item is a workflow.

VALIDATION_TYPE_INSTRUCTION

public static final int VALIDATION_TYPE_INSTRUCTION
Integer value 7. Specifies that the validation item is a instruction.

VALIDATION_TYPE_MILESTONE

public static final int VALIDATION_TYPE_MILESTONE
Integer value 8. Specifies that the validation item is a milestone.

VALIDATION_LEVEL_ERROR

public static final int VALIDATION_LEVEL_ERROR
Integer value of 1. A VWValidationError level value which indicates that a validation error WILL either cause transfer to fail or cause a problem at run-time.

VALIDATION_LEVEL_WARNING

public static final int VALIDATION_LEVEL_WARNING
Integer value of 2. A VWValidationError level value which indicates that a validation error MAY either cause transfer to fail or cause a problem at run-time. Warnings will usually be issued in situations where the validation algorithm doesn't have enough information to decide that a potential problem will cause an error. For example, if a call is made to a map which does not exist in this workflow, that will cause a warning rather than an error, because it may be that the map is defined (as an instruction sheet) on the server side in a base WorkClass. This transfer would succeed.
Method Detail

getName

public java.lang.String getName()
Gets the name of the object that contains the error.
Returns:
The name of the object in which the system found an error.

getInfo

public java.lang.String getInfo()
Retrieves detailed information regarding the validation error, such as the name of a field or a parameter.
Returns:
The detailed error information. If no error exist, the method returns null.

getMessage

public java.lang.String getMessage()
Retrieves the value in the message property of this validation error.
Returns:
The value in the message property of this validation error.

getErrorType

public int getErrorType()
Retrieves the value in the errorType property of this validation error.
Returns:
An integer value that represents the contents of the errorType property of this validation error.

getLevel

public int getLevel()
Gets the value of the level property of the current validation error.
Returns:
Integer value that is the level property of this validation error, either VALIDATION_LEVEL_ERROR or VALIDATION_LEVEL_WARNING.
See Also:
VALIDATION_LEVEL_ERROR, VALIDATION_LEVEL_WARNING

getId

public int getId()
Deprecated. Replaced by getStepId(), VWMapDefinition.getMapId(), and getSubStepId() in combination. For compatibility, this method returns a Step ID, but the use of sub-maps in the workflow definition means that a Step ID alone is no longer sufficient to locate the object causing a validation error.

Note An error in a simple step requires the Step ID and the Map ID; an error in a compound step instruction requires a Map ID, a Step ID, and a sub-step ID.

Gets the value in the Id property of this validation error.
Returns:
An integer value that represents the contents of the Id property of this validation error.
See Also:
getStepId(), VWMapDefinition.getMapId(), getSubStepId()

getMapName

public java.lang.String getMapName()
Gets the value in the map name property of this validation error. The map name can be used to get the map that has the error.
Returns:
Value in the map name property of this validation error, will return null if the error type is VALIDATION_TYPE_FIELD. A valid map name will be returned if the error type is one of the following: VALIDATION_TYPE_MAP, VALIDATION_TYPE_STEP, VALIDATION_TYPE_INSTRUCTION, VALIDATION_TYPE_PARAMETER or VALIDATION_TYPE_ROUTE.
See Also:
VWWorkflowDefinition, getStepId(), getSubStepId()

getStepId

public int getStepId()
Gets an integer value that is the step Id property of the current validation error. The Map ID will be required in order to locate the invalid step.
Returns:
An integer value that is the step Id property of this validation error. The error type values that can be returned are as follows:

  •  1: VALIDATION_TYPE_STEP
  •  2: VALIDATION_TYPE_ROUTE.
  •  3: VALIDATION_TYPE_PARAMETER
  •  7: VALIDATION_TYPE_INSTRUCTION
  • -1: Other (undefined)
See Also:
VWMapDefinition.getMapId(), getSubStepId()

getSubStepId

public int getSubStepId()
Gets an integer value that is the Id property of the object that caused the current validation error, within the current step. Locating the invalid object (a VWInstructionDefinition or a VWRouteDefinition) requires the Step ID and the Map ID. These IDs are accessed with VWValidationError.getStepID and VWMapDefinition.getMapId.
Returns:
The Id property of the object that caused the current validation error, for routes and instruction definitions; -1 otherwise. The values returned are as follows:

  •  2: VALIDATION_TYPE_ROUTE
  •  7: VALIDATION_TYPE_INSTRUCTION
  • -1: Undefined (The error type is not VALIDATION_TYPE_INSTRUCTION or VALIDATION_TYPE_ROUTE.)
See Also:
getStepId(), VWMapDefinition.getMapId()

toString

public java.lang.String toString()
Gets a string that represents this validation object.
Overrides:
toString in class java.lang.Object
Returns:
A string containing a text representation of the validation error message. The string is formatted as follows:

<error type>:<object name>:<additional information>:<map ID>:<step ID>:<instruction ID>:<error message>


Process Class Relationships

Copyright © 2002 FileNET Corporation. All rights reserved.