HowTo: Working With Event Handlers

Unofficial Content
This documentation is valid for:

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.

kb_properties_wkf            

event_handlers_wkf

Associating events handlers at business process leve

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.

bpd_event_properties_wkf

Associating events handlers at task level

To associate event handlers at task level you must open the properties dialog of the task in question.

task_event_prop_wkf

proc_evn_wkf

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.

docum_evn_wkf

docum_evn_prop_wkf

Configuration of preferences

At the gxflow client it must be allowed the following preferences as it show the image below:

config_evn_cliente_wkf