notify method
Fires this event and notifies all registred listeners.
correlationId
(optional) transaction id to trace execution through call chain.args
the parameters to raise this event with. throws an InvocationException if the event fails to be raised.
Implementation
@override
void notify(String? correlationId, Parameters args) {
for (var i = 0; i < _listeners.length; i++) {
try {
var listener = _listeners[i];
listener.onEvent(correlationId, this, args);
} catch (ex) {
throw InvocationException(correlationId, 'EXEC_FAILED',
'Raising event ' + getName() + ' failed: ' + ex.toString())
.withDetails('event', getName())
.wrap(ex);
}
}
}