Events and reactions
An interface for the definition of events that result from changes in data in the system. The mechanism allows for flexible generation of email notifications/notifications in the system with full control over the handling of these events.
The event mechanism allows you to configure responses to occurring events in the system. The event mechanism operates at the Objects level. The system operator has the ability to define events for basic operations performed on objects: Creation, Modification, Deletion. Based on these basic operations, he can further configure whether the system will respond to a given event by modifying check scripts. They allow to introduce additional conditions based on the data of a specific object, e.g. state. With the help of modifying scripts, the user can change the parameters of the event based on the data coming from the object, e.g. filling the list of email recipients based on the parameters of the object, e.g. the person assigned to the service event.
The event list allows you to view completed event handling in the system. If an event is defined for an object, all operations on this object will be analyzed by the system. Based on the event configuration, the system will handle the event (e.g., send an email) or determine that the event is ignored (e.g., does not meet the conditions of the check script).
The event list shows all events and the system’s response to them. The filter allows you to selectively display the data. To see details of event processing, select any event. The system will present the details of the event.
The event details show information about the event, the date it was created, processed by the system and the expiration date.
The expiration date determines the length of time for which the system will process an event, e.g., the event of sending a message via email when the email server is not available. In this case, the system will repeat the execution of this event until the expiration time. After this time, the event will be specified as not executed. |
When the 'Data' tab is selected, individual system responses to an event are displayed. When an individual action is selected, the logs in the lower part of the window are presented, e.g. information about the email dispatch.
Using the views of the new/old object, we can view the structure of the saved objects. Data is shown in JSON format.
The Difference view shows the differences between the old and new records.
This data can be used when creating event rules. Records allow access to this data presented here as JSON data. This can be used in checking scripts (e.g. checking the name of the service event status) or in notification templates (email title/content). |
Event rules
To define the system’s response to events, select the 'Event Rules' section. After selecting it, a list of event rules that have been defined in the system is presented. Adding a new rule is done by selecting (+) button.
The event rule definition (or edit) is divided into several sections. The general definition of the event, the preparation script editor and the check script editor.
In the definition of an event rule, we specify the name visible to the system operator, the type of object affected by the event (which object will be processed by the rule). The event type determines the system’s reaction to the event, i.e. whether the action is to be performed when the object is created, changed or deleted. The 'Periodic' option refers to special periodic event responses used by schedulers.
In the text fields of the editor, you can use a special Markdown mechanism for formatting. With its help you can generate clickable links, bold, lists, etc. Search Markdown documentation on the Web to learn about its capabilities. |
Basic data (the 'Email' tab) allows you to enter information about the basic elements of an email message, such as the title, content, and fixed fields of email addresses (from a list of users or a fixed list of any addresses).
Text fields can also use data from objects that are processed. The notation with double parentheses {{}} field_name_object is used for this. To learn about allowed fields, use the documentation in the documentation portal on the Available Events and System Configuration sections.
|
Email addresses can be modified by the preparation script so they do not always have to be entered. Fixed email addresses can apply to notifications that are always sent to a fixed list of recipients. |
The check script allows additional filtering of events not only based on their type (create, edit, delete). The editor allows you to enter JavaScript notation, which can decide whether the script should be executed or not, based on the properties of the object fields. Detailed available fields are described in the documentation available on the documentation portal. Using these rules, we can, for example, make the execution of a script dependent on a specific state of a service event, e.g. send an email only if the event is resolved.
The check function should evaluate to true/false. If the check value is true, the event will be executed. |
The preparation script allows additional modification of message fields. It can be used, for example, to update the list of email addresses based on the data of a specific object. E.g., we can send an email to the person who reported a particular service event, or send an email to the person who created an order if the order was accepted (defined in the check script).
Refer to the detailed documentation on the documentation portal to learn about all editor capabilities and available object fields. |
Event Templates
The application contains an archive of event templates that are available to the user. Event templates allow you to quickly and easily add event rules to the system. Templates contain ready-made event rules that can be customized to your needs. After selecting the button in the event editor, you go to the list of templates. After selecting the Select
button, the given template is entered into the editor fields.
Automation for individual modules
The event view in the configuration section allows you to view all events defined in the system by all users. However, a view has been made available for each module, which allows you to configure events and schedules for a given functional module. This is done by a dedicated lightning bolt button, which is available in the main module views.
Using it, we can access the configuration of events and schedules for a particular module. For the 'Events' module, all events defined in the system are available. For other modules, only the events defined for the module are available.
In order for a user to access the configuration of individual elements (schedule or events), he or she must have the appropriate permissions. If there are no permissions, only the item that is available to the user will be visible after entering the view. Of course, the user must also have permissions to access a particular functional module. |
After selecting an automation action, a window is displayed that allows you to configure individual automation elements.
In the events view, we can add new events and edit already defined events. The available actions in the event view are:
-
Add - adding a new event
-
Activate - event activation, only the active event will be processed by the system
-
Deactivate - deactivation of the event, the event will not be processed by the system
-
History - preview of the history of events from a given module. It allows you to view the data and available event parameters
-
Help - access to help regarding the configuration of events of a specific module
Preview and Edit
Editing or creating a new event displays the event configuration window. In the event configuration window, we can define basic event parameters, such as name, event type, periodicity, and checking and preparation scripts. In this view, it is not possible to change the object that the event concerns. The object is defined at the functional module level.
There is an additional button available in the view, located next to the object name, which displays an additional window with event templates provided by AMAGE. Templates allow you to select and enter rules into the proofreading and preparation script editors. This makes using the module and events much easier for the first time.
Once an event is saved, if it is active, the events are automatically activated and the system responds to new event registrations.
Operation logging and preview
To enable a full view of the events that are logged in the system, an operation logging view is available. The event history shows all events registered in the system. Information about the event, creation date, processing date and expiration date is available. The event status determines whether the event has been ignored, i.e. there are no rules for it, whether it has been executed and its final status.
The event details provide information about the event, creation date, processing date and expiration date. The 'Data' tab provides information about the old and new objects, the difference between them and data in JSON format. Using this data, we can view available fields in records and use them appropriately in scripts.
Detailed information about the operation of machines and events is available in the logs. Using the log viewer, we can view machine operations and progress in event processing.
Detailed log preview allows you to view event logs that have been recorded in the system.