Hi guys,
I have a complicated scenario in which two aggregate boundaries sort of contradict each other.
I have 2 Entities: Request and Mission. User creates Requests and later on he can create Missions and assign existing Requests to a Mission.
Requests and Missions can be created independently. In other words, I don't need to have a Mission when creating a Request and vice versa.
So I'm assuming we have 2 different Aggregates here: Request Aggregate and Mission Aggregate, with each Entity being the root of its own Aggregate.
HOWEVER, we have an invariant that violates this assumption: You can Postpone or Cancel a Mission, which causes the Status of all Requests assigned to it to be updated accordingly.
How can I enforce this constraint if Request and Mission are in two different Aggregates? If I put them in the same Aggregate, it's not possible to tell who is the Aggregate Root because each Entity can be created independently.
Any advice?
Mosh