6 Creating the Project in JDeveloper Examples

This chapter contains the following topics:

Getting Started

This topic describes the components necessary to work with the samples and how to prepare your system. It has the following topics:

Prerequisites

The following are installation and configuration requirements for using the examples.

This chapter provides examples of the configuration steps that are used when using BPEL to work with the Oracle VSAM adapters. You should be familiar with the following before working with these examples:

Integration between the OracleAS adapters for VSAM and BPEL has the following processes:

Beginning Tasks

Before you design the outbound process, you must perform the following:

Deploy a BPEL Outbound Process

This section describes how to create a BPEL outbound process that connects to a OracleAS adapter for VSAM. For information on how to configure a VSAM adapter for outbound, see Modeling Interactions for OracleAS Adapter for VSAM.

To configure a process with the BPEL process manager, you use JDeveloper. This section describes how to create a BPEL outbound process for VSAM reource adapters using JDeveloper. The following sections describe how to deploy a BPEL outbound process. The following sections describe the steps necessary to perform this outbound sample.

Before you design the outbound process, integrate and connect your OracleAS adapter for VSAM with the BPEL process manager.

Design-Time Configuration

This section describes the design-time steps necessary to deploy two BPEL outbound processes. The processes use the Web service called FINDDOCTOR. This service finds a list of doctors from VSAM data. The following are the steps required to create the outbound process.

Create a BPEL Project for a BPEL Outbound Process

Perform the following to create a BPEL project for outbound.

  1. In JDeveloper, create a new SOA project.

  2. Rright-click the SOA project and select New. The New Gallery is displayed as shown in Figure 6-1.

  3. In the Categories list, expand SOA Tier and select Service Components.

  4. From the Items list, select BPEL Process and click OK. The BPEL Process screen is displayed as shown in Figure 6-2.

  5. Enter the following in the BPEL Process screen:

    • Enter a Name, for example BPELOUTBOUND1.

    • Enter the Directory where you want to save the project.

    • Select a Synchronous BPEL Process Template.

  6. Click OK. The BPEL Process is dislpayed in the visual editor.

    Next Use a Third-Party Adapter to Read the Doctor Data.

Use a Third-Party Adapter to Read the Doctor Data

You must use a third-party adapter to read the DOCTOR data. SOA executes the SQL statment defined in the interaction and passes it to a resource adapter. The resource adapter then processes the information and returns the data. Perform the following to create the third-party adapter.

  1. From the Projects area, on the left side, double-click the composite.xml. At the bottom of the visual editor, click the Design tab, if necessary. Figure 6-3 shows the Composite View in the visual editor:

    Figure 6-3 Composite View

    BPEL Process Composite View
    Description of "Figure 6-3 Composite View"

  2. Drag a third-party adapter into External References lane of the visual editor, as shown in Figure 6-4.

    Figure 6-4 Third-Party Adapter

    Third-party adapter
    Description of "Figure 6-4 Third-Party Adapter"

    When you drag the third-pary adapter into JDeveloper the Create Third Party Adapter Service screen is displayed as shown in figure Figure 6-5.

    Figure 6-5 Create Third-Party Adapter Service

    Create Third-Party Adapter Service
    Description of "Figure 6-5 Create Third-Party Adapter Service"

  3. Click the button next to the WSDL URL field and browse to find the findDoctor.wsdl file that you created in Create the JCA Configuration Files.

  4. In the Type list, select Reference.

  5. Click the button next to the JCA File field and browse to find the findDoctor.jca file that you created in Create the JCA Configuration Files.

  6. Click OK to close the dialog box. You should now have a composite design as shown in Figure 6-6.

    Figure 6-6 Ready to Create BPEL Process (Composite View)

    Composite view before process
    Description of "Figure 6-6 Ready to Create BPEL Process (Composite View)"

Continue with the Design a BPEL Outbound Process step.

Design a BPEL Outbound Process

In this step, you design the BPEL process. Do the following to design the BPEL outbound process:

  1. In the Composite, connect the BPEL process to the third-pary adapter as shown in Figure 6-7.

    Figure 6-7 Connect to Third-Party Adapter

    Connect to third-party adapter
    Description of "Figure 6-7 Connect to Third-Party Adapter"

  2. Double-click the BPEL process.

  3. From the Component Palette, BPEL Process Activities section, drag an Assign, Invoke, and another Invoke activity into the editor for the process as shown in Figure 6-8.

    Figure 6-8 Outbound Process

    This image shows where you create a process
    Description of "Figure 6-8 Outbound Process"

  4. Continue with the Edit the Invoke_1 Activity.

Edit the Invoke_1 Activity

You must now edit the Invoke activity so that it invokes the findDoctor interaction.

  1. In the Visual Editor, connect the Invoke_1 activity to the third-party adapter. The Edit Invoke screen is displayed s shown in Figure 6-9.

  2. In the Invoke dialog box, ensure that the Partner Role Web Service Interface section has the following values:

    • Operation: FINDDOCTOR

  3. Click the plus sign next to the Input field and select the Invoke_1_findDoctor_InputVariable.

  4. Click the plus sign next to the Output field and select the Invooke_1_findDoctor_OutputVariable.

  5. Click OK then save then Deploy the Project.

Deploy the Project

Perform the following to deploy the project to the Oracle Application Server:

  1. From the Application Navigator, right-click the project and find Deploy and then select the project you are deploying.

  2. From the Deploy wizard, select Deploy to Application Server.

  3. Continue to click Next till the end of the wizard and then click Finish to deploy.

Run-time Configuration

This section describes how to test the project and run it to see that the outbound process is executed successfully. Do the following to test the outbound process.

  1. Create a file and call it FindDoctor.xml as shown in the following example:

    <?xml version="1.0" encoding="UTF-8"?><CU:FindDoctorData  xmlns:CU="http://xmlns.oracle.com/Esb/FindDoctorData"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Record1>VSAM</Record1></CU:FindDoctorData>
    
  2. Save the file to the C:/temp folder that was defined for the first adapter. The file is deleted after the SOA server reads the file and completes the process.

  3. Open the C:\tempOut folder that was defined in the second adapter. A file with the following contents is copied to this folder.

    <?xml version="1.0"?>
    <findDoctorData xmlns="http://xmlns.oracle.com/Esb/findDoctorData">
      <Record1 xmlns>="">VSAM</Record1>
    

Deploy a Mediator Process

This section describes how to create a Mediator outbound process that connects to a OracleAS adapter for CICS.

You use JDeveloper. to configure a process with Mediator This section describes how to create a Mediator outbound process for CICS reource adapters using JDeveloper. The following sections describe how to deploy a BPEL outbound process.

Design-Time Tasks

This section describes the design-time steps necessary to deploy a Mediator outbound process. The processes use the Web service called FINDDOCTOR. This service finds a list of doctors from the data. The following are the steps required to create the outbound process.

Create a Mediator Project for a Mediator Outbound Process

Do the following to create a Mediator project for outbound.

  1. In JDeveloper, create a new SOA project.

  2. Right-click the SOA project and select New. The New Gallery is displayed as shown in Figure 6-10.

  3. In the Categories list, expand SOA Tier and select Service Components.

  4. From the Items list, select Mediator and click OK. The Creator Mediator screen is displayed as shown in Figure 6-11.

  5. Enter the following in the Create Mediator screen:

    • Enter a Name, for example MEDOUTBOUND1.

    • Select a Synchronous Mediator Template.

  6. Click OK. The Mediator is dislpayed in the visual editor.

    Next Use a Third-Party Adapter to Read the Doctor Data.

Use a Third-Party Adapter to Read the Doctor Data

You must use a third-party adapter to read the DOCTOR data. SOA exectes the SQL statment defined in the interaction and passes it to a resource adapter. The resource adapter then processes the information and returns the data. Do the following to create the third-party adapter.

  1. From the Projects area, on the left side, double-click the composite.xml. At the bottom of the visual editor, click the Design tab, if necessary. Figure 6-12 shows the Composite View in the visual editor:

    Figure 6-12 Composite View

    Mediator Composite View
    Description of "Figure 6-12 Composite View"

  2. Drag a third-party adapter into External References lane of the visual editor, as shown in Figure 6-13.

    Figure 6-13 Third-Party Adapter

    Third-party adapter
    Description of "Figure 6-13 Third-Party Adapter"

    When you drag the third-pary adapter into JDeveloper the Create Third Party Adapter Service screen is displayed as shown in figure Figure 6-14.

    Figure 6-14 Create Third-Party Adapter Service

    Create Third-Party Adapter Service
    Description of "Figure 6-14 Create Third-Party Adapter Service"

  3. Click the button next to the WSDL URL field and browse to find the findDoctor.wsdl file that you created in Create the JCA Configuration Files.

  4. In the Type list, select Reference.

  5. Click the button next to the JCA File field and browse to find the findDoctor.jca file that you created in Create the JCA Configuration Files.

  6. Click OK to close the dialog box. You should now have a composite design as shown in Figure 6-15.

    Figure 6-15 Ready to Create Mediator (Composite View)

    Composite view before process
    Description of "Figure 6-15 Ready to Create Mediator (Composite View)"

Continue with the Design an Outbound Mediator step.

Design an Outbound Mediator

In this step, you design the outbound Mediator. Perform the following to design the Mediator outbound process:

  1. In the Composite, connect the Mediator to the third-party adapter as shown in Figure 6-16.

    Figure 6-16 Connect to Third-Party Adapter

    Connect to third-party adapter
    Description of "Figure 6-16 Connect to Third-Party Adapter"

  2. Double-click the Mediator process.

  3. Expand the Filter Expression as shown in Figure 6-17.

    Figure 6-17 Filter Expression

    Filter Expression
    Description of "Figure 6-17 Filter Expression"

  4. Continue with Create Mapping Rules and Map the Files.

Create Mapping Rules and Map the Files

You must perform the following steps to create mapping files and map the files.

  1. In the upper section of the Filter Expression screen, click the icon next to the Transform using field as shown in Figure 6-17. The Request Transformation Map screen is displayed as shown in Figure 6-18.

    Figure 6-18 Request Transformation Map

    Request Transformation Map
    Description of "Figure 6-18 Request Transformation Map"

  2. In the Request Transformation Map, select Create New Mapper file. Use the default value, which should be singleString_To_Doctor.xsl.

  3. Click OK.

  4. In the visual editor, click to return to the mediator.mplan tab.

  5. In the bottom section of the Filter Expression screen, click the icon next to the Transform using field as shown in Figure 6-17. The Request Transformation Map screen is displayed.

  6. In the Request Transformation Map, select Create New Mapper file. Use the default value, which should be Doctor_To_singleString.xsl.

  7. Click the singleString_To_Doctor tab. Connect the Doctor element fromthe source:findDoctor.wsdl to the inp1:input element in the Mediatorx.wsdl as shown in Figure 6-19.

    Figure 6-19 Map Doctor to Single String

    Map Doctor to Single String
    Description of "Figure 6-19 Map Doctor to Single String"

  8. Click the Doctor_To_singleString tab. Connect the inp1:input element fromthe source:Mediatorx.wsdl to the DOCTOR attribute in the findDoctor.wsdl as shown in Figure 6-20.

    Figure 6-20 Map Single String to Doctor

    Map single string to Doctor
    Description of "Figure 6-20 Map Single String to Doctor"

  9. Save and then Deploy the Project.

Deploy the Project

Perform the following to deploy the project to the Oracle Application Server:

  1. From the Application Navigator, right-click the project and find Deploy and then select the project you are deploying.

  2. From the Deploy wizard, select Deploy to Application Server.

  3. Continue to click Next till the end of the wizard and then click Finish to deploy.