consider the following scenario:
we have several aggregates that share a common trait (for example: they belong to the same user) the events of each aggregate are used to materialize its own status.
what if a higher level status is required. that status should represent the overall status of all the user aggregates. consider that there is a special business logic that defines the materialization of the higher level status (for example: if more than x aggregates are in error state, a higher level error status is required on the customer-aggregated state)
this requirement involves materializing over events of multiple aggregates. furthermore, the higher level state is considered as a fact in the sense that it is fully determined by the lower level events. For that reason, it seems that the usage of Saga is inappropriate here.
on the other hand, it is required to issue events when a transition occurs on the higher level state (for example: when more than x aggregates are reporting an error, issue an event that can drive further business logic). so generating events based on other events also seems inappropriate.
What would be the recommended approach here? I can see how a Saga can listen to the lower level aggregate events and transform some of them into commands that go to a higher level entity aggregate, that in turn generates its own events but while taking that route I could not escape the feeling that this event => command => event flow is a ceremony rather than a real design requirement.
thanks for your insights
Jonathan