WebLogic Process Integrator Version 1.1

com.bea.wlpi.common
Class WorkflowException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.bea.wlpi.common.WorkflowException

public class WorkflowException
extends java.lang.Exception

Encapsulates exceptions encountered when executing a remote EJB call. WorkflowException is thrown in 3 different situations:

1. On a system error (i.e., rethrown exception).
2. On a workflow error (i.e., illegal workflow situation such as an inconsistent state).
3. On a non-fatal workflow error.

WorkflowException has constructors that take a nested exception and others that take a message code to support internationalization of server exception messages.

See Also:
Messages, Serialized Form

Field Summary
static int ERROR_SYSTEM
          A fatal exception occurred while processing a user request.
static int ERROR_UNKNOWN
          Unknown error type - internal use only.
static int ERROR_WORKFLOW
          A fatal, illegal condition such as inconsistent workflow state.
static int WARNING_WORKFLOW
          A non-fatal workflow condition that the user can rectify manually.
 
Constructor Summary
WorkflowException(java.lang.Exception e)
          Construct a new WorkflowException containing a nested exception.
WorkflowException(java.lang.Exception e, int severity)
          Construct a new WorkflowException containing a nested exception.
WorkflowException(int msgNum)
          Construct a new WorkflowException with the specified error code.
WorkflowException(int msgNum, int severity)
          Construct a new WorkflowException with the specified error code.
WorkflowException(int msgNum, java.lang.Object[] args)
          Construct a new WorkflowException with the specified error code.
WorkflowException(int msgNum, java.lang.Object[] args, int severity)
          Construct a new WorkflowException with the specified error code.
 
Method Summary
 java.lang.String getLocalizedMessage()
          As for getMessage() but in the locale of the calling system.
static java.lang.String getLocalizedMessage(int msgNum, java.lang.Object[] args)
          Create a localized message with parameter values substituted.
 java.lang.String getLocalizedSeverityDescription()
          Return a string to indicate the severity of the exception.
 java.lang.String getMessage()
          Return the error message string of this object.
 int getSeverity()
          Return the exception severity code.
 java.lang.String getSeverityDescription()
          Return a string to indicate the severity of the exception.
 void printStackTrace()
          Print this exception and its backtrace to the standard error stream.
 void printStackTrace(java.io.PrintStream stream)
          Print this exception and its backtrace to the specified print stream.
 void printStackTrace(java.io.PrintWriter writer)
          Print this exception and its backtrace to the specified print writer.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERROR_UNKNOWN

public static final int ERROR_UNKNOWN
Unknown error type - internal use only.

ERROR_SYSTEM

public static final int ERROR_SYSTEM
A fatal exception occurred while processing a user request.

ERROR_WORKFLOW

public static final int ERROR_WORKFLOW
A fatal, illegal condition such as inconsistent workflow state.

WARNING_WORKFLOW

public static final int WARNING_WORKFLOW
A non-fatal workflow condition that the user can rectify manually.
Constructor Detail

WorkflowException

public WorkflowException(java.lang.Exception e)
Construct a new WorkflowException containing a nested exception. The exception is of severity ERROR_SYSTEM, unless the nested exception is of class WorkflowException, in which case the new exception inherits its severity setting from the nested exception.
Parameters:
e - The nested exception (assumed to have been previously caught).
See Also:
WorkflowException(Exception, int)

WorkflowException

public WorkflowException(java.lang.Exception e,
                         int severity)
Construct a new WorkflowException containing a nested exception.
Parameters:
e - The nested exception (assumed to have been previously caught).
severity - Error type: ERROR_SYSTEM, ERROR_WORKFLOW or WARNING_WORKFLOW.
See Also:
WorkflowException(Exception)

WorkflowException

public WorkflowException(int msgNum)
Construct a new WorkflowException with the specified error code. The exception is of severity ERROR_WORKFLOW.
Parameters:
msgNum - Message number from Messages.

WorkflowException

public WorkflowException(int msgNum,
                         java.lang.Object[] args)
Construct a new WorkflowException with the specified error code. The exception is of severity ERROR_WORKFLOW.
Parameters:
msgNum - Message number from Messages.
args - Arguments for substitution into localized message string.

WorkflowException

public WorkflowException(int msgNum,
                         int severity)
Construct a new WorkflowException with the specified error code.
Parameters:
msgNum - Message number from Messages.
severity - Error type: ERROR_SYSTEM, ERROR_WORKFLOW or WARNING_WORKFLOW.

WorkflowException

public WorkflowException(int msgNum,
                         java.lang.Object[] args,
                         int severity)
Construct a new WorkflowException with the specified error code.
Parameters:
msgNum - Message number from Messages.
args - Arguments for substitution into localized message string.
severity - Error type: ERROR_SYSTEM, ERROR_WORKFLOW or WARNING_WORKFLOW.
Method Detail

getMessage

public java.lang.String getMessage()
Return the error message string of this object. If this exception contains a nested exception, the message will be that of the nested exception. Otherwise, the message will be in the language of the system locale from which the exception was thrown.
Overrides:
getMessage in class java.lang.Throwable
Returns:
The error message string of this exception object if it was created with an error message string; or null if it was created with no error message.

getLocalizedMessage

public java.lang.String getLocalizedMessage()
As for getMessage() but in the locale of the calling system.
Overrides:
getLocalizedMessage in class java.lang.Throwable
Returns:
A localized message string if available; otherwise, in the locale of the system from which the exception was first thrown.

getSeverity

public int getSeverity()
Return the exception severity code.
Returns:
Exception severity code: ERROR_SYSTEM, ERROR_WORKFLOW, WARNING_WORKFLOW or ERROR_UNKNOWN.

getSeverityDescription

public java.lang.String getSeverityDescription()
Return a string to indicate the severity of the exception. This will be either "System error", "Workflow error", "Workflow warning" or "Unknown error".
See Also:
getLocalizedSeverityDescription()

getLocalizedSeverityDescription

public java.lang.String getLocalizedSeverityDescription()
Return a string to indicate the severity of the exception. This will be either "System error", "Workflow error", "Workflow warning" or "Unknown error", expressed in the language of the system locale on which the method is called.
See Also:
getSeverityDescription()

printStackTrace

public void printStackTrace()
Print this exception and its backtrace to the standard error stream. This method prints a stack trace for this object on the error output stream that is the value of the field System.err. The first line of output contains the result of the toString() method for this object. The remaining lines represent data previously recorded by the method fillInStackTrace(). If this exception contains a nested exception, the stack trace for this exception is printed as well.
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream stream)
Print this exception and its backtrace to the specified print stream.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
stream - PrintStream to use for output.

printStackTrace

public void printStackTrace(java.io.PrintWriter writer)
Print this exception and its backtrace to the specified print writer.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
stream - PrintWriter to use for output.

getLocalizedMessage

public static java.lang.String getLocalizedMessage(int msgNum,
                                                   java.lang.Object[] args)
Create a localized message with parameter values substituted.
Parameters:
msgNum - Message number from Messages.
args - Arguments for substitution into localized message string.

WebLogic Process Integrator Version 1.1

WebLogic and Process Integrator are trademarks of BEA Systems, Inc.
Copyright (c) 2000 BEA Systems, Inc., 8920 Woodbine Avenue, Suite 400,
Markham, Ontario L3R 9W9 Canada. All rights reserved.