When the Oracle E-Business Suite (EBS) Adapter performs an operation on an Interface Table, Interface View, Concurrent Program, or a Request Set (Coming in the CTP4), it compulsorily sets the application context. To set application context, the adapter calls the FND_GLOBAL.APPS_INITIALIZE API. However, to call this API, the adapter requires three values:
1. User Id
2. Application Id
3. Responsibility Id corresponding to the User Id and Application Id.
The adapter gets the Responsibility Name from the binding, EBS User Name from the binding (or from Client Credentials starting CTP4), and retrieves corresponding id's from the backend to use when initializing application context. As I mentioned, it also needs the application id. For Interface Tables, Interface Views, Concurrent Programs, and Request Sets, the action contains the application short name. The adapter uses this application short name and ignores the value in the binding property ApplicationShortName to get the application id from the back end.
So when is the ApplicationShortName in the binding property used? It is used for setting application context for artifacts which do not have the application short name in their action. This includes PL/SQL APIs, Procedures, Functions, DB Tables, and DB Views. The adapter does not 'know' which application these artifacts belong to (if they belong to one). The adapter does not enforce setting application context for these artifacts, but you can make the adapter set the application context for them by proving the EBS User Name as well as the application short name.
When the adapter sees that the operation is to be performed on a PL/SQL API, Procedure, Function, DB Table, or DB View, if the ApplicationShortName in the binding and the EBS User Name are available, it goes ahead and tries to set the application context. Of course - it requires a valid Responsibility Name in order to be successful.
When (and only when) the application context is being set, the adapter looks at the binding property OracleEBSOrganizationId. If this has been populated, the adapter sets the Organization Id, else it does not.
With CTP4, which is due in some time, we support specifying ApplicationShortName, ResponsibilityName, and OrganizationId using Message Context Properties which provides greater flexibility in choosing responsibility and Org Id, and even override the application short name in the action. That will be the topic of my next post.
Till then, Happy Coding!