November 2018
Intermediate to advanced
388 pages
9h 5m
English
PersonCreationEvent is an entity that resides in an entity package, more specifically a domain event. Let's say this event specifies some event information, such as identifying which person has been created:
class PersonCreationEvent(val identifier: UUID)
Now, the event can be created as part of our business logic. In the createIdentity() function, we will create a new event, the PersonCreationEvent class, indicating that a new person record has been created:
@Statelessclass App { @Inject private lateinit var identityCreator: IdentityCreator @Inject private lateinit var identityRepository: IdentityRepository fun createIdentity(inputData: InputData): Identity {
val person = identityCreator.createPerson(inputData) identityRepository ...
Read now
Unlock full access