Notification component

Table of Contents

Description

Sends a message to the specified recipient. Including can place the message in the script handler log file.

For the system user, a notification is a websocket message from the server on an existing websocket connection. In particular, the Script Editor web application displays notifications in the form of pop-up messages, which is convenient to use in the script debugging mode when writing a script. A comma separated list of users can be specified as recipients: their logins, IDs, logins of associated SIP user accounts or their numbers.

The notifier can send NOTIFY SIP requests to SIP-user devices with a message placed in the body of the request according to the protocol SIP.

Table 1. System Characteristics

Index

111

Short title

notify

Types of scenarios

All of them

Starter module

r_script_component_notify

Mode

Asynchronous

Icon

111

Branching pattern

Branching, closing

Properties

Table 2. Properties
Specification Description

Title: Mode
Code: mode
Visibility: no
Default: Log log

Possible options:

  • Notify (scriptnotify, 0) - Sends a message of type script_notify to the specified user’s websocket connection. The scriptnotify capability must be connected in the connection for the event to be successful. The web application "Script Editor" handles such messages. Any other application can also implement subscription and notification processing from scripts.

  • Log Log (log, 1) - The message is logged in the log log of the scripting machine with a link to the current script and handler.

  • Message sip (sip, 2) - The message is sent to the user’s SIP device as a SIP request.

Title: Text
Code: text
Visibility: yes
Default: — 

Message text for Notification and Log-log modes`.

Title: User
Code: user
Visibility: yes
Default: — 

An argument that identifies the user or a list of users listed comma separated.
Login, ID, login or linked account number SIP.
For Notification mode.

Title: Save
Code: postToDms
Visibility: yes
Default: none

Data model notification saving mode switch.
When enabled, the notification will be available in the Cabinet app and in the collection '/rest/v1/model/platform/notifications/Notifications'.
Requires a product layer installed in the domain.
For Notification mode.

Title: Mapping Type
Code: type
Visibility: yes
Default: Auto

Display method in user interface. Forms an additional option in the websocket message.
Possible options:

  • Auto (auto, 0) - Notification method at the discretion of the application.

  • WebKit (webkit, 1) – Notification by WebKit.

  • HTML (html, 3) – Notification by means of HTML.

For Notification mode.

Title: Notification type
Code: notifyType
Visibility: yes
Default: `Info'

Notification Formatting.
Possible options:

  • Info (info, 0) - Notification method at the discretion of the application.

  • Success (success, 1) - Notification with a WebKit.

  • Warning (warning, 2) - Notification by means of a HTML.

  • Error (error, 3) - Notification with means HTML.

For Notification mode

Title: Background Color
Code: color
Visibility: yes
Default: — 

Custom background color in the form of a number corresponding to the view RGB 24bit.
For Notification mode.

Title: Text Color
Code: textColor
Visibility: yes
Default: — 

Custom text color as a number corresponding to the representation of the RGB 24bit.
For Notification mode.

Title: Group
Code: group
Visibility: yes
Default: — 

Message group code to automatically hide when duplicated.
The application displaying the notification should automatically hide the message on the screen when a new message with the same group code arrives.
For Notification mode.

Title: `Autodisclosure, with
Code: autoHide
Visibility: yes
Default: — 

The interval after which the notification should disappear from the screen if the user has not done anything with it.
For Notification mode.

Title: Duplicate to log
Code: writeLog
Visibility: yes
Default: `None'

Turns off additional logging of the message to the script handler log.
For Notification mode.

Title: Message
Code: sipMsg
Visibility: yes
Default: NOTIFY

Method of the SIP request to be sent.
Possible options:

  • NOTIFY (notify, 0)

  • INFO (info, 1)

  • MESSAGE (message, 2)

For Notification mode.

Title: User
Code: sipUser
Visibility: yes
Default: — 

Address in tel:username or username format, where the SIP user’s login and account number may be substituted as username.
For Message mode SIP.

Title: Additional Titles
Code: sipHeaders
Visibility: yes
Default: ``

Additional headers to be substituted in the SIP request. The argument contains a multiline value, the format of each line: HeaderName: HeaderValue.
For Message mode SIP.

Name: From
Code: sipFrom
Visibility: yes
Default: — 

The value for the header to be inserted in the SIP request to be sent From.
For Message mode SIP.

Name: Event
Code: sipEvent
Visibility: yes
Default: — 

NOTIFY header value to be inserted into the NOTIFY header of the SIP request to be sent Event.
For Message mode SIP.

Name: Content-Type
Code: sipContentType
Visibility: yes
Default: — 

The value for the header to be inserted in the SIP request to be sent Content-Type.
For Message mode SIP.

Name: Content
Code: sipContent
Visibility: yes
Default: — 

Message text to be inserted in the body of the SIP request to be sent.
For Message mode SIP.

Title: Waiting for confirmation
Code: sipReport
Visibility: yes
Default: `No'

SIP response standby switch for a sent SIP request.
For Message mode SIP.

Title: Report to variable
Code: sipReportMsg
Visibility: yes
Default: — 

Variable to store the body of the SIP response to a sent SIP request.
For Message mode SIP.

Title: Time, s
Code: sipTimeoutSec
Visibility: yes
Default: 37

Timeout for waiting for a response to a sent SIP request, in seconds.
For Message mode SIP.

Title: Transition, Time
Code: transferTimeout
Visibility: yes
Default: — 

The component to which control is transferred in case the standby mode does not receive a response to a sent SIP request at the set time.
For Message mode SIP.

Title: Reason for error to variable
Code: errMsg
Visibility: yes
Default: — 

Variable to store the error code.

Title: Transition
Code: transfer
Visibility: no
Default: — 

Component to which control is passed.

Title: Transition, Error
Code: transferError
Visibility: yes
Default: — 

The component to which control is passed if an error occurs.

See also