Trying to apply Uncle Bob’s clean architecture to an application I’m maintaining and I’m having difficulties with use cases and duplication/reuse. It’s my understanding that usecases should be self contained and that duplication is to be expected but this does not seem to make sense with what I’m dealing with. I feel there are multiple use cases that should end up using other use cases.
Here is a very simplified example of 4 use cases that exist separately but that are also dependent on each other in the following way.
BulkSendUsersToUnit SendUserToUnit AddUserToMandatoryGroups AddUserToGroup
Each of them have validation, repository calls and conditions that always apply. Basically if I was doing this with services they would simply be methods that I would call from where I need them.
Can I/should I inject use cases in other use cases using DI?
What am I missing here?