public interface MessageContainer
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
.AppianSmartService.validate(MessageContainer)
,
AppianSmartService.onSave(MessageContainer)
,
Validatable
Modifier and Type | Method and Description |
---|---|
void |
addError(java.lang.String acpKey,
java.lang.String messageKey,
java.lang.Object... messageValues)
Add an error to the container.
|
java.lang.String |
getErrorMessage()
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's
run method from executing. |
void addError(java.lang.String acpKey, java.lang.String messageKey, java.lang.Object... messageValues)
run
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.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.boolean isEmpty()
run
method from executing.java.lang.String getErrorMessage()
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.