Class ActivityExecutionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.appiancorp.suiteapi.process.framework.ActivityExecutionException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HandledActivityExecutionException, RetryableActivityExecutionException, UnattendedActivityValidationException

public class ActivityExecutionException extends Exception
This is an Exception wrapper, which is used by Activity classes to inform about error conditions while running the activity. This exception contains the actual exception that occurred while executing the activity. The exception can also contain messages for both user and the administrator. In the case of attended activity the message for the user will be displayed immediately. The actual error that occurred inside the activity class will be logged both on the Java and database side.
See Also:
  • Constructor Details

    • ActivityExecutionException

      public ActivityExecutionException(ErrorCode code, Locale locale, Object... arguments)
    • ActivityExecutionException

      public ActivityExecutionException(Exception cause, String attendedMsg, String notifyMsg)
      Construct a new ActivityExecutionException
      Parameters:
      cause - the exception which occurred while executing the activity
      attendedMsg - the message to be displayed to the user in an attended activity
      notifyMsg - the message to be sent to the process administrator
    • ActivityExecutionException

      public ActivityExecutionException(Exception cause, String attendedMsg, String notifyMsg, boolean notified)
      Construct a new ActivityExecutionException
      Parameters:
      cause - the exception which occurred while executing the activity
      attendedMsg - the message to be displayed to the user
      adminMsg - the message to be sent to the process administrator
      notified - whether or not the process administrator has been notified
    • ActivityExecutionException

      public ActivityExecutionException(String attendedMsg, String notifyMsg)
      Construct a new ActivityExecutionException
      Parameters:
      attendedMsg - the message to be displayed to the user in an attended activity
      adminMsg - the message to be sent to the process administrator
    • ActivityExecutionException

      public ActivityExecutionException(String attendedMsg, String notifyMsg, boolean notified)
      Construct a new ActivityExecutionException
      Parameters:
      usrMsg - the message to be displayed to the user
      adminMsg - the message to be sent to the process administrator
      notified - whether or not the process administrator has been notified
  • Method Details

    • getUserMessage

      public String getUserMessage()
      Returns the message set by the Activity class for the current user. This will be displayed on the UI only in the case of attended activity classes.
      Returns:
      Error message for the user
    • getException

      public Exception getException()
      Method returns the actual exception that occurred in the Activity class
      Returns:
      exception in the activity class
    • getNotifyMessage

      public String getNotifyMessage()
      Gets the message that will be sent to the process initiator in a notification. By default, this value is the message of the exception.
      Returns:
      Message to be sent to the process initiator
    • setNotifyMessage

      public void setNotifyMessage(String notifyMessage)
      Sets the messages that will be sent to the process initiator in a notification.
      Parameters:
      notifyMessage - the message to be sent to the process initiator
    • getExceptionClassName

      public String getExceptionClassName()
      Returns the name of the type of the exception that occurred in the activity class
      Returns:
      Type name of the exception that occurred in the activity class
    • getNotified

      public boolean getNotified()
      Has the process administrator been notified of this exception?
      Returns:
      true if the process administrator has been notified; false otherwise
    • setNotified

      public void setNotified(boolean notified)
      See Also: