The execute method is responsible for handling a COMMAND, which can either result
in an ERROR or a list of EVENT's (can be an empty list). Note: This method is called decide in the decider pattern
Idempotent handling of a COMMAND will result in an empty list of EVENT's
The execute method is responsible for handling a COMMAND, which can either result
in an ERROR or a list of EVENT's (can be an empty list). Note: This method is called decide in the decider pattern
Idempotent handling of a COMMAND will result in an empty list of EVENT's
Parameters:
cmd - the command to handle
state - the state of the aggregate
Returns:
either an ERROR or a list of EVENT's.
Idempotent handling of a COMMAND will result in an empty list of EVENT's