public interface DomainEvent extends Identifiable
They are preferred way of manipulating data instead of simple CUD
operations (create, update, delete).
Unlike aggregate domain event
which is tied to a change in a single
aggregate root
, domain event should be used when an action will result
in modifications to multiple aggregates, external call (like sending an email)
or some other action.
By default event will be applied immediately.
If async
is used, event will be stored immediately but applied later.
DomainEvent is defined in DSL with keyword event
.
module Todo { aggregate Task; event MarkDone { Task task; } }
getURI