Table of contents


Official Content

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.

Associating event handlers at Knowledge Base level

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.

EventHandling_png

Associating event handlers at Business Process level

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.

EventHandling3_png

Associating event handlers at Task level

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.

EventHandling4_png

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.

EventHandling5_pngConfiguration 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.

EventHandling2_png

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.

EventHandling6_png

See Also

Event Handling Property
Event Handler procedure structure

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant