Skip to main content
Version: 7.2402.x.x RR

EventDispatcher

The EventDispatcher is used to link a received event with the export of a particular nevisDataPorter module. To receive events, the dispatcher is registered with a set of event sources. The dispatching is then carried out based on a filtering condition.

Configuration

NameType, usage constraints, defaultsDescription
sourcerequired: paraList
default: none
type: list of EventSource
A list of event sources for which the EventDispatcher triggers module export.
modulerequired: paraVal
default: none
type: string
The name of a nevisDataPorter module defined in the export section of the configuration file.
filteroptional: paraVal
default: none
type: boolean
An expression evaluating to a boolean value. It is used to make the export of a module conditional on the runtime configuration.
concurrencyTagoptional: paraVal
default: none
type: string
The concurrency tag can be used to mark a job for serial execution.Jobs run in the order the events are received. Jobs with the same concurrency tag are not allowed to run at the same time. The execution is blocked till the previous job with the same tag is finished.

Example

Dispatch all events from a source to a module:

<eventDispatcher name="dispatch1" type="EventDispatcher">
<dp:paraList name="source"><value>${inst.eventsource}</value></dp:paraList>
<dp:paraVal name="module" value="myModule"/>
<dp:paraVal name="concurrencyTag" value="myTag"/>
</eventDispatcher>

Dispatch all events from a source to a module based on a condition:

<eventDispatcher name="dispatch1" type="EventDispatcher">
<dp:paraList name="source"><value>${inst.eventsource}</value></dp:paraList>
<dp:paraVal name="module" value="myModule"/>
<dp:paraVal name="filter" value="#{rtCfg['meta.entity'] eq 'user'}"/>
</eventDispatcher>