Domain Commands
Implementing the Domain Change Requests Actions
First, let's implement all the Domain Commands: domain commands are all commands related to an Aggregate and generating events after the approval.
In Evento Framework every Domain Command implement the class com.evento.common.modeling.messaging.payload.DomainCommand
and needs the getAggregateId()
method implementation. Thath method returns the Unique Aggregate Identifier used to compute the Aggregate State of the Event Sourcing Pattern. Then you have to specify every single required information as a field.
Every single AggregateId in the System must be different you cannot use the same ID in different aggregate Types.
Usually, the Resource Identifier (in this case the TodoList Id) is used as an aggregate identifier, and, during the generation, a prefix to identify the aggregate type.
Last updated