Designing a custom application event
When you create a custom application event, you must also define what fires the application event. In the current application framework, there are several ways to generate a custom event. You can use these methods:
- Create an event trigger by using the Event Trigger form. This step is the easiest and most common way to define what generates a custom application event.
- Use action type in another event handler.
- Use a form event handler with a response type of Note: Do not confuse the form event handlers with the Application Event System handlers. Form event handlers are limited to operating within specific forms. Application event handlers can be used by any forms or other global objects.
.
- Use the Mongoose API to write a custom script that generates an application event.
- Invoke an IDO Extension Class method that calls the FireApplicationEvent() method.
- Use the Mongoose REST service, IDORequestService/MGRestService.svc.
- Use a SQL stored procedure or trigger to call the PostEventSp stored procedure.
These steps represent a typical process for creating custom application events:
- Optionally, on the Events form, specify the
name of the application event before you define how it should be triggered or
handled. Note: If you do not name the application event on the Events form, you can specify the application event name on the Event Triggers form or the Event Handlers form. However, application events that are named on those forms are not displayed on the Events form.
- On the Event Triggers form, define one or
more triggers that fire the application event. Note: This step is required only if you want to fire the application event by using an event trigger.
- On the Event Handlers form, define one or
more event handlers that execute when the application event fires. Note: Each application event can have multiple handlers that execute when the application event fires. The order in which multiple handlers execute is controlled by a number of factors.
- On the Event Actions form, define one or more event actions for each event handler.
- If required, on the Event Variable Groups form, name and define an initial state for the event handler to use.
- If required, on the Event Global Constants form, name and define any global constants for the event handler to use.
- Test the application event and its triggers and handlers on a test system before implementing them on your live system.