This question is similar to: Does exist application event term in DDD? , but I don't know how to apply the explanations given there to my specific issue.
I have a SearchFilmUseCase
and I want to raise an event FilmSearchedEvent
once it finishes its execution. Currently, the application layer is raising the event. The only manner in which I could raise this event from the Domain is in the FilmRepository
. However, the repository is just an interface, so I can't raise any event there.
I think that raising the event at the application layer is not correct. How can I approach this situation?
One solution could be to create a domain service to perform the search and raise the event.