core-java
core-java copied to clipboard
Commander entities require a separate dispatch mechanism
Currently, the entities having commanding methods do not have a separate dispatch mechanism implemented for them.
The only Commander entity, ProcessManager, always returns a List of events for any event/command dispatch. In case the message is dispatched to the commanding method, the ProcessManager just posts the generated commands to the CommandBus and returns empty List<Event>.
We should implement a proper dispatch mechanism for the Commander entities which will not be tied to the command handling (@Assign) logic.