◷ Reading Time: 3 minutes
Notification is a mechanism that allows every engine to write groups of notices. The application is able to retrieve the notification`s notices and make decisions based on these.
Notification commands
Notification cross-engine commands can be used in all rules and logic engines. However, the validation engine already uses notification in order to write the results of any validation.
Notification
A notification board that allows different groups and types of notices be written.
Summary
Enables the creation of a notice in the notification
Parameters
- name or name-ref
- Description: Represents a name for the group identifier of the notification set of the engine
- Mandatory: No
- Type: Any value or variable reference for name-ref
Storage
- connection or connection-ref
- Description: Connection string to a database
- Mandatory: No
- Type: string or expression as a connection string
- type
- Description: Type of the database as the notification storage
- Mandatory: No
- Type: MsSql
Sample
<Notification>
<Notice message="Name has not value" type="Error" />
</Notification>
Notice
A notice that is written on a notification board.
Summary
This command provides a notice for a notification, but only in the notification parent.
Parameters
- name or name-ref
- Description: Represents a name for the group identifier of the notification set of the engine
- Mandatory: No
- Type: Any value or variable reference for name-ref
- tag or tag-ref
- Description: Represents a name for the group identifier of the notification set of the engine
- Mandatory: No
- Type: Any value or variable reference for name-ref
- type
- Description: Type of notice
- Mandatory: No
- Type: Information, Warning, Error, Exception
- message or message-ref
- Description: Provides the message for the notice
- Mandatory: Yes
- Type: Any string value or variable reference for message-ref
Sample
<Notification>
<Notice message="User has logged in" type="Information" />
<Notice message-ref="MsgVar" type="Information" />
</Notification>
Formatting
Messages can be formatted using curly brackets. Inside the curly brackets, an expression can be written and will be evaluated once the notices are written in the notification component.
Format: {expression}
The following variables are injected into the execution context, so they can be used as part of the message formatting:
- $context.DecisionName: Name of the actual document that has the rule/logic
- $context.LogicName: Name of the current rule/logic that is being executed