Overview

Chioro offers the function to send notifications.

With notifications users (via E-Mail) or external systems (via Script) can be informed about the finishing of a flow or operation. (Currently only validation and data target operations.) Notifications from operations are taking priority.

add_notification_configuration_en

Each configuration has two parts: the status (1), as trigger the notification and the channel (2) as the target. It is possible to have multiple status selected for one channel. If more channels are desired, another configuration can be added via the “+”-button (3). If there are none or not the right channel available, then it needs to be created via a new AdminConfig. This requires the correlating user rights.

add_notification_configuration_detail_en

Creating a channel

tags

  1. create new AdminConfig
  2. assign name, this name will then be selected in the flow or operation
  3. select type, in this case “notification channel”
  4. select method, email (mails will be sent) or script (run any java script)
  5. these mail addresses will be notified
  6. e-mail template or script, depending on the selection at point 4 If the settings are complete, don’t forget to save :-)

The method “E-Mail” in detail

With the method “E-Mail” is, as standard, this template deposited:

tags

In this case, the mail is formatted with HTML and contains, in double curly brackets, the key values which are are assigned by Chioro. These can be used freely in the text and can of course occur more than once.

The method “Script” in detail

With the method “Script” no template is given. Here, as well as in many other places in Chioro, you can define in Java-Script what should happen when the notification is triggered.

The environment variables from the table below can be accessed via context('xxx'). For example, context('fileName') or context('status').

Example:

  let url = "https://postman-echo.com/post";
  let body = {"fileName": context('fileName')};
  let headers = {"token": "12345678" }; // optional
  let response = postJson(url, body, headers);

Here, the 3 required variables are first assigned, sent with postJson and the answer from the server/the API is saved in response.

postJson and getJson

postJson(url, payload, header) sends data to a URL, getJson(url, payload, header) retrieves data from a URL.

Use at flow level

Notifications can be found under the letter icon.

tags

tags

  1. select in the dropdown at which events a notification will be sent.
  2. select which admin-config should be used
  3. save the configuration

Use in data target/validation

In the data target and validation there is a tab Notification in the configuration.

tags

Analog to the flow wide configuration you can select which events are notified and which admin config is used to send the notification. Admin-Config should be used for sending.

Hint: The file name created in the data target (either assigned directly or by script) appears again in the Admin-Config as the variable “fileName”.

Table of possible variables in the template/script

Variable Explanation
flowName name of the triggering flow
flowOperationName name of the operation
status status
statusMessage detailed status
date startTime start of execution
date endTime end of execution
totalNumberOfRecords number of records processed
numberOfSuccessfulRecords number of records output
numberOfFailedRecords number of processing errors
numberOfInvalidRecords number of invalid records (validation)
numberOfErrors number of processing errors
numberOfValidationErrors number of validation errors (validation)
tenant name of the user
flowOperationUri Link to operation
fileName File name from the data target operation, otherwise empty.