Notification commands

◷ 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

  1. name or name-ref
    1. Description: Represents a name for the group identifier of the notification set of the engine
    2. Mandatory: No
    3. Type: Any value or variable reference for name-ref

Storage

  1. connection or connection-ref
    1. Description: Connection string to a database
    2. Mandatory: No
    3. Type: string or expression as a connection string
  2. type
    1. Description: Type of the database as the notification storage
    2. Mandatory: No
    3. 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

  1. name or name-ref
    1. Description: Represents a name for the group identifier of the notification set of the engine
    2. Mandatory: No
    3. Type: Any value or variable reference for name-ref
  2. tag or tag-ref
    1. Description: Represents a name for the group identifier of the notification set of the engine
    2. Mandatory: No
    3. Type: Any value or variable reference for name-ref
  3. type
    1. Description: Type of notice
    2. Mandatory: No
    3. Type: Information, Warning, Error, Exception
  4. message or message-ref
    1. Description: Provides the message for the notice
    2. Mandatory: Yes
    3. 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
Updated on October 30, 2023

Was this article helpful?

Related Articles