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
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 Summary
ConstructorDescriptionActivityExecutionException
(ErrorCode code, Locale locale, Object... arguments) ActivityExecutionException
(Exception cause, String attendedMsg, String notifyMsg) Construct a newActivityExecutionException
ActivityExecutionException
(Exception cause, String attendedMsg, String notifyMsg, boolean notified) Construct a newActivityExecutionException
ActivityExecutionException
(String attendedMsg, String notifyMsg) Construct a newActivityExecutionException
ActivityExecutionException
(String attendedMsg, String notifyMsg, boolean notified) Construct a newActivityExecutionException
-
Method Summary
Modifier and TypeMethodDescriptionMethod returns the actual exception that occurred in the Activity classReturns the name of the type of the exception that occurred in the activity classboolean
Has the process administrator been notified of this exception?Gets the message that will be sent to the process initiator in a notification.Returns the message set by the Activity class for the current user.void
setNotified
(boolean notified) void
setNotifyMessage
(String notifyMessage) Sets the messages that will be sent to the process initiator in a notification.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ActivityExecutionException
-
ActivityExecutionException
Construct a newActivityExecutionException
- Parameters:
cause
- the exception which occurred while executing the activityattendedMsg
- the message to be displayed to the user in an attended activitynotifyMsg
- the message to be sent to the process administrator
-
ActivityExecutionException
public ActivityExecutionException(Exception cause, String attendedMsg, String notifyMsg, boolean notified) Construct a newActivityExecutionException
- Parameters:
cause
- the exception which occurred while executing the activityattendedMsg
- the message to be displayed to the useradminMsg
- the message to be sent to the process administratornotified
- whether or not the process administrator has been notified
-
ActivityExecutionException
Construct a newActivityExecutionException
- Parameters:
attendedMsg
- the message to be displayed to the user in an attended activityadminMsg
- the message to be sent to the process administrator
-
ActivityExecutionException
Construct a newActivityExecutionException
- Parameters:
usrMsg
- the message to be displayed to the useradminMsg
- the message to be sent to the process administratornotified
- whether or not the process administrator has been notified
-
-
Method Details
-
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
Method returns the actual exception that occurred in the Activity class- Returns:
- exception in the activity class
-
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
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
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:
-