Interface MessageContainer
public interface MessageContainer
Container populated with error messages by the
validate
or onSave
methods in a smart service class that extends AppianSmartService
. If the
MessageContainer
contains any error messages, the process execution layer will
prevent the activity from executing and display the validation messages added using
addError
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an error to the container.Gives the error messages that were added to the container as a single string with "[" and "]" delineating the messages.boolean
isEmpty()
Called by the process execution layer to determine if there are any validation errors that would prevent the smart service'srun
method from executing.
-
Method Details
-
addError
Add an error to the container. Doing so will cause the smart service'srun
method to not be executed and will return the error messages to the user in the form (for attended nodes) or sent via alert for unattended nodes.- Parameters:
acpKey
- the name of the ACP associated with the validation error. All errors must be associated with an ACP.messageKey
- the key to the error message in the bundlemessageValues
- the parameters to be used with the message bundle to create the full message.
-
isEmpty
boolean isEmpty()Called by the process execution layer to determine if there are any validation errors that would prevent the smart service'srun
method from executing.- Returns:
- whether or not errors have been added to the container
-
getErrorMessage
String getErrorMessage()Gives the error messages that were added to the container as a single string with "[" and "]" delineating the messages. Used by the process execution layer to create the message part of the error alert.- Returns:
- a String representation of all errors added to the container
-