Wiring Services and Activities

4-120 Oracle Fusion Middleware Users Guide for Technology Adapters 1. Drag the small triangle in the FlatStructureIn 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 FlatStructureOut in the External References area. The JDeveloper Composite.xml appears, as shown in Figure 4–80 . Figure 4–80 The JDeveloper - Composite.xml

3. Click File, Save All.

Add a Receive Activity 1. Double-click BPELFlatStructure. The BPELFlatStructure.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 ReceiveCSV in the Name field. 5. Click Browse Partner Links at the end of the Partner Link field. The Partner Link Chooser dialog is displayed.

6. Select FlatStructureIn, and click OK.

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

dialog. The Create Variable dialog is displayed.

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 BPELFlatStructure.bpel

page appears, as shown in Figure 4–81 . Oracle JCA Adapter for FilesFTP 4-121 Figure 4–81 The JDeveloper - BPELFlatStructure.bpel 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 InvokeWrite in the Name field. 4. Click Browse Partner Links at the end of the Partner Link field. The Partner Link Chooser dialog is displayed.

5. Select FlatStructureOut, and click OK.

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.

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

the default variable name.

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

Figure 4–82 . 4-122 Oracle Fusion Middleware Users Guide for Technology Adapters Figure 4–82 The JDeveloper - BPELFlatStructure.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.

3. Enter TransformPayload in the Name field.

4. Click the Transformation tab. The Transform dialog is displayed.

5. Click the Create... icon. The Source Variable dialog is displayed.

6. Select ReceiveCSV_Read_InputVariable in the Source Variable box, and select

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

7. Select InvokeWrite_Write_InputVariable in the Target Variable list, select body in

the Target Part.

8. Click the Browse button at the end of the Mapper File field and select

addr1Toaddr2.xsl file from the xsl directory in your project.

9. Click OK.

10. Click File, Save All. The BPELFlatStructure.bpel page is displayed, as shown in

Figure 4–83 . Oracle JCA Adapter for FilesFTP 4-123 Figure 4–83 The JDeveloper - BPELFlatStructure.bpel

4.5.2.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.2.7 Monitoring Using Oracle Fusion Middleware Control Console

You can monitor the deployed SOA composite using 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 address-csv.txt 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. 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. 4-124 Oracle Fusion Middleware Users Guide for Technology Adapters

8. Click the Flow tab to view the process flow. Additionally, click an activity such as

invoke, receive to view the details of an activity.

9. Click ReceiveCSV to display the activity details.

4.5.3 Flat Structure for Mediator

In this use case, Mediator receives the customer data from a file system as a text file, through an inbound Oracle File Adapter service named ReadFile. The ReadFile adapter service sends the message to a routing service named ReadFile_RS. The ReadFile_RS sends the message to the outbound adapter service WriteFTP. The WriteFTP service delivers the message to its associated external application. This use case includes the following sections: ■ Section 4.5.3.1, Prerequisites ■ Section 4.5.3.2, Creating a Mediator Application and Project ■ Section 4.5.3.3, Importing the Schema Definition .XSD Files ■ Section 4.5.3.4, Creating the Inbound Oracle File Adapter Service ■ Section 4.5.3.5, Creating the Outbound Oracle FTP Adapter Service ■ Section 4.5.3.6, Wiring Services ■ Section 4.5.3.7, Creating the Routing Rule ■ Section 4.5.3.8, Deploying with JDeveloper