Professional Documents
Culture Documents
Page 1 of 39
Articles
Questions
Subscribe
Testimonials
ABOUTUS
CONTACT
Login
Signup
Financials | Manufacturing | Tools | General | iExpenses | Payables | Receivables | Purchasing | Order Management | Forms | Reports | Workflow | PL/SQL | Personalization
Ads by Google
BizTalk
Wizard
Process Control
Ads by Google Text File Editor Window XP Create XML SiteMap ERP Tutorial
Sponsored Links
Author
Name: E -mail: prudhvi prudhvi@erpschools.com
Translation Service 5-second online quote, including price and delivery date
http://www.translated.net
AJAX Client SOA Bind to WSDL / REST, XML or JSON. View live examples & full docs
www.SmartClient.com
Open .PUB File Instantly Fix and Open/Run .PUB File. Free Download - takes 2 mins.
Driversdownloadhub.com/.pub
Free OTM (G-Log) Support Free OTM / G-Log GC3 Support Forums Learn from OTM Experts!
www.otmfaq.com
$79/Hr Job - 434 Openings Make $79/hr Working From Home. As Seen On CNN,NBC,& Fox News
www.TheNewsSearch.com/ms
In this tutorial I will explain how to read a CSV file using ReadFileAdapter and then to write a CSV file using WriteFileAdapter. We dont have tw o separate FileAdapters but based on the read and write operation we mention them as ReadFileAdapter or WriteFileAdapter. logic defined and post the XML messages. ReadFileAdapter will Receive the input data from file and translate the data based on the translation WriteFileAdapter will receive the XML messages and translate it into actual data Overview: In this tutorial I will explain how to read a CSV file using ReadFileAdapter and then to write a CSV file using WriteFileAdapter. We dont have two separate FileAdapters but based on the read and write operation we mention them as ReadFileAdapter or WriteFileAdapter. ReadFileAdapter will Receive the input data from file and translate the data based on the translation logic defined and post the XML messages. WriteFileAdapter will receive the XML messages and translate it into actual data and write to a file.
...
A&R Financial Associates Alex Araz - Partner Personal Income Tax Services
www.arfinancial.biz
FileAdapter supports the following file formats. 1. 2. XML Delimited (Delimiter can be anything)
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 2 of 39
3.
Open Source BPEL Server Design with BPMN. Execute on our best of breed BPEL Engine
www.intalio.com
4.
You dont need to use both ReadFileAdapter and WriteFileAdapter in a single process, for example you can read the data from file using ReadFileAdapter and write data to a database using DBAdapter. In other way you can get the data from a database and write it to a file using WriteFileAdapter. This is purely based on the business requirement and up to us how we are going to use them. System Requirements: 1. jDeveloper 10.1.3 SOA Suite 10.1.3 Start the SOA Suite Create Application Server Connection Create Integration Server Connection 2. 1. 2. 3.
Connections Required:
www.slsinvestigations.co.uk/
OSS Fast Infoset Tools Fast, compact XML without a schema Ideal for embedded devices. Evals.
www.oss.com
Start the SOA Suite: If you dont have SOA Suite already installed on your machine click here to download and install it. If you have SOA Suite installed on your machine navigate Start >> All Programs >> Oracle - >> Start SOA Suite
Once your Application Server starts successfully you will see the screen below
Create Application Server Connection Navigate to Connection Navigator by clicking view >> Connections Navigator or by pressing Ctrl + Shift + o
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 3 of 39
Right click on Application Server and click New Application Server Connection
Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 4 of 39
Connection Name: AppServerConnection1 (you can change it to anything) Connection Type: Oracle Application Server 10g 10.1.3
Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 5 of 39
Username: oc4jadmin Password: welcome1(this is the default password, if you have changed it use your own password) Click next
Leave everything as it is and click next And then press Test Connection
If you receive the Status as Success! You are good to proceed. If you get any errors make sure your application server is running and try again. Click Finish to close the wizard and return to Connection Navigator. Create Integration Server Connection Go to Connection Navigator by pressing Ctrl+Shift+o
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 6 of 39
By Clicking the New Integration Server Connection wizard opens up with welcome screen.
Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 7 of 39
Application Server: Select the Application Server you created in first step. If you have only one application server it will be automatically selected. Hostname: localhost Port Number: 8888 Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 8 of 39
If you receive the following message you connection is successful. Application Server: OK BPEL Process Manager Server: OK ESB Server: OK Click finish to close the wizard Create New Application Open Application Navigator by clicking Ctrl+Shift+A or go to view >> Application Navigator
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 9 of 39
If you have any Application exists you can create your BPEL process under that if not creation new application by right clicking the Applications and selecting New
Change the application name as you need and leave all the remaining things as default and click OK
Click Cancel to cancel the project. We will create new project manually by selecting the BPEL Process project in next step. Create New BPEL Process Right Click on the Application that we created and click New Project
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 10 of 39
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 11 of 39
Change the Name(optional) and Template: Empty BPEL Process Click Finish. If you expand the BPEL Process you can see the files below which are created by default.
Middle panel of jdeveloper opens BPELProcess.bpel file automatically if not open it by double clicking on the file shown in the above figure.
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 12 of 39
In the .bpel file you can see 3 regions 1. 2. 3. Services(Left Side) Main Activity Region Services(Right Side)
On the Right Side of your screen you can see the component palette.
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 13 of 39
Drag it to Services region on left and leave it. Automatically Adapter Configuration Wizard will pop up showing the welcome screen
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 14 of 39
Click Next
Enter Service Name as ReadFileAdapter since we are going to use this adapter for reading the file. Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 15 of 39
Select the Physical Path option and select the path where you CSV file is placed. I have placed by .CSV file in the C:\readfile directory Deselect the option Delte files after successful retrieval Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 16 of 39
Enter the patten name in Include Files with Name Pattern I have entered erpschools*.txt which means that all the files starting with erpschools word prefix will be picked for processing. Ex: erpschools.txt will be picked erpschools1.txt will be picked erpschools2.txt will be picked 1erpschools.com will not be picked. Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 17 of 39
Navtive Format Builder Wizard will pop up with welcome screen. Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 18 of 39
Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 19 of 39
Since our file contains only one record select first option and Click Next
Namespace: leave default value Enter a name for element that will represent record: readrecord Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 20 of 39
Click Next
Change the column names and types as needed and Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 21 of 39
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 22 of 39
Schema Location and Schema Element will be populated with the values that we created just now. Click next
Click Finish
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 23 of 39
Now you should be able to see the ReadFileAdapter in the services region as shown above Now in the component Palette select Process Activities
Select Receive component and drag it to main region When you move the component to main region it will change the color to yellow then you can drop it.
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 24 of 39
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 25 of 39
Now Partner Link and operation fields will be populated as shown Click on Auto Create button right to Variable to create new variable. If you dont understand which icon to click place your cursor on the icons and you can see the hint text
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 26 of 39
Click OK
Check Create Instance box and click apply Click OK Now the figure looks like this
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 27 of 39
There is a link created from ReadFileAdapter to Receive_1 component Create WriteFileAdapter Go to component palette and select services from drop down Select the drag FileAdapter to Services region on the right side FileAdapter Wizard will open with welcome screen as shown below
Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 28 of 39
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 29 of 39
Enter Directory path and file naming convention as shown above. %SEQ% will increase the numbers from 1 onwards which means if you have 10 files to write then your file names will be erp_1.txt, erp_2.txt, erp_3.txt ..erp_10.txt Click Next
Click Browse to select the schema file that we already created before
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 30 of 39
Click Next
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 31 of 39
WriteFileAdapter will showup in the right Services region as show above Now go to Component palette and select Process Activites Select Invoke Component from component palette and drop it below the Receive_1 component
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 32 of 39
Click ok
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 33 of 39
Click ok
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 34 of 39
Now drag and drop the Transform component below the Receive_1 component and above Invoke_1 component
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 35 of 39
Transformation_1.xsl file will open as show above select tns:readrecord in source and drag it to tns:readrecord on target to map the fields.
Auto Map Preferences will pop up as shown above Click OK to auto map
All fields will be mapped automatically as shown above Now select BPELProcess.bpel file on top and click validate icon to validate the process
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 36 of 39
Once it is validated with out errors we are ready to deploy the process Deploy BPEL Process Right click on BPEL Process and select Deploy option as shown below
If you have this process already on server it will pop up with version number if not it will start deploying the process
If your deployment is successful you will see the message BUILD SUCCESSFUL. Initiate BPEL Process Open your browser and type the following URL
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 37 of 39
Username: oc4jadmin Password: welcome1(default) Login You can see the list of deployed BPEL Process on the left panel as shown below
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 38 of 39
You will be taken to Initiate screen where you have option to post XML Message Now your process has initiated Go to your writefile directory to see your file
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009
Page 39 of 39
http://www.erpschools.com/Apps/oracle-applications/articles/Fusion-Middleware/SOA/BP... 9/25/2009