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 specific parameter that represents the occurred event (more information).
While modeling, you can associate events handlers in four levels: Knowledge Base, business process, task and document. Following you will find the description of these levels of handlers association.
Associating event handlers at Knowledge Base level
When an event is associated to a handler at knowledge base level, this handler will be called whenever an event occurs, regardless the process or task where it occurs.
To associate a handler to an event in Business Process Diagram at knowledge base level, you must first go to knowledge base properties Workflow->Event Handling.
Associating events handlers at business process level
When an event is associated to a handler at business process level, this handler will be called whenever an event occurs, regardless the task where it occurs.
To associate event handlers at business process level you must open the properties dialog of the business process in question.
Associating events handlers at task level
To associate event handlers at task level you must open the properties dialog of the task in question.
Associating events handlers at document level
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
At the gxflow client it must be allowed the following preferences as it show the image below: