Notifications - Configuration of notifications and events

Introduction

The document describes the mechanism of notification and defining events based on information about changes in object states.

Principles of use

The AMAGE application creates a series of data. These data (objects) are information that are created in the database or change their state. These may include, for example, new service requests, a change in the status of a service request, an inspection of a device, etc.

Sometimes there is a need to automatically notify system users (or other people) in response to such actions. This is what the notification mechanism is for. It allows you to define a number of rules that will be processed by the server and, based on the defined parameters, will generate appropriate actions. Such actions may include, for example, sending an email with specific content to a selected list of people.

Notifications

Access to event definitions is provided in the system configuration section

amage notifications 6deda
Figure 1. Event options

There are two actions available in the section:

  • Event rules - definition of event rules. Here we define the rules and how the system should react to individual events.

  • Events - viewing events and system reactions to them. Here we can view the events generated by the system and the system’s reaction to them, e.g. whether e-mails have been generated and sent. Here, the AMAGE system reports the status of the event, potential errors (e.g. problems with sending an email) and a list of activities performed.

Definition of event rules

After selecting the action to create a new event rule, the event definition window appears. An event is an action that occurs as a result of an action on a defined object. Object types can be:

  • Service events

  • Executing inspections

  • Mobile device

  • Work orders

  • and others defined in the system

The event types are as follows:

  • Create - create a new object of a given type

  • Update - updating an object of a given type, e.g. changing field values

  • Deletion - deletion of the object from the database

  • Periodic event - periodic events performed by the synchronization server on a given type of object (*)

Periodic events require event definitions in the 'Schedulers' section. This is described in a separate documentation in the 'howto' section
amage notifications 72074
Figure 2. Event definition. Window with entered data.

An effector is an action that the server should trigger when an event occurs on an object. The effectors may be different, depending on the system installation. The basic effect is e-mail notification, i.e. sending an e-mail to a specific list of people.

A check script is a script that will be run by the server to check whether a given object is the target of such an event. In such a script, you can limit the script’s behavior only to specific changes, e.g. to changes in the object. An example is sending an email to a specific list of people only when the service request changes its status to 'COMPLETED'. To achieve this goal, an event is created related to the object modification action and a rule is created in the checking script that accepts only when the state change is as above.

The easiest way to define events is to use the wizard available in the event definition window. It contains a list of sample events that, when selected, automatically configure all form fields. You can then only adapt the scripts and data to your needs.

Objects available

You can use objects and elements related (children) to a given object in proofreading and preparation scripts and email templates. Below is a list of available fields in objects that can be used in the definition of rules and templates.

More