Skip to main content

System Notifications

The execution of flows, tasks or algorithms might generate system notifications depending of the configuration or resulting from being explicitly created via code. These notifications provide information about the execution. They don't only notify whether the execution was successful or not, but also contain detailed information of HTTP requests and responses in those cases an HTTP request was sent.

You can perform operations on system notifications using CENIT IO API V2. See the section System Notifications in the API Spec.

The Monitors/System Notifications submenu allows to manage the system notifications.

System notifications menu

A shortcut to the System Notifications menu is the bell button in the top bar:

Notifications bell

Cenit shows the notifications ordered by date and time in a decreasing way, that means newer first.

System notifications list 1

Notifications are particularly significant when a flow or algorithm communicate with an API. When that is the case, we can get information about both the request and the response when the process completed.

Getting details about the request​

By exploring a notification you can get information about the request: the URL the petition was sent to, the URL parameters when they exist, the http headers, etc.

Notification request

In case of a POST request, you can check the petition body by exploring the attachment

Notification request atachment

For that example, the content of the attachment, or rather, the POST body is:

{
"id":"C02SH94G2E5",
 "text":"You are in varios channel",
"channel":"C02S4LXKFL3"
}

Getting details about the response​

By exploring a notification you can get information about the response and confirm whether the request was successful or not.

Notification response

You can also check the response content by exploring the attachment

Notification response atachment

For that example, the content of the attachment, or rather, the response body is:

{
"ok":true,
"channel":"C02S4LXKFL3",
"ts":"1643439552.770979",
"message":{"bot_id":
"B02RQ3DHWTH",
"type":"message",
"text":"You are in varios channel",
"user":"U02S70MGF1A",
"ts":"1643439552.770979",
"team":"T02RXV0890W",
"bot_profile":{"id":"B02RQ3DHWTH",
"app_id":"A02S4MXN491",
"name":"Joe's App",
"icons":{"image_36":"https:\/\/a.slack-edge.com\/80588\/img\/plugins\/app\/bot_36.png",
"image_48":"https:\/\/a.slack-edge.com\/80588\/img\/plugins\/app\/bot_48.png",
"image_72":"https:\/\/a.slack-edge.com\/80588\/img\/plugins\/app\/service_72.png"
},
"deleted":false,
"updated":1640706919,
"team_id":"T02RXV0890W"
}
}
}

How to create notifications​

When executing an algorithm, a flow or a task which involve http requests, notifications for requests and responses are implicitly generated. Nevertheless, you can configure the flow in order to specify whether you want it to generate notifications or not.

When defining a flow you can set true or false in both fields Notify Request and Notify Response, so when executing the flow notifications will be generated or not.

Notify flow

You can achieve the same goal by accessing the Flow Config menu.

flow config menu

You can pick up a flow from the list, edit the configuration and set true if you want that flow to create notifications or false in other case.

flow config menu list

Cenit implicitly generates a notification in case of error:

notification error

Creating notifications via code​

You can also create notifications via code. You can use the Tenant object to create notifications inside an algorithm's code:

Tenant Error

After running that algorithm you can see the notification by accessing the System Notifications Menu:

Tenant error notification

You should note the notification type is Error. When omitting the type parameter, the error type is used as a default value

Tenant.notify (message: 'error message')

However, is possible to create a warning notification by using the parameter type with value warning:

Tenant.notify (message: 'warning message', type: 'warning')

For example, the code:

Tenant Warning

generates the notification shown below.

Tenant Warning notification

A notification with a low level of importance can be also created by using the parameter type with value notice:

Tenant.notify (message: 'notice message', type: 'notice')

For example, the code:

Tenant Notice

generates the notification shown below.

Tenant Notice notification