I have the following scenario:
- I send a command from my service impl to the persistent entity
- If the command contains certain state, depending on that state I call various external services that return Future(Foo) (not a lagom microservice)
- Based on the result of the external call, I need to persist some events/update read model via ReadSideProcessor.
According to various internet sources, I’m not supposed to perform asynchronous web service calls from my persistent entity. The entity should only work on local data that is provided to it by a command.
What should be the ideal place to put my web service calls then?