This chapter contains the following topics:
This section describes the components necessary to work with the samples and how to prepare your system. It has the following topics:
The following are installation and configuration requirements for using the examples.
Personal computer running Microsoft Windows XP, Windows Vista, Windows Server 2003 or Windows Server 2008 with one GB of RAM.
The CICS adapter that you are using must be deployed to the Oracle Application Server.
OracleAS CICS Adapter must be configured for outbound processing. See Configuring an OracleAS Adapter for CICS for Outbound Interactions.
Oracle JDeveloper must be installed.
Legacy adapter must be deployed.
Oracle Studio with the necessary machines loaded. See Setting Up the IBM z/OS Platform in Oracle Studio.
This chapter provides examples of the configuration steps that are used when using BPEL to work with the Oracle CICS adapters. You should be familiar with the following before working with these examples:
How to create J2CA connections. See Configuring the CICS Adapter for Outbound for more information.
How to configure the OracleAS adapters for CICS using Oracle Studio. See Configuring an Oracle Connect Adapter for more information.
Integration between the OracleAS adapters for CICS and BPEL has the following processes:
Design Time: The OracleAS adapters for CICS are configured with Oracle Studio as described in Configuring an Oracle Connect Adapter.
Run time: After you deploy the BPEL process with JDeveloper, you can test your configurations. See Run-time Configuration.
Before you design the outbound process, you must perform the following:
Perform the tasks in Configuring an OracleAS Adapter for CICS for Outbound Interactions to create the CICS adapter, import the metadada, and create the interactions.
Configure the connection for the J2CA CICS resource adapter. You do this by creating a connection factory.
For more information, see Configuring the CICS Adapter for Outbound.
Create the WSDL and binding files for the interaction. You do this in Oracle Studio before you begin to build your endpoint in JDeveloper. Oracle Studio creates the WSDL and binding (jca) files automatically, based on the interaction you create. See Create the JCA Configuration Files for information on creating these files.
This section describes how to create a BPEL outbound process that connects to a OracleAS adapter for CICS.
To configure a process with the BPEL process manager, you use JDeveloper. This section describes how to create a BPEL outbound process for CICS reource adapters using JDeveloper. The following sections describe how to deploy a BPEL outbound process.
Before you design the outbound process, integrate and connect your OracleAS adapter for CICS with the BPEL process manager.
This section describes the design-time steps necessary to deploy a BPEL 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.
Perform the following to create a BPEL project for outbound.
In JDeveloper, create a new SOA project.
Rright-click the SOA project and select New. The New Gallery is displayed as shown in Figure 6-1.
In the Categories list, expand SOA Tier and select Service Components.
From the Items list, select BPEL Process and click OK. The BPEL Process screen is displayed as shown in Figure 6-2.
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.
Click OK. The BPEL Process is dislpayed in the visual editor.
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.
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:
Drag a third-party adapter into External References lane of the visual editor, as shown in Figure 6-4.
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.
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.
In the Type list, select Reference.
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.
Click OK to close the dialog box. You should now have a composite design as shown in Figure 6-6.
Continue with the Design a BPEL Outbound Process step.
In this step, you design the BPEL process. Do the following to design the BPEL outbound process:
In the Composite, connect the BPEL process to the third-pary adapter as shown in Figure 6-7.
Double-click the BPEL process.
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.
Continue with the Edit the Invoke_1 Activity.
You must now edit the Invoke activity so that it invokes the findDoctor
interaction.
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.
In the Invoke dialog box, ensure that the Partner Role Web Service Interface section has the following values:
Operation: FINDDOCTOR
Click the plus sign next to the Input field and select the Invoke_1_findDoctor_InputVariable
.
Click the plus sign next to the Output field and select the Invooke_1_findDoctor_OutputVariable
.
Click OK then save then Deploy the Project.
Perform the following to deploy the project to the Oracle Application Server:
From the Application Navigator, right-click the project and find Deploy and then select the project you are deploying.
From the Deploy wizard, select Deploy to Application Server.
Continue to click Next till the end of the wizard and then click Finish to deploy.
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.
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>CICS</Record1></CU:FindDoctorData>
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.
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>="">CICS</Record1>
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.
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.
Do the following to create a Mediator project for outbound.
In JDeveloper, create a new SOA project.
Right-click the SOA project and select New. The New Gallery is displayed as shown in Figure 6-10.
In the Categories list, expand SOA Tier and select Service Components.
From the Items list, select Mediator and click OK. The Creator Mediator screen is displayed as shown in Figure 6-11.
Enter the following in the Create Mediator screen:
Enter a Name, for example MEDOUTBOUND1.
Select a Synchronous Mediator Template.
Click OK. The Mediator is dislpayed in the visual editor.
Continue with 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.
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:
Drag a third-party adapter into External References lane of the visual editor, as shown in Figure 6-4.
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.
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.
In the Type list, select Reference.
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.
Click OK to close the dialog box. You should now have a composite design as shown in Figure 6-15.
Continue with the Design an Outbound Mediator step.
In this step, you design the outbound Mediator. Perform the following to design the Mediator outbound process:
In the Composite, connect the Mediator to the third-party adapter as shown in Figure 6-16.
Double-click the Mediator process.
Expand the Filter Expression as shown in Figure 6-17.
Continue with Create Mapping Rules and Map the Files.
You must perform the following steps to create mapping files and map the files.
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
.
In the Request Transformation Map, select Create New Mapper file. Use the default value, which should be singleString_To_Doctor.xsl
.
Click OK.
In the visual editor, click to return to the mediator.mplan tab.
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.
In the Request Transformation Map, select Create New Mapper file. Use the default value, which should be Doctor_To_singleString
.xsl.
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.
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.
Save and then Deploy the Project.
Perform the following to deploy the project to the Oracle Application Server:
From the Application Navigator, right-click the project and find Deploy and then select the project you are deploying.
From the Deploy wizard, select Deploy to Application Server.
Continue to click Next till the end of the wizard and then click Finish to deploy.