You can configure the handling of various system events in a custom module.
Event handler triggers a specific action in the system after an event has occurred. It can be useful when creating complex modules. For example, a handler can start a business process configured within a module when you have changed some fields in an app item.
The Send message to service activity is available only in ELMA365 on-premises.
To add an event handler:
- Go to Administration > Modules.
- Hover the mouse over the module and click the gear icon.
- Go to the Event handling tab.
- Click +Handler and enter the information in the window that opens.
- Name*. Enter a name for the handler.
- Event domain*. Select an area where the handler will monitor the events:
- All events;
- App items;
The Files domain is available only in ELMA365 on-premises.
- Event*. Select an event after which the handler will be launched. We have listed the events available for each domain below.
- Handler type*. Select an activity which will occur after each event.
- Run script. Executes the generated script;
- Run process. Executes the business process created in the module;
- Send message to service. Sends a messages to an external microservice. This activity is available only in ELMA365 on-premises.
Only processes and scripts created as part of a module can be bound to a handler.
- Click the Save button.
- In the window that opens select a required process, script or microservice.
- To finish the configuration, click Save and Publish.
Each event domain has its list of events, after which the handler will be launched.
For the All events domain:
- All system events.
For the App item domain:
- Add comment to app item;
- Change app item status;
- Create app item;
- Delete app item;
- Update app item.
For the Apps domain:
- App data export;
- App data import.
For the Files domain:
- Add a comment to the file;
- Create file;
- Delete file;
- Change access permissions for the file;
- Modify file.
For the Directories domain:
- Create directory;
- Delete directory;
- Change access permissions for the directory;
- Modify directory.
For the Modules domain:
- Disable module;
- Enable module;
- Install module;
- Update module.
For the Settings domain:
- Change additional parameters.
For the Users domain:
- Authorization failed;
- Authorization success;
- Authentication failed;
- Authentication success;
- Sign out.
Cancel a handler
To disable a handler, go to the Event handling tab, click on the three dots icon and select the Cancel publication option. Now, the handler will not be launched after the execution of an event.
You can also delete a handler. To do this, go to the Event handling tab, check the box next to the handler name and click the Delete button in the upper right corner of the page.
Found a typo? Highlight the text, press ctrl + enter and notify us