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
          Value of 1. A VWValidationError level value that indicates that a validation error WILL either cause transfer to fail or cause a problem at run-time.
static int VALIDATION_LEVEL_WARNING
          Value of 2. A VWValidationError level value that 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_RULESET
          Integer value 9. Specifies that the validation item is a ruleset.
static int VALIDATION_TYPE_STEP
          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 VWValidationError object.
 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 VWValidationError instance.
 
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
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_TYPE_RULESET

public static final int VALIDATION_TYPE_RULESET
Integer value 9. Specifies that the validation item is a ruleset.

VALIDATION_LEVEL_ERROR

public static final int VALIDATION_LEVEL_ERROR
Value of 1. A VWValidationError level value that 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
Value of 2. A VWValidationError level value that 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, a call made to a map that does not exist in this workflow 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 exists, 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 VWValidationError object. The map name can be used to get the map that has the error.
Returns:
Value in the map name property of this validation VWValidationError object, or 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:


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 substep object (a VWInstructionDefinition or a VWRouteDefinition) requires the Step ID and the Map ID. You can access these IDs with VWValidationError.getStepID() and VWMapDefinition.getMapId().
Returns:
The ID property of the substep object that caused the current validation error; -1 otherwise. The returned values are as follows:

  •  2: VALIDATION_TYPE_ROUTE
  •  7: VALIDATION_TYPE_INSTRUCTION
  • -1: Undefined

See Also:
getStepId(), VWMapDefinition.getMapId()

toString

public java.lang.String toString()
Gets a string that represents this VWValidationError instance.
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>



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