R35312 Notifications - Validate Notification Class

Code R35312
Entity Communities.Notifications Entity
Name ValidateNotificationClass
Attribute NotificationClass
Layer Back-End
Events Commit
Priority Normal
Modify NO
Action The rule validates that the value in the Notification Class field matches
to the specified format:


1. It should not begin with an underscore
2. The string must begin with either "USR" or "NT"
3. The first two segments may only consist of uppercase letters and underscores
4. The entire string should include a minimum of 2 underscores (i.e. 2 segments)
5. The rest (except the first two segements) may only consist of letters, numbers or '_', '.', '/', '-', '+', ' '
6. The last segment should conform code validation


In case of a mismatch, an error will be thrown.
Description Тhe rule verifies whether the value in the Notification Class field matches the following format:
<"USR" OR "NT"><"_"><"SCOPE"><"_"><"CLASSIFICATION">.
where:
"USR" OR "NT": A prefix constant that determines whether the notification
is user-generated or internal.

SCOPE: The category or scope of the notification class.
Requirements: UPPERCASE letters and (optional) underscores.
Limitations: Must be at least 2 characters. Cannot start or end with
an underscore.
Examples: SOC (Social), WM (WMS), DOC_STATE

CLASSIFICATION: The subject or specificity of the notification class.
Requirements: code validation
Examples: NEW_POST, QTY_BELOW_MIN, REPLY, 123, 123-1, CODE123
Message The value in the Notification Class field does not match the specified format:
<"USR" OR "NT"><"_"><"SCOPE"><"_"><"CLASSIFICATION">.
Please retry with a different format.
Version Introduced: v.24
Updated: v.24 SP5 - the requirements for the CLASSIFICATION segment are changed.
Revocable NO

* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.