camunda.bpm.eventing properties. These are:
camunda.bpm.eventing.skippable is responsible
for the registration of the event listeners. If its value is true, the execution of the listners can be skipped via API or in ASEE Flow Cockpit by activating “skip listners” flag. Otherwise, the listeners are registered as built-in listeners and are executed unconditionally.
Listeners can subscribe to streams of mutable or immutable event objects. The latter of those are particularly useful
in asynchronous listener scenarios - e.g. when using TransactionalEventListener.
The mutable event stream objects can be modified multiple times between the creation and the reception
of the event the listener has asynchronously subscribed to. Immutable event objects reflect the data
at the creation time of the event, regardless of the time they are finally received by the listener.
On the execution event stream, DelegateExecutions (mutable) and ExecutionEvents (immutable) can be received.
The task event stream offers DelegateTasks (mutable) and TaskEvents (immutable).
On the history event stream, only HistoryEvents (mutable) are published.
The following example gives an overview of how process events can be received in Spring beans. In doing so, you can implement task and delegate listeners by
providing Spring beans with annotated methods instead of implementing the TaskListener and ExecutionListener interfaces.
If the method, annotated with
EventListener returns a non-void result, Spring will
throw it as a new event on Spring event bus. This allows to build event handler chains
for processing. For more information on eventing, please consult the Spring manual.Specifying event type
Spring allows to specify the event delivered to the listener by providing a SpEL condition in the@EventListener annotation. For example, you could register a listener for a task event fired by
creating of the user task with a specific task definition key. Here is the code example:
Ordering event listeners
Event listeners for the same event type can be executed in a specified order. To do so, provide anOrder annotation
to the event listener: