Grouping aggregate domain events

If I have, let’s say 5 commands that can be injected into command bus randomly, is there any way to know when the last event handler had been executed?
It’s like to group the domain events of the same aggregate into an atomic unit, so it would be posible for me to notify the user that an entire action was performed successfully.

In my scenario, user can edit an asset, and change it’s name, description, typology, and then click “Apply” button. Then old asset is compared to new one, and for each change the command is created (UpdateAssetNameCommand, UpdateAssetTypologyCommand, etc). When all of those commands had been executed, I want to notify the user that the asset had been updated successfully.

Thanks.

Hi,

currently, there is no built-in support for batched commands. However, you could create a Callback in the style of the FutureCallback that waits for multiple commands instead of just one.
Alternatively, you could create a single command that wraps multiple others.

Cheers,

Allard