Search Results

Event Handlers

Event handlers are used to overcome issues with interruptive and blocking activities.

Blocking activities contain a job that has to wait until a certain activity is executed. When using blocking activities, all events have to be handled in the order the process was designed. However, it is not possible to design a process without knowing when a message will be received. A shopping cart is a good example of a process where adding and removing items is done in a random order by the shopper.

Event handlers allow asynchronous event processing. They are always attached to a scope and execute parallel to the main business logic of the process, so they are associated with an operation that is a part of the process.

Each event handler is associated with one process and has access to that process. An event handler can be executed multiple times during the process execution.

Event handlers can be defined on two different levels:
  • Process level - When defined on the process level, it cancels the job.
  • Scope level - When defined on the scope level, it typically cancels the scope. Instead, it can be configured to timeout.