Or if it is just the data you are interested in, you can retrieve the same in the mediator [assuming that both ProxyA and ProxyB are registered in the same facade] and then send the data as a notification body. This has the advantage of the Command not knowing where the data has come from. So if tomorrow, Proxy A in the command needs to use the data from ProxyC instead of ProxyB, the only change will be in the mediator. This is how the flow should be:
- User dispatches an event
- Mediator retrieves the data from ProxyB and sends a notification with the data in the body
- Command gathers that notification and retrieves the data from the body
- ProxyA uses the information *without* knowing anything about ProxyB
IMO, it's a win-win situation given that you get the data + the loose coupling.
And if ProxyB belongs to a different Facade, I'd recommend having a separate module which manages the flow of data to-n-fro along with data sharing between proxies so as to again facilitate for loose coupling.