Hi,
I want so send several commands in forEach like:
commands.forEach(command -> {
try {
commandGateway.send(command);
} catch (Exception e) {
LOG.error(“Could not decrease amount”, e);
}
});
I have a check in the command handler and it thows an exception if an use case does not fulfilled the requirements,
So that can happen in one the commnands, therefore the others commands should not be executed, the events should not be applied.
I don’t want to rollback the events or something, it is possible to create only the events, if the complete list does not throw an exception?
How I solve this? Does Axon provide something for this use?