This article describes how to initialize an Oracle E-Business Suite "Application Context" (and optionally a "Policy Context") in an AtomSphere Process before accessing E-Business Suite's PL/SQL API's. This applies to EBS versions 12.1.3+.
Get the example process used below from the Process Library here.
- Use Case
- 1. Create "FND_GLOBAL.APPS_INITIALIZE" Operation
- 2. Optionally Create "MO_GLOBAL.SET_POLICY_CONTEXT" Operation
- 3. Add additional EBS "Application-Module" API Operations
- 4. View Completed Process with Results in E-Business Suite
The Boomi Oracle E-Business Suite Connector allows customers to "execute" both PL/SQL and Concurrent Program Interfaces in an instance of EBS. With the connector, customers can perform native "Application-Integration" (i.e. direct updates via application-module API's) typically performed in the past by a customer's PL/SQL specialists. Access to these interfaces which directly insert, update or query data from an EBS instance "usually" requires the initialization of an "Application Context", and also many times a "Policy Context".
This applies only to PL/SQL API access as compared to the more traditional EBS style of "Data-Integration" which does not have this requirement (i.e. OIT data staging which is performed via the Boomi Oracle Database Connector).
These "Context(s)" are initialized by executing specific "non-application-module" PL/SQL Interface(s) to initialize some "global" session data prior to executing any of the "application-module" API's. The "Context(s)" are then active for any subsequent API executions.
Here's an example of how to set these EBS "Application and Policy Contexts".
1. Create "FND_GLOBAL.APPS_INITIALIZE" Operation
1.1. Import the FND_GLOBAL.APPS_INITIALIZE" API via the E-Business Suite Connector
The example below shows a Boomi process where the second shape is an Outbound Connection using the Oracle E-Business Suite Connector to execute a function named: "FND_GLOBAL.APPS_INITIALIZE" which sets the "application context" for integrating with EBS.
"FND_GLOBAL.APPS_INITIALIZE" (from the EBS APPLICATION OBJECT LIBRARY Package) is used for initializing the session before calling many public APIs in Oracle E-Business Suite. It's not required for all the APIs but is recommended you set this profile before making any calls to a public APIs.
"FND_GLOBAL.APPS_INITIALIZE" requires users to set the following parameters:
- WHO" you are (your user ID)"
- What your "RESPONSIBILITIES" are (i.e. Project Billing Super User)
- ID of the "APPLICATION" you want to access (i.e. Project Accounting).
- Optionally: the user's "SECURITY GROUP" (using the system default in this example)
After execution, the data set by initializing the Application Context is validated by the various application APIs to determine if you have the right to execute them.
This API is accessed via the Boomi Oracle E-Business Suite Connector which connects to an EBS Instance and imports the APIs as a new operation.
Here's an example of importing the "FND_GLOBAL.APPS_INITIALIZE" object within the E-Business Suite Connector Operation:
1.2. Checking "Maintain Session" in the new Operation
After importing the EBS "FND_GLOBAL.APPS_INITIALIZE" API, the "Maintain Session" box needs to be checked so that any subsequent EBS API calls in the process are all within the same "Application Context".
Example – Setting the "Maintain Session" option in the Boomi "FND_GLOBAL_APPS_INITIALIZE" Operation:
1.3. Setting the "FND_GLOBAL_APPS_INITIALIZE" Operation Parameters for User ID, User Responsibility, and Application ID
You then need to set the API parameters specifying who you are (USER_ID), what responsibilities (RESP_ID) you have and what application (RESP_APPL_ID) you"re working on before executing an API (i.e. most EBS PL/SQL APIs defined in the SOA Repository implement "Functional Security") for the specified application.
In this example I chose to make them Process Properties. They would typically also be declared as Extensions, along with the EBS Connection fields.
Next, configure three Parameters USER_ID, RESP_ID and RESP_APPL_ID on the "FND_GLOBAL_APPS_INITIALIZE" Connector shape, retrieving the values from the corresponding Process Properties defined above.
2. Optionally Create "MO_GLOBAL.SET_POLICY_CONTEXT" Operation
2.1. Import the "MO_GLOBAL.SET_POLICY_CONTEXT" API via the E-Business Suite Connector
The third shape in the example is an Outbound Connection using the Oracle E-Business Suite Connector to execute a function named: "MO_GLOBAL.SET_POLICY_CONTEXT" which set the "Policy Context" for integrating with EBS.
"MO_GLOBAL SET_POLICY_CONTEXT" (from the EBS MULTI ORG / MOAC LIBRARY Package) is used for initializing a "Policy Context" (for entitlements) after an "Application Context" is initialized. Again, it's not required for all the APIs (usually just some API's which perform updates), but it's recommended that you set this profile before making any calls to either private or public APIs.
Oracle EBS r12+ includes an updated architecture to support "Multi-Org Access Control" (MOAC). This architecture requires users to initialize a "Policy Context" where they must specify the specific (or multiple) operating unit(s) to which their "User Responsibility" rights extends (i.e. the responsibility code specified in the prior call to "FND_GLOBAL.APPS_INITIALIZE").
Various APIs in the r12+ releases perform internal queries substituting data from the "Policy Context" as "SQL WHERE clause" values. For example, the "PA_PROJECT_PUB_UPDATE" function will only select matching project records where the project's ORG_ID equals the ORG_ID parameter initialized in the "policy context". This requires initializing the "policy context" with the user's "operation unit" (ORG ID) prior to calling "some" application APIs (like Project Update).
As with the prior example, this API is accessed via the Boomi Oracle E-Business Suite Connector which connects to an EBS Instance and imports the APIs as a new Boomi operation.
Below is example of searching then importing the EBS "MO_GLOBAL SET_POLICY_CONTEXT" API via the E-Business Suite Connector. Note: select "Any Module" for Module Type, and enter "POLICY" as the filter value in order to find the API Function with the Connector):
2.2. Checking "Maintain Session" in the new Operation
IMPORTANT: (as before in the APPS_INITIALIZE operation) after importing the EBS "MO_GLOBAL SET_POLICY_CONTEXT" the "Maintain Session" box needs to be checked (as in the previous shape) so that any subsequent EBS API calls in the process are all within the same "Application and Policy Context".
Example – Setting the "Maintain Session" option in the Boomi "MO_GLOBAL SET_POLICY_CONTEXT" Operation:
2.3. Setting the "MO_GLOBAL SET_POLICY_CONTEXT" Operation Parameters for Access Mode, and Organization ID
You then need to set at least two API parameters specifying: the ACCESS MODE ("S" for single org or "M" for multi), and the ORG ID(S) to which the user's responsibilities (as defined in the prior APP INITIALIZE Function) extend to.
Best practices is to define and set default values for the required parameters as "Process Properties" as follows
Next (see image below) two parameters: P_ACCESS_MODE, P_ORG_ID are defined for the "MO_GLOBAL SET_POLICY_CONTEXT" connector shape, and are then mapped to the corresponding "Process Properties" defined above.
3. Add additional EBS "Application-Module" API Operations
The below example includes calls to both "PA_PROJECT_PUB CREATE_PROJECT", and "PA_PROJECT_PUB UPDATE_PROJECT". Both of the API's require the earlier call to "FND_GLOBAL APPS_INITIALIZE" to set the global application context session data. Specifically the project update API ("PA_PROJECT_PUB UPDATE_PROJECT") requires the call to "MO_GLOBAL SET_POLICY_CONTEXT" to find the correct project data due to its MOAC requirements.
Remember to check "Maintain Session" for all of the "Application-Module" API calls as below in the "PA_PROJECT_PUB CREATE_PROJECT" operation.
4. View Completed Process with Results in E-Business Suite
Process Results: below is a successful execution of a Boomi Process that both adds and updates EBS Project Accounting Data via separate API's in the same process after initializing "Application and Policy Contexts" (and maintaining the session throughout the process).
All data for any new Projects (i.e. "POC Project 19482" from above sample) along with any project updates is validated by the EBS Project APIs and is directly added/updated and visible in EBS (no user concurrent request processing required).
Here's the newly created project in Oracle EBS:
Setting the Context(s) are the key elements in using the E-Business Suite API's. Beyond the Context requirement the biggest hurdle in using the API's is their requirements for specific data elements in the API requests which are not always obvious in the documentation, nor in any exception message you may receive from EBS. Working with the API's sometimes take some time to master, but they offer a powerful alternative to traditional data integration techniques which can typically be more labor intensive.
It's a matter of choice.