Oracle® Application Server Adapter for Oracle Applications User's Guide
10g Release 2 (10.1.2) B16498-02 |
|
Previous |
Next |
OracleAS Adapter for Oracle Applications use interface tables to insert and update data in Oracle Applications, and uses views to retrieve data from Oracle Applications.
This chapter describes the following interfaces:
OracleAS Adapter for Oracle Applications use interface tables to insert data in Oracle Applications. For example, by using interface tables, you can insert a purchase order into Oracle Applications to generate the sales order automatically. Data is never loaded directly into Oracle Applications base tables. Instead, data is first loaded into interface tables, and then Oracle-supplied concurrent programs move data from interface tables to base tables. This ensures that all business logic and processing is handled using Oracle components.
This section contains the following topics:
OracleAS Adapter for Oracle Applications use open interface tables to integrate with Oracle Applications through direct database access. The OracleAS Adapter for Oracle Applications inserts data into the open interface tables. These interface tables can be used only for insert operations and support only an inbound connection into Oracle Applications.
Interface tables are intermediate tables into which the data is inserted first. Once the data gets inserted into the interface tables, the data is validated, and then transferred to the base tables. Base tables are real application tables that reside in the application database. The data that resides in the interface tables is transferred to the base tables using concurrent programs. A concurrent program is an instance of an execution file, along with parameter definitions and incompatibilities. Concurrent programs are scheduled in Oracle Applications to move data from interface tables to base tables. These programs perform the application-level checks and run validation before inserting data into base tables.
This section describes how to configure the OracleAS Adapter for Oracle Applications to use interface tables. It includes the following topics:
The prerequisites to configure interface tables include the following:
Define primary keys on all the interface tables being used
Define parent-child relationships among all the interface tables used.
This section describes the steps to configure OracleAS Adapter for Oracle Applications using the Adapter Configuration Wizard in Oracle JDeveloper. It includes the following topics:
To create a new BPEL project:
Open JDeveloper BPEL Designer.
From the File menu, select New. The New Gallery dialog box is displayed.
Select All Items from the Filter By list. This displays a list of available categories.
Expand the General node, and then select Projects.
Select BPEL Process Project from the Items list, as shown in Figure 2-1.
Figure 2-1 Creating a New BPEL Process Project
Click OK. The BPEL Process Project dialog box is displayed.
In the BPEL Process Name field, enter a descriptive name. For example, InsertSalesOrder
.
From the Template list, select Asynchronous BPEL Process. Keep the default selection for Use Default in the Project Content section, as shown in Figure 2-2.
Figure 2-2 Specifying a Name for the New BPEL Process Project
Click OK. A new asynchronous BPEL process, with the required source files including bpel.xml
, InsertSalesOrder.xml
, and InsertSalesOrder.wsdl
, is created, as shown in Figure 2-3.
This section describes how to add a partner link to your BPEL process. A partner link defines the link name, type, and the role of the BPEL process that interacts with the partner service.
To add a partner link:
Drag and drop PartnerLink into the border area of the process diagram. The Create Partner Link dialog box is displayed.
Click Define Adapter Service in the WSDL Settings section. The Adapter Configuration Wizard is displayed.
Click Next. The Adapter Type dialog box is displayed.
Select Oracle Applications to specify the adapter you want to configure, as shown in Figure 2-4.
Figure 2-4 Selecting OracleAS Adapter for Oracle Applications
Click Next. The Service Name dialog box is displayed.
Enter the following information:
In the Service Name field, enter a service name.
In the Description field, enter a description for the service. This is an optional field. The Service Name dialog box is displayed, as shown in Figure 2-5.
Click Next. The Service Connection dialog box is displayed.
Enter the Java Naming and Directory Interface (JNDI) name in the Database Server JNDI Name field. The JNDI name acts as a placeholder for the connection used when your service is deployed to the BPEL server. This enables you to use different databases for development and later production.
Figure 2-6 shows how to create a new database connection.
Figure 2-6 Creating a New Database Connection
Click New to define a database connection. The Create Database Connection Wizard is displayed.
Note: You need to connect to the database where Oracle Applications is running. |
Enter the following information in the Type dialog box:
In the Connection Name field, specify a unique name for the database connection.
From the Connection Type list, select the type of connection for your database connection.
The Type dialog box is displayed in Figure 2-7.
Figure 2-7 Specifying the Connection Name and Type of Connection
Click Next. The Authentication dialog box is displayed.
Enter information in the following fields:
In the UserName field, specify a unique name for the database connection.
In the Password field, specify a password for the database connection.
Click Next. The Connection dialog box is displayed.
Enter information in the following fields:
From the Driver list, select Thin.
In the Host Name field, specify the host name for the database connection.
In the JDBC Port field, specify the port number for the database connection.
In the SID field, specify a unique SID value for the database connection.
The Connection dialog box is displayed, as shown in Figure 2-8.
Figure 2-8 Specifying the New Database Connection Information
Click Next. The Test dialog box is displayed.
Click Test Connection to determine whether the specified information establishes a connection with the database.
Click Next. The Service Connection dialog box is displayed, providing a summary of the database connection.
Click Finish to complete the process of creating a new database connection.
Once you have completed creating a new connection for the service, you can add an interface table by browsing through the maps available in Oracle Applications.
Click Next in the Service Connection dialog box. The Operation dialog box is displayed.
Note: If you are connecting to a pre-11.5.10 Oracle Applications instance, then you would be required to select the interface to Oracle Applications data. Select Tables/Views/APIs/Concurrent Programs to proceed. |
Click Get Object to open the Oracle Applications Module Browser. Figure 2-9 shows the Oracle Applications Module Browser.
Figure 2-9 Adding a Table from the Oracle Applications Module Browser
Oracle Applications Module Browser includes the various product families that are available in Oracle Applications. For example, Applications Technology or Order Management Suite are product families in Oracle Applications. The product families contain the individual products. For example, Order Management Suite contains the Order Management product. The product contains the business entities associated with the product. For example, the Order Management product contains the Sales Order business entity.
Business entities contain the various application modules that are exposed for integration. These modules are grouped according to the interface they provide. Tables can be found under the OpenInterfaces category.
Select a table, and then click OK.
Note: You can also search for a table by entering the name of the program in the Object Name field. Select the Tables check box, and then click Search. |
The table is added to the Operation Objects. Repeat steps 2 and 3 to add more tables.
Click Next in the Operation dialog box. The Operation Type dialog box is displayed.
Select Perform an Operation on a Table, and then select Insert or Update, as shown in Figure 2-10.
Note: You can only insert data into the interface tables even though the Delete and Select options are enabled. |
Figure 2-10 Selecting the Type of Operation
Click Next. The Select Table screen is displayed.
Select the root database table in the Select Table screen, which displays the tables that have been previously imported in this JDeveloper project (including tables that were imported for other partner links). This enables you to reuse configured table definitions in multiple partner links. Figure 2-11 shows selecting a root table.
Note: If the required root database table for the operation is not imported, then click Import Tables. In addition, you can reimport a table and overwrite the previously configured table definition. However, in this case, you will lose any custom relationships that you may have defined on that table as well as anyWHERE clause if a root table is imported.
|
Click Next. The Define Primary Keys screen is displayed.
Select the primary key fields, as shown in Figure 2-12. You can also select multiple fields.
Click Next. The Relationships screen is displayed.
Click Create Relationship to define a new relationship. The Create Relationship dialog box is displayed.
Note: If foreign key constraints between tables already exist in the database, then two relationships are created automatically while importing tables. One of the relationships is 1:M relationship from the source table, which is the table containing the foreign key constraints, to the target table. The other relationship is a 1:1 back pointer from the target table to the source table. |
Specify the following information to create a new relationship:
Select the parent and child tables.
Select the mapping type (1:M, 1:1, or 1:1 with Foreign Key on Child Table).
Associate the foreign key fields to the primary key fields.
Enter a name for the relationship you are creating. It is optional to specify a name. By default, a name is generated for the relationship.
Note: You can select only those tables as parent tables that can be accessed from the root table. |
The Create Relationship dialog box is displayed in Figure 2-13.
Figure 2-13 Defining Relationships Between Parent and Child Tables
Click OK. The Relationships screen is displayed.
Click Next, and then click Finish to complete the process of configuring OracleAS Adapter for Oracle Applications.
After adding and configuring the partner link, the next task is to configure the BPEL process.
Drag Invoke from the Component palette and drop it at the location where you want to insert the invoke activity in your BPEL process, as shown in Figure 2-14.
The Edit Invoke dialog box is displayed.
Double-click Invoke in the process map to open the Invoke dialog box. The General tab is selected by default. Figure 2-15 shows the Invoke dialog box.
Figure 2-15 Configuring the Invoke Activity
In the Partner Link box, select the partner link to invoke. This is the partner link that you configured in the previous section.
Click the Create icon next to the Input Variable field. Enter a descriptive name for the variable in the Create Variable dialog box that appears. You can also accept the default name. Click OK. Figure 2-16 shows the Create Variable dialog box.
In the Invoke dialog box, click Apply, and then click OK.
The next task is to add an Assign activity to the process map. This is used to provide values to the input variables. The following steps discuss this task:
Drag and drop the Assign activity to the process map. The Assign activity must be dropped in between the Receive and Invoke activities. Figure 2-17 shows the Assign activity after it has been added to the process map.
You now need to configure the Assign activity. Double-click the Assign activity in the process map.
The Assign dialog box is displayed. The Copy Rules tab is displayed by default. Click Create.
The Create Copy Rule dialog box is displayed. In the To group, expand the Variables node by clicking the plus sign next to it, and then select Expression from the From group to assign values to the input variables. Figure 2-18 shows assigning values to the input variables.
Figure 2-18 Assigning Values to Input Variables
After assigning values to the input variables, click OK.
Select Make from the Run menu or press Ctrl+F9 to compile the BPEL process to check for errors. The compilation result is displayed.
After designing the BPEL process, the next step is to deploy, run, and monitor it. This section discusses the following:
You need to deploy the BPEL process before you can run it. The BPEL process is first compiled, and then deployed to the BPEL server. The following steps discuss deploying the BPEL process to a BPEL server:
Select the BPEL project in the Applications window.
Right-click the project name. Select Deploy from the menu that appears.
Select Local BPEL Server followed by Deploy to Default Domain, if you are deploying the process on the local BPEL server. Figure 2-19 illustrates deploying a BPEL process to a local BPEL server.
Note: You can select Invoke Deployment Tool if you want to deploy to a different BPEL server. |
The Password Prompt dialog box appears. Enter the password for the default domain in the Domain Password field. Click OK. Figure 2-20 shows the Password Prompt dialog box.
Figure 2-20 Specifying the Domain Password
The BPEL process is compiled and deployed. You can check the progress in the Messages window. Figure 2-21 shows the Messages window.
Once the BPEL process is deployed, it can be seen in the BPEL console. You can manage and monitor the process from the BPEL console. You can also test the process and the integration interface by manually initiating the process. The following steps discuss manually initiating and monitoring the BPEL process:
To open the BPEL Console, click Start, and then select Programs. In the Programs menu, select Oracle - ORACLE_HOME, Oracle BPEL Process Manager 10.1.2, and then select BPEL Console.
The BPEL console login screen is displayed. Select Default in the Domain box. Enter the password for the default domain in the Password field, and then click Login. Figure 2-22 shows the BPEL console login screen.
Oracle BPEL console is displayed. The list of deployed processes is shown under Deployed BPEL Processes. Figure 2-23 shows the BPEL console screen.
Click the BPEL process that you want to initiate. The Initiate page is displayed. Enter the input values required by the process.
Click Post XML Message to initiate the process.
The BPEL process is now initiated. You can check the process flow by clicking the Visual Flow icon. Figure 2-24 shows the BPEL Console Initiate page.
The audit trail provides information about the steps that have been executed. You can check the audit trail by clicking the Audit Instance icon.
Note: To confirm that the records have been written into the open interface tables, you can write the SQLSELECT statements and fetch the results showing the latest records inserted into the open interface tables. Alternatively, open the forms of the module for which the record has been inserted, and then check for changes in the form.
|
OraclesAS Adapter for Oracle Applications uses views to retrieve data from Oracle Applications. For example, by using views, you can retrieve information about your customers from the required tables in Oracle Applications.
This section contains the following topics:
OracleAS Adapter for Oracle Applications uses views to retrieve data from Oracle Applications. Views allow only simple definition. By using views, you can get synchronous data access to Oracle Applications. In OracleAS Adapter for Oracle Applications, views are created on base tables as well as interface tables. These views can be used only for select operations.
In the Oracle Applications 11.5.10 release, you cannot work on multiple views. A work around to address this would be to create a view that spans multiple views.
This section contains the design-time concepts for views. It contains the following topics:
You need to define a uniqueness criteria, which could be a single key or composite keys.
This section describes the steps to configure OracleAS Adapter for Oracle Applications using the Adapter Configuration Wizard in Oracle JDeveloper. It includes the following topics:
To create a new BPEL project:
Open JDeveloper BPEL Designer.
From the File menu, select New. The New Gallery dialog box is displayed.
Select All Items from the Filter By list. This displays a list of available categories.
Expand the General node, and then select Projects.
Select BPEL Process Project from the Items list, as shown in Figure 2-25.
Figure 2-25 Creating a New BPEL Process Project
Click OK. The BPEL Process Project dialog box is displayed.
In the BPEL Process Name field, enter a descriptive name, for example, SelectCustomer
.
From the Template list, select Asynchronous BPEL Process. Keep the default selection for Use Default in the Project Content section, as shown in Figure 2-26.
Figure 2-26 Specifying a Name for the New BPEL Process Project
Click OK. A new asynchronous BPEL process with the required source files including bpel.xml
, SelectCustomer.xml
, and SelectCustomer.wsdl
is created, as shown in Figure 2-27.
This section describes how to create an OracleAS adapter for the application service by adding a partner link to the BPEL process. A BPEL partner link defines the link name, type, and the role of the BPEL process that interacts with the partner service.
To add a partner link:
Drag and drop PartnerLink into the border area of the process diagram. The Create Partner Link dialog box is displayed.
Click Define Adapter Service in the WSDL Settings section. The Adapter Configuration Wizard is displayed.
Click Next. The Adapter Type dialog box is displayed.
Select Oracle Applications to specify the adapter you want to configure, as shown in Figure 2-28.
Figure 2-28 Selecting OracleAS Adapter for Oracle Applications
Click Next. The Service Name dialog box is displayed.
Enter the following information:
In the Service Name field, enter a service name.
In the Description field, enter a description for the service. This is an optional field. The Service Name dialog box is displayed, as shown in Figure 2-29.
Click Next. The Service Connection dialog box is displayed.
Enter the Java Naming and Directory Interface (JNDI) name in the Database Server JNDI Name field. The JNDI name acts as a placeholder for the connection used when your service is deployed to the BPEL server. This enables you to use different databases for development and later production.
Figure 2-30 shows how to create a new database connection.
Figure 2-30 Creating a New Database Connection
Click New to define a database connection. The Create Database Connection Wizard is displayed.
Note: You need to connect to the database where Oracle Applications is running. |
Enter the following information in the Type dialog box:
In the Connection Name field, specify a unique name for the database connection.
From the Connection Type list, select the type of connection for your database connection.
The Type dialog box is displayed in Figure 2-31.
Figure 2-31 Specifying the Name and Type of Connection
Click Next. The Authentication dialog box is displayed.
Enter information in the following fields:
In the UserName field, specify a unique name for the database connection.
In the Password field, specify a password for the database connection.
Click Next. The Connection dialog box is displayed.
Enter information in the following fields:
From the Driver list, select Thin.
In the Host Name field, specify the host name for the database connection.
In the JDBC Port field, specify the port number for the database connection.
In the SID field, specify a unique SID value for the database connection.
The Connection dialog box is displayed in Figure 2-32.
Figure 2-32 Specifying the New Database Connection Information
Click Next. The Test dialog box is displayed.
Click Test Connection to determine whether the specified information establishes a connection with the database.
Click Next. The Service Connection dialog box is displayed, providing a summary of the database connection.
Click Finish to complete the process of creating a new database connection.
Once you have completed creating a new connection for the service, you can add a view by browsing through the maps available in Oracle Applications.
Click Next in the Service Connection dialog box. The Operation dialog box is displayed.
Note: If you are connecting to a pre-11.5.10 Oracle Applications instance, then you would be required to select the interface to Oracle Applications data. Select Tables/Views/APIs/Programs to proceed. |
Click Get Object to open the Oracle Applications Module Browser. Figure 2-33 shows the Oracle Applications Module Browser.
Figure 2-33 Selecting a View from the Oracle Applications Module Browser
Select a view, and then click OK.
Note: You can also search for a view by entering the name of the program in the Object Name field. Select the Views check box, and then click Search. |
The view is added to the Operation Objects section. Repeat steps 2 and 3 to add more tables.
Click Next in the Operation dialog box. The Operation Type dialog box is displayed.
Select Perform an Operation on a Table, and then select Select, as shown in Figure 2-34.
Note: You can perform only the Select operation on views. |
Figure 2-34 Selecting the Type of Operation
Click Next. The Select Table screen is displayed.
Select the required database table, and then click Next. The Define Primary Keys screen is displayed.
Select the primary key fields. You can also select multiple fields to define primary keys.
Click Next. The Relationships screen is displayed.
Click Next. The Object Model dialog box is displayed, which shows the object models that are created from the imported table definitions, including any relationships that you may have defined. Figure 2-35 shows the Object Model dialog box.
Click Next. The Define WHERE Clause dialog box is displayed. If your service contains a SELECT
query, then you can customize the WHERE
clause of the SELECT
statement.
Click Add to add a new parameter. The Parameter Name dialog box is displayed.
Enter a name for the new parameter, and then click OK.
Click Edit to create an expression. The Expression Builder is displayed.
Click Add to create a TopLink expression, as shown in Figure 2-36.
Click Edit. The Choose screen is displayed.
Select the required attribute, and then click OK.
Select Parameter in the Second Argument section, as shown in Figure 2-37.
Figure 2-37 Selecting the Required Attributes
See Also: ÒUnderstanding descriptors - Building Expressions in the Oracle TopLink documentation for more information about configuring expressions using the Expression Builder, refer to the following information:
|
Click OK. The Define WHERE Clause dialog box is displayed with the selected values.
Click Next. The Finish screen is displayed.
Click Finish. The Create Partner Link dialog box is displayed.
Click OK. The new BPEL process is created, as shown in Figure 2-38.
After adding and configuring the partner link, the next task is to configure the BPEL process.
Drag Invoke from the palette and drop it at the location where you want to insert the invoke activity in your BPEL process, as shown in Figure 2-39.
The Edit Invoke dialog box is displayed.
Double-click Invoke in the process map to open the Invoke dialog box. The General tab is selected by default. Figure 2-40 shows the Invoke dialog box.
Figure 2-40 Configuring the Invoke Activity
In the Partner Link box, select the partner link to invoke. This is the partner link that you configured in the previous section.
Click the Create icon next to the Input Variable field. Enter a descriptive name for the variable in the Create Variable dialog box that appears. You can also accept the default name. Click OK. Figure 2-41 shows the Create Variable dialog box.
In the Invoke dialog box, click Apply, and then click OK. The BPEL process is configured.
The next task is to add an Assign activity to the process map. This is used to provide values to the input variables. The following steps discuss this task:
Drag and drop the Assign activity to the process map. The Assign activity must be dropped in between the Receive and Invoke activities. Figure 2-42 shows the Assign activity after it has been added to the process map.
You must now configure the Assign activity. Double-click the Assign activity in the process map.
The Assign dialog box is displayed. The Copy Rules tab is displayed by default. Click Create.
The Create Copy Rule dialog box is displayed. In the To group, expand the Variables node by clicking the plus sign next to it, and then select Expression from the From group to assign values to the input variables. Figure 2-43 shows assigning values to the input variables.
Figure 2-43 Assigning Values to the Input Variables
After assigning values to the input variables, click OK.
Select Make from the Run menu or press Ctrl+F9 to compile the BPEL process to check for errors. The compilation result is displayed.
After designing the BPEL process, the next steps are to deploy, run and monitor it. This section discusses the following:
You need to deploy the BPEL process before you can run it. The BPEL process is first compiled, and then deployed to the BPEL server. The following steps discuss deploying the BPEL process to a BPEL server:
Select the BPEL project in the Applications window.
Right-click the project name. Select Deploy from the menu that appears.
Select Local BPEL Server followed by Deploy to Default Domain, if you are deploying the process on the local BPEL server. Figure 2-44 illustrates deploying a BPEL process to a local BPEL server.
Note: You can select Invoke Deployment Tool if you want to deploy to a different BPEL server. |
The Password Prompt dialog box appears. Enter the password for the default domain in the Domain Password field. Click OK. Figure 2-45 shows the Password Prompt dialog box.
Figure 2-45 Specifying the Domain Password
The BPEL process is compiled and deployed. You can check the progress of the compilation in the Messages window. Figure 2-46 shows the Messages window.
Once the BPEL process is deployed, it can be seen in the BPEL console. You can manage and monitor the process from the BPEL console. You can also test the process and the integration interface by manually initiating the process. The following steps discuss manually initiating and monitoring the BPEL process:
To open the BPEL Console, click Start, and then select Programs. In the Programs menu, select Oracle - ORACLE_HOME, Oracle BPEL Process Manager 10.1.2, and then select BPEL Console.
The BPEL Console login screen is displayed. Select Default in the Domain box. Enter the password for the default domain in the Password field, and then click Login. Figure 2-47 shows the BPEL Console login screen.
Oracle BPEL console is displayed. The list of deployed processes is shown under Deployed BPEL Processes. Figure 2-48 shows the BPEL Console screen.
Click the BPEL process that you want to initiate. The Initiate page is displayed. Enter the input values required by the process.
Click Post XML Message to initiate the process.
The BPEL process is now initiated. You can check the process flow by clicking the Visual Flow icon. Figure 2-49 shows the BPEL Console Initiate page.
The audit trail provides information about the steps that have been executed. You can check the audit trail by clicking the Audit Instance icon.