Aggregate independent commands
Hi there,
is it possible to send and handle commands that are not related to a aggregate?
As ICommand<Aggregate, …> and ICommandHandler<Aggregate, …> both require aggregate types, it seems impossible.
Sincerely,
Nolde
Commands are currently only for aggregates in EventFlow. If you want to use commands for something else you could take a look at https://github.com/BrighterCommand/Brighter (i haven't used it myself though).
Thanks a lot for your quick reply.
In general i'm happy with aggregate bound commands.
But aside of those, i have to deal with some work that does not refer to aggregates. So I am looking for a solution based on event flow, as this is the framework of my choice and i do not want to have a second command execution framework in my application.
Maybe there's an implementation scenario for such a requirement that brings additional value for your framework.
Sincerely,
Nolde
That's maybe related to issue https://github.com/eventflow/EventFlow/issues/181
I would make sense to loosen up the restrictions a bit. I do try make sure that EventFlow doesn't impose too many limits on how you would like to implement your domain.
We have a maybe a another use case in combination with sagas.
Right now we sometimes use direct updates on the sagas using the new method you expose on the sagastore. However these are all use cases in which we would rather send a command to the Saga in the same way as we send them to Aggregates.
So basically there would be three different cases the command bus would handle
- Commands for aggregates (find handler, pass aggregate via the update on aggregate store)
- Commands for sagas (find handler, pass saga via the update on saga store)
- Commands for everything else (find handler, execute)
For the important part is that a clear implementation can be found, one that doesn't have to "forced" into the code base.
These 3 types of commands are exactly what I need. Thank you, I appreciate your efforts.
Hello there!
We hope you are doing well. We noticed that this issue has not seen any activity in the past 90 days. We consider this issue to be stale and will be closing it within the next seven days.
If you still require assistance with this issue, please feel free to reopen it or create a new issue.
Thank you for your understanding and cooperation.
Best regards, EventFlow
Hello there!
This issue has been closed due to inactivity for seven days. If you believe this issue still needs attention, please feel free to open a new issue or comment on this one to request its reopening.
Thank you for your contribution to this repository.
Best regards, EventFlow