We have two managed packages. Is there a possibility to let the two packages communicate within one org?
I've seen for example this article, but I was curious if there is any other possibility and a best practice.
Suppose I have a package A that wants to call a method in package B. Package B wants to call a method in package A. Can I for example call the method in B from A with something like Java Reflection? The methods and classes would of course be global. We could also expose the methods as webService. However is there any special limits when you call webServices within the same org? Concerning the same org I only found that there is an unlimited number of callouts. Does the 200 records-per-call limit also apply internally? If there is not big limit, this would be a solution.
Does this make sense at all? Or would you say a common 3rd package with methods to send and receive would be the best alternative? The problem there is that the base package must include all the objects, fields, etc., because otherwise they cannot be passed as parameters via the 3rd package.
Is there a best practice for this case?
Edit: The problem ist that if we have the following architecture: - Package A ---> BasePackage <--- Package B. I can call a BasePackage method from Package A, but how can the BasePackage call a method in Package B then? It does not know any methods from Package B. Is this possible without asynchronous calls?