Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Okay, it seems I don't understand DomainEvents purpose correctly. From what you say and from then link you provided it seems that actually I can: in response to domain event of one aggregate root I can (within same transaction!) do whatever I want with other aggregate root (same or different type, in my case different). So I could just Conference.setCurrentEdition(guid) => CurrentEditionSetDomainEvent => in response to this event load editon aggregate to check if it's published or not and if not then raise exception which would rollback whole transaction? Commented Feb 13, 2021 at 21:19
  • And this is perfect question where my knowledge ends. I will keep monitoring this thread, because I want to find answer myself. Commented Feb 14, 2021 at 6:33
  • 1
    I asked question that may help: softwareengineering.stackexchange.com/questions/422238/… Commented Feb 14, 2021 at 7:09
  • Please see my last edit: this is how I imagine domain services could work - what do you think? Essentialy it does exactly the same as raising exception in response to domain event, but it allows to organise domain service to be defined in domain logic and passed to aggregate from outside so in the end I think it does not break DDD principles (at least it pretends not to :). Commented Feb 14, 2021 at 11:35