Hi
I would like to publish a (validation)event from within an aggregate without applying it.
I am aware of the EventTemplate class & registerEvent(metaData, payload) method. I am a bit uncertain of which would be the correct means to achieve this.
Using the EventTemplate would mean I would have to wire it into each @CommandHandler method.
I am unsure of the registerEvent method usage, in the source it is noted that the event is published when the aggregate is saved. Does that mean if I am constructing the AR & validation does not succeed, this event would not be published as technically there is no save taking place?
Cheers,
Roscoe