Creating the Outbound File Adapter Service Wiring Services and Activities

4-106 Oracle Fusion Middleware Users Guide for Technology Adapters Figure 4–60 The Adapter Configuration Wizard - File Configuration Page

9. Click Next. The Messages page is displayed.

10. Click Browse For Schema File that appears at the end of the URL field. The Type

Chooser dialog is displayed.

11. Click Project Schema Files, employees.xsd, and employee, as shown in

Figure 4–61 . Figure 4–61 The Type Chooser Dialog

12. Click OK. The URL field in the Messages page is populated with the

employees.xsd file, as shown in Figure 4–58 .

13. Click Next. The Finish page is displayed.

Oracle JCA Adapter for FilesFTP 4-107

14. Click Finish. The outbound Oracle File Adapter is now configured and

composite.xml appears, as shown in Figure 4–62 . Figure 4–62 The JDeveloper - Composite.xml

4.5.1.5 Wiring Services and Activities

You have to assemble or wire the three components that you have created: Inbound adapter service, BPEL process, Outbound adapter reference. Perform the following steps to wire the components: 1. Drag the small triangle in the XMLDebatchingIn in the Exposed Services area to the drop zone that appears as a green triangle in the BPEL process in the Components area. 2. Drag the small triangle in the BPEL process in the Components area to the drop zone that appears as a green triangle in the XMLOut in the External References area. The JDeveloper Composite.xml appears, as shown in Figure 4–63 . 4-108 Oracle Fusion Middleware Users Guide for Technology Adapters Figure 4–63 The JDeveloper - Composite.xml

3. Click File, Save All.

Add a Receive Activity 1. Double-click BPELXMLDebatching. The BPELXMLDebatching.bpel page is displayed.

2. Drag and drop a Receive activity from the Component Palette to the design area.

3. Double-click the Receive activity. The Receive dialog is displayed.

4. Enter ReceiveEmployee in the Name field, as shown in

Figure 4–64 . Oracle JCA Adapter for FilesFTP 4-109 Figure 4–64 The JDeveloper - BPELXMLDebatching.bpel

5. Click Browse Partner Links at the end of the Partner Link field. The Partner Link

Chooser dialog is displayed.

6. Select XMLDebatchingIn, as shown in

Figure 4–65 , and click OK. Figure 4–65 The Partner Link Chooser Dialog

7. Click the Auto-Create Variable icon to the right of the Variable field in the Receive

dialog, as shown in Figure 4–66 . The Create Variable dialog is displayed. 4-110 Oracle Fusion Middleware Users Guide for Technology Adapters Figure 4–66 The Receive Dialog

8. Select the default variable name and click OK. The Variable field is populated with

the default variable name.

9. Check Create Instance, and click OK. The JDeveloper BPELXMLDebatching.bpel

page appears, as shown in Figure 4–67 . Figure 4–67 The JDeveloper - BPELXMLDebatching.bpel Oracle JCA Adapter for FilesFTP 4-111 Add an Invoke Activity 1. Drag and drop an Invoke activity from the Component Palette to the design area. 2. Double-click the Invoke activity. The Invoke dialog is displayed. 3. Enter WriteEmployee in the Name field, as shown in Figure 4–68 . Figure 4–68 The Invoke Dialog

4. Click Browse Partner Links at the end of the Partner Link field. The Partner Link

Chooser dialog is displayed.

5. Select XMLOut, as shown in

Figure 4–69 , and click OK. Figure 4–69 The Partner Link Chooser Dialog

6. Click the Automatically Create Input Variable icon to the right of the Input

variable field in the Invoke dialog. The Create Variable dialog is displayed. 4-112 Oracle Fusion Middleware Users Guide for Technology Adapters

7. Select the default variable name and click OK. The Variable field is populated with

the default variable name. The Invoke dialog is displayed, as shown in Figure 4–70 . Figure 4–70 The Invoke Dialog

8. Click OK. The JDeveloper BPELXMLDebatching.bpel page appears, as shown in

Figure 4–71 . Figure 4–71 The JDeveloper - BPELXMLDebatching.bpel Add a Transform Activity 1. Drag and drop a Transform activity from the Component Palette in between the Receive and Invoke activities in the design area.

2. Double-click the Transform activity. The Transform dialog is displayed.

Oracle JCA Adapter for FilesFTP 4-113 3. Enter TransformPayload in the Name field, as shown in Figure 4–72 . Figure 4–72 The Transform Dialog

4. Click the Transformation tab. The Transform dialog is displayed, as shown in

Figure 4–73 . Figure 4–73 The Transform Dialog - Transformation Tab 5. Click the Create... icon. The Source Variable dialog is displayed.

6. Select ReceiveEmployee_Read_InputVariable in the Source Variable box, and

select employees in the Source Part box, and then click OK. The Transform dialog is displayed with the Source and Part selected.

7. Select WriteEmployee_Write_InputVariable in the Target Variable list, select

employee in the Target Part, as shown in Figure 4–74 . 4-114 Oracle Fusion Middleware Users Guide for Technology Adapters Figure 4–74 The Transform Dialog

8. Click the Create Mapping icon. The XSL Editor page is displayed.

9. Drag employees from sources to employee in the target, as shown in

Figure 4–75 . The Auto Map Preferences dialog is displayed. Figure 4–75 The JDeveloper - Transformation_2.xsl Oracle JCA Adapter for FilesFTP 4-115

10. Click OK.

11. Click File, Save All.

12. Close the XSL Editor page. The BPELXMLDebatching.bpel page is displayed, as shown in Figure 4–76 . Figure 4–76 The JDeveloper - XML Debatching Complete

4.5.1.6 Deploying with JDeveloper

You must deploy the application profile for the SOA project and the application you created in the preceding steps. To deploy the application profile using JDeveloper, perform the following steps: 1. Create an application server connection. For more information, see Section 2.7, Creating an Application Server Connection for Oracle JCA Adapters. 2. Deploy the application. For more information, see Section 2.8, Deploying Oracle JCA Adapter Applications from JDeveloper. 4.5.1.7 Monitoring Using Oracle Enterprise Manager Fusion Middleware Control Console Fusion Middleware Control Console You can monitor the deployed SOA composite using the Fusion Middleware Control Console. Perform the following steps: 1. Navigate to http:servername:portnumberem. The composite you deployed appears in the application navigator.

2. Copy the emps.xml file to the input directory and ensure it gets processed. Check

the output directory to ensure that an output file has been created. 3. Click the SOA composite that you deployed. The Dashboard is displayed. 4-116 Oracle Fusion Middleware Users Guide for Technology Adapters Note your Instance ID in the Recent Instances area.

4. Click the Instances tab. The Instance IDs of the SOA composite are listed.

5. Click the Instance ID that you noted in Step 3. The Flow Trace page is displayed. 6. Click your BPEL process instance. The Audit Trail of the BPEL process instance is displayed. 7. Expand a payload node to view payload details.

8. Click the Flow tab to view the process flow.

9. Click an activity to display the activity details.

4.5.2 Flat Structure for Oracle BPEL PM

This use case demonstrates how a flat structure business process uses the Oracle File Adapter to process address book entries from a Comma Separated Value CSV file. This is then transformed and written to another file in a Fixed Length format. This use case includes the following sections: ■ Section 4.5.2.1, Prerequisites ■ Section 4.5.2.2, Designing the SOA Composite ■ Section 4.5.2.3, Creating the Inbound Oracle File Adapter Service ■ Section 4.5.2.4, Creating the Outbound Oracle File Adapter Service ■ Section 4.5.2.5, Wiring Services and Activities ■ Section 4.5.2.6, Deploying with JDeveloper