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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      int getErrorType()
      Retrieves the value in the errorType property of this validation error.
      int getId()
      Deprecated. 
      Replaced by VWValidationError.getStepId(), VWMapDefinition.getMapId(), and VWValidationError.getSubStepId() in combination. Gets the value in the ID property of this validation error.
      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.
      static java.lang.String getLocalizedValidationLevelString(int theValidationLevel)
      Retrieves the localized string corresponding to the specified validation level.
      static java.lang.String getLocalizedValidationTypeString(int theValidationType)
      Retrieves the localized string corresponding to the specified validation type.
      java.lang.String getMapName()
      Gets the value in the map name property of this instance.
      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 representing the step ID property of the current validation error.
      int getSubStepId()
      Gets an integer representing the ID property of the object that caused the current validation error within the current step.
      java.lang.String toString()
      Returns a String representing this 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.
        See Also:
        Constant Field Values
      • VALIDATION_TYPE_ROUTE

        public static final int VALIDATION_TYPE_ROUTE
        Integer value 2. Specifies that the validation item is a route.
        See Also:
        Constant Field Values
      • VALIDATION_TYPE_PARAMETER

        public static final int VALIDATION_TYPE_PARAMETER
        Integer value 3. Specifies that the validation item is a parameter.
        See Also:
        Constant Field Values
      • VALIDATION_TYPE_FIELD

        public static final int VALIDATION_TYPE_FIELD
        Integer value 4. Specifies that the validation item is a field.
        See Also:
        Constant Field Values
      • VALIDATION_TYPE_WORKFLOW

        public static final int VALIDATION_TYPE_WORKFLOW
        Integer value 6. Specifies that the validation item is a workflow.
        See Also:
        Constant Field Values
      • VALIDATION_TYPE_INSTRUCTION

        public static final int VALIDATION_TYPE_INSTRUCTION
        Integer value 7. Specifies that the validation item is a instruction.
        See Also:
        Constant Field Values
      • VALIDATION_TYPE_MILESTONE

        public static final int VALIDATION_TYPE_MILESTONE
        Integer value 8. Specifies that the validation item is a milestone.
        See Also:
        Constant Field Values
      • VALIDATION_TYPE_RULESET

        public static final int VALIDATION_TYPE_RULESET
        Integer value 9. Specifies that the validation item is a ruleset.
        See Also:
        Constant Field Values
      • VALIDATION_TYPE_PARTNERLINK

        public static final int VALIDATION_TYPE_PARTNERLINK
        Integer value 10. Specifies that the validation item is a partnerlink.
        See Also:
        Constant Field Values
      • VALIDATION_TYPE_SCHEMA

        public static final int VALIDATION_TYPE_SCHEMA
        Integer value 11. Specifies that the validation item is a schema definition.
        See Also:
        Constant Field Values
      • VALIDATION_TYPE_ANNOTATION

        public static final int VALIDATION_TYPE_ANNOTATION
        Integer value 12. Specifies that the validation item is a text annotation definition.
        See Also:
        Constant Field Values
      • VALIDATION_TYPE_WORKFLOW_COLLECTION

        public static final int VALIDATION_TYPE_WORKFLOW_COLLECTION
        Integer value 13. Specifies that the validation item is a workflow collection.
        See Also:
        Constant Field Values
      • VALIDATION_LEVEL_ERROR

        public static final int VALIDATION_LEVEL_ERROR
        Value of 1. Indicates that a validation error will either cause the transfer to fail or cause a problem at runtime.
        See Also:
        Constant Field Values
      • VALIDATION_LEVEL_WARNING

        public static final int VALIDATION_LEVEL_WARNING
        Value of 2. Indicates that a validation error may possibly cause either the transfer to fail or a problem at runtime. Warnings will usually be issued in situations where the validation algorithm does not 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 the referenced workflow will generate 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. In this case, the transfer would succeed.
        See Also:
        Constant Field Values
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the name of the object that contains the error.
        Returns:
        A String containing the name of the object in which the error occured.
      • getInfo

        public java.lang.String getInfo()
        Retrieves detailed information regarding the validation error, such as the name of a field or a parameter.
        Returns:
        A String containing the detailed error information, or null if no error occured.
      • getMessage

        public java.lang.String getMessage()
        Retrieves the value in the message property of this validation error.
        Returns:
        A String containing 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 representing the contents of the errorType property of this validation error.
      • getMapName

        public java.lang.String getMapName()
        Gets the value in the map name property of this instance. The map name can be used to get the map that has the error.
        Returns:
        A String containing the map name property of this instance, 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:
        • VALIDATION_TYPE_STEP
        • VALIDATION_TYPE_INSTRUCTION
        • VALIDATION_TYPE_PARAMETER
        • VALIDATION_TYPE_ROUTE
        • VALIDATION_TYPE_ANNOTATION
        See Also:
        VWWorkflowDefinition, VWValidationError.getStepId(), VWValidationError.getSubStepId()
      • getStepId

        public int getStepId()
        Gets an integer representing the step ID property of the current validation error. The Map ID will be required in order to locate the invalid step.

        If the error type is VALIDATION_TYPE_ANNOTATION, this method will return the annotation id. The Map ID will be required in order to locate the invalid annotation.

        Returns:
        An integer representing 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(), VWValidationError.getSubStepId()
      • getSubStepId

        public int getSubStepId()
        Gets an integer representing 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 get these IDs with getStepID and VWMapDefinition.getMapId.

        Returns:
        The ID property of the substep object that caused the current validation error. This can be any one of the following:
        • 2: VALIDATION_TYPE_ROUTE
        • 7: VALIDATION_TYPE_INSTRUCTION
        • -1: Undefined
        See Also:
        VWValidationError.getStepId(), VWMapDefinition.getMapId()
      • toString

        public java.lang.String toString()
        Returns a String representing this 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>:<error level>:<object name>:<additional information>:<map ID>:<step ID>:<instruction ID>:<error message>

      • getLocalizedValidationTypeString

        public static java.lang.String getLocalizedValidationTypeString(int theValidationType)
                                                                 throws VWException
        Retrieves the localized string corresponding to the specified validation type.
        Parameters:
        theValidationType - An integer value associated with validation type.
        Returns:
        A String representation of the specified validation type.
        Throws:
        VWException - Thrown if the validation type is not valid.
        Since:
        PE 5.2.0.1
      • getLocalizedValidationLevelString

        public static java.lang.String getLocalizedValidationLevelString(int theValidationLevel)
                                                                  throws VWException
        Retrieves the localized string corresponding to the specified validation level.
        Parameters:
        theValidationlevel - An integer value associated with validation level.
        Returns:
        A String representation of the specified validation level.
        Throws:
        VWException - Thrown if the validation level is not valid.
        Since:
        PE 5.2.0.1

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