Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Saturday, September 17, 2011

Using Concurrent Programs of Oracle Application Server Adapter

This chapter covers the following topics:
  • Overview of Concurrent Programs
  • Design-Time Tasks for Concurrent Programs
  • Creating a New BPEL Project
  • Adding a Partner Link
  • Configuring the Invoke Activity
  • Configuring the Transform Activity
  • Run-Time Tasks for Concurrent Programs
  • Deploying the BPEL Process
  • Testing the BPEL Process
  • Verifying Records in Oracle Applications

Overview of Concurrent Programs

OracleAS Adapter for Oracle Applications uses concurrent programs to move data from interface tables to base tables.

A concurrent program is an instance of an execution file. Concurrent programs use a concurrent program executable to locate the correct execution file. Several concurrent programs may use the same execution file to perform their specific tasks, each having different parameter defaults.

Design-Time Tasks for Concurrent Programs

This section describes how to configure the OracleAS Adapter for Oracle Applications to use concurrent programs. It describes the tasks required to configure OracleAS Adapter for Oracle Applications using the Adapter Configuration Wizard in Oracle JDeveloper.

Prerequisites to Configuring Concurrent Programs

OracleAS adapter for Oracle Applications is deployed using the BPEL Process Manager (PM) in Oracle JDeveloper. The BPEL PM creates the WSDL interfaces for the concurrent programs.

You must populate certain variables in the BPEL PM in order to provide context information for Oracle Applications. The context information required for a concurrent program includes the username and responsibility of an Oracle Applications user who has sufficient privileges (based on the applications context of Organization ID, Username and Responsibility) to run the program. The default value passed for the username is SYSADMIN. The default value passed for responsibility is SYSTEM ADMINISTRATOR.

You can change the default values specified in the generated WSDL for the username and responsibility. This is a static way of changing the context information. These values will apply to only the invocation of the deployed business process where you change the values. However, if you must provide different context information for different invocations of the business process, then you can dynamically populate the header variable with values for username and responsibility. The context information can be specified by configuring an Assign activity before the Invoke activity in the BPEL PM.

Following is a list of the procedures required to accomplish the design-time tasks.

  1. Create a new BPEL project.

  2. Add a partner link.

  3. Configure the Invoke activity.

  4. Configure the Transform activity.

Creating a New BPEL Project

To create a new BPEL project

  1. Open JDeveloper BPEL Designer.

  2. From the File menu, select New. The New Gallery dialog box appears.

  3. Select All Items from the Filter By box. This displays a list of available categories.

  4. Expand the General node, and then select Projects.

  5. Select BPEL Process Project from the Items group.

    Creating a New BPEL Process Project

    the picture is described in the document text

  6. Click OK. The BPEL Process Project dialog box appears.

  7. In the BPEL Process Name field, enter a descriptive name. For example, InsertShipNotice.

    Specifying a Name for the New BPEL Process Project

    the picture is described in the document text

  8. From the Template box, select Asynchronous BPEL Process. Keep the default selection for Use Default under Project Content.

  9. Click OK. A new BPEL process, with the required source files including bpel.xml, InsertShipNotice.bpel, and InsertShipNotice.wsdl is created.

    New BPEL Process Project

    the picture is described in the document text

Adding a Partner Link

The next task is to add a partner link to the 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

  1. Drag and drop PartnerLink, from the Component Palette, into the border area of the process diagram. The Create Partner Link dialog box appears.

  2. Click the Define Adapter Service icon in WSDL Settings. The Adapter Configuration Wizard appears.

  3. Click Next. The Adapter Type dialog box appears.

  4. Select Oracle Applications to specify the adapter you want to configure.

    Selecting OracleAS Adapter for Oracle Applications

    the picture is described in the document text

  5. Click Next, and the Service Name dialog box appears.

  6. Enter the following information:

    1. In the Service Name field, enter a service name.

    2. In the Description field, enter a description for the service. This is an optional field. Click Next.

      Specifying the Service Name

      the picture is described in the document text

      The Service Connection dialog box appears.

  7. Click Next. The Service Connection dialog box appears.

    Creating a New Database Connection

    the picture is described in the document text

  8. Click New to define a database connection. The Create Database Connection Wizard appears. Alternatively, you can select an existing database connection from the Connection list.

    Note: You must connect to the database where Oracle Applications is running.

  9. Click Next. The Type dialog box appears.

  10. Enter the following information in the Type dialog box:

    1. In the Connection Name field, specify a unique name for the database connection.

    2. From the Connection Type box, select the type of connection for your database connection.

    Specifying the Connection Name and Type of Connection

    the picture is described in the document text

  11. Click Next. The Authentication dialog box appears.

  12. Enter information in the following fields:

    1. In the UserName field, specify a unique name for the database connection.

    2. In the Password field, specify a password for the database connection.

  13. Click Next. The Connection dialog box appears.

  14. Enter information in the following fields:

    1. From the Driver list, select Thin.

    2. In the Host Name field, specify the host name for the database connection.

    3. In the JDBC Port field, specify the port number for the database connection.

    4. In the SID field, specify a unique SID value for the database connection.

    Specifying the New Database Connection Information

    the picture is described in the document text

  15. Click Next. The Test dialog box appears.

  16. Click Test Connection to determine whether the specified information establishes a connection with the database.

  17. Click Next. The Service Connection dialog box appears, providing a summary of the database connection.

  18. The JNDI (Java Naming and Directory Interface) name corresponding to the database connection appears automatically in the Database Server JNDI Name field. Alternatively, you can specify a JNDI name.

    Note: When you specify a JNDI name, the deployment descriptor of the Oracle Applications adapter must associate this JNDI name with configuration properties required by the adapter to access the database.

    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.

    Note: For more information about JNDI concepts, refer to Oracle Application Server Adapter Concepts.

  19. 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 concurrent program by browsing through the list of concurrent programs available in Oracle Applications.

  20. Click Next in the Service Connection dialog box. The Operation dialog box appears.

    Important: If you are connecting to a pre-11.5.10 Oracle Applications instance, you must select the interface type in the Adapter Configuration Wizard. Select Tables/Views/APIs/Concurrent Programs to proceed.

  21. Click Get Object to open the Oracle Applications Module Browser.

    Selecting a Concurrent Program from the Module Browser

    the picture is described in the document text

  22. 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 individual products contain 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. concurrent programs can be found under the OpenIntefaces category.

  23. Select a concurrent program, and then click OK. You can select only one concurrent program for each adapter service.

    Note: You can also search for a concurrent program by entering the name of the program in the Object Name field. Select the CP check box, and then click Search.

  24. The concurrent program is added to Operation Objects. Click Next in the Operation dialog box.

  25. Click Finish. The wizard generates the WSDL file corresponding to the selected interface. This WSDL file is now available for the partner link.

    Completing the Partner Link Configuration

    the picture is described in the document text

  26. Click OK. The partner link is created with the required WSDL settings.

Configuring the Invoke Activity

After adding and configuring the partner link, the next task is to configure the BPEL process. This includes configuring the Invoke activity and the Transform activity.

To configure the Invoke activity

  1. Drag and drop the Invoke activity into the process map window.

    Adding the Invoke Activity

    the picture is described in the document text

  2. Double-click Invoke in the process map to open the Invoke dialog box. The General tab is selected by default.

    Configuring the Invoke Activity

    the picture is described in the document text

  3. In the Partner Link box, select the partner link to invoke. This is the partner link that you configured in the previous section. The Operation is automatically selected, depending on the concurrent program that you chose when configuring the partner link.

  4. 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.

    Creating the Input Variable

    the picture is described in the document text

  5. Click the Create icon next to the Output 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.

  6. In the Invoke dialog box, click Apply, and then click OK.

    Note: You can define a Input Header Variable under the Adapters tab of the Invoke dialog box. This variable can be used to provide context information for Oracle Applications.

Configuring the Transform Activity

The Transform activity can be used to configure the parameters for the input and output variable. The Transform activity can also be used if variable values need to be transformed before updating them in Oracle Applications.

To configure the Transform activity

  1. Drag and drop the Transform activity into the process map window. The Transform activity should be placed in between Receive and Invoke.

    Adding the Transform Activity

    the picture is described in the document text

  2. Double-click Transform in the process map to open the Transform dialog box. The Transformation tab is selected by default.

    Configuring the Transform Activity

    the picture is described in the document text

  3. Select the Source Variable and Target Variable from the respective boxes. Elements are mapped from the Source Variable to the Target Variable.

  4. Select the Source Part of the variable from which to map elements. For example, the source part may be a payload schema consisting of a purchase order request.

  5. Select the Target Part of the variable to which to map elements. For example, the target part may be a payload schema consisting of a purchase order acknowledgment.

  6. Mapper File specifies the file in which you create the mappings using the XSLT Mapper Transformation tool. Click the Create icon next to the Mapper File field to create a new transformation mapping file.

    The transformation mapping file appears.

  7. The Design view for the transformation mapping file appears by default.

    Editing the Transformation Mapping File

    the picture is described in the document text

  8. You can define the parameter values in the Design view. Drag a string function to the Design area. Connect the function to the appropriate parameter for which you want to define a value.

    Note: You can use an input parameter value from the source variable, transform it using a string function, and then use it as the input parameter value for the target variable.

  9. Double-click the icon for the function. The Edit Function dialog box appears.

    Supplying the Function Parameters

    the picture is described in the document text

  10. Repeat steps 8 and 9 for all the parameters that you must supply.

    Note: You can use either the Transform activity or the Assign activity to configure the variables. If the number of mappings to be configured is less, say three or four, then you can use the Assign activity. The Transform activity is more suitable for situations where the number of mappings is large or where variable transformation is required.

Run-Time Tasks for Concurrent Programs

After designing the BPEL process, the next step is to deploy, run and monitor it.

  1. Deploy the BPEL process.

  2. Test the BPEL process.

  3. Verify records in Oracle Applications.

Deploying the BPEL Process

You must deploy the BPEL process before you can run it. The BPEL process is first compiled, and then deployed to the BPEL server.

To deploy the BPEL process

  1. Select the BPEL project in the Applications window.

  2. Right-click the project name, then select Deploy from the menu that appears.

  3. If you are deploying the process on the local BPEL server, select Local BPEL Server, followed by Deploy to Default Domain.

    Deploying the BPEL Process

    the picture is described in the document text

    Note: If you want to deploy to a different BPEL server, select Invoke Deployment Tool.

  4. The Password Prompt dialog box appears. Enter the password for the default domain in the Domain Password field, and then click OK.

    Specifying the Domain Password

    the picture is described in the document text

  5. The BPEL process is compiled and deployed. You can check the progress in the Messages window.

    Messages Window

    the picture is described in the document text

Testing the BPEL Process

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 BPEL process.

To test the BPEL process

  1. To open the BPEL console, click Start, then choose Programs. In the Programs menu, select Oracle - ORACLE_HOME, Oracle BPEL Process Manager 10.1.3, then click BPEL Console.

  2. The BPEL console login page appears. Select Default in the Domain box. Enter the password for the default domain in the Password field, then click Login.

  3. Oracle BPEL console appears. The list of deployed processes is shown under Deployed BPEL Processes.

    Deployed BPEL Processes

    the picture is described in the document text

  4. Click the BPEL process that you want to initiate. The Initiate page appears. Enter the input string required by the process.

  5. Click Post XML Message to initiate the process.

  6. The BPEL process is now initiated. You can check the process flow by clicking the Visual Flow icon.

    BPEL Console Initiate Page

    the picture is described in the document text

  7. The audit trail provides information about the steps that have been executed. The audit trail also records the Request ID that is returned for the transaction. You can check the audit trail by clicking the Audit Instance icon.

Verifying Records in Oracle Applications

To verify records in Oracle Applications

  1. Log in to Oracle Applications as the System Administrator.

    Oracle Applications Login Dialog Box

  2. Select Requests from the View menu.

  3. Search for the Request by entering the Request Id that you got from the audit trail, then click Find.

    Find Requests Dialog Box

    the picture is described in the document text

  4. The Request details are displayed. You can check for details such as the Phase and Status of the request.

  5. If the Status of the request is Complete, you can also query the appropriate table in Oracle Applications to search for the relevant records that have been inserted.

    Querying Oracle Applications for a Record

No comments:

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect