This document explains how to work with Event Handlers and provides a brief overview about it.
The event handlers allow defining the actions to be executed when specific events occur in the workflow system.
Specifically, for each event, you can associate a group of Procedures that will be executed when the event takes place. These Procedures are developed in GeneXus and must receive a specific parameter that represents the occurred event. See more about the requirements of each event type in Event Handler procedure structure.
While modeling, you can associate events handlers in four levels: Knowledge Base, Business Process, Task and Document. These levels of handlers association are described below.
When an event is associated with a handler at Knowledge Base level, this handler will be called whenever an event occurs, regardless in which process or task it occurs.
To associate a handler to an event in Business Process Diagram at knowledge base level, you must go to Knowledge Base Properties > Workflow > Event Handling.
When an event is associated with a handler at Business Process level, this handler will be called whenever an event occurs in an instance of this process, regardless of the task it occurs in.
To associate event handlers at Business Process level, you must open the properties dialog of the business process in question.
When an event is associated to a handler at Task level, this handler will be called whenever an event occurs in an instance of this task.
To associate event handlers at Task level, you must open the properties dialog of the task in question.
It is also possible to associate events handlers to the OnActionPerformed event that occurs when executing an operation with a document.
To associate handlers to this type of events, you must access the documents dialog through the Preferences > Workflow > Documents option of the Knowledge Base Navigator. Then, you must select a document (to which you want to associate event handlers) and press the Events button to access the events dialog.
Configuration of preferences
After you have selected the properties at any level, to associate a Procedure with an event, you must open the Event Handlers dialog and select a Procedure.
Once you have associated a Procedure with the Event, it is necessary to enable it in the GXflow client. To do this, go to Server Settings > Advanced > Event Handling.
Event Handling Property
Event Handler procedure structure