Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

Authors
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

I have had many requests for an example on how to use BPEL to import data into Oracle, this is a common requirement and I thought that instead of just using a table and file, I will use Oracle APPS Api along with BPEL Oracle Apps Partner link for inserting of a Salary Proposal Update.

 

 

 

Pre-Requisites

You will need SOA suite setup on your machine and a connection to an Oracle Applications Instance, and a working copy of JDeveloper with BPEL 10.1.3.2 will suffice.

Assumptions.

Although this example is explained in as simple terms as possible, it is assumed you understand what BPEL is and basic understanding of Oracle Applications

I have already created a CSV file for this example that we will be using, the file although not perfectly aligned to a normal business process will give you a good idea on how the process works. The file itself contains rows of salary proposal information which we are going to use to run the API.

 

Step 1 – Create a new workspace in Oracle JDeveloper

· From the file menu click New.

· Select Applications and Select Application under items

· In Application name type, FileImportApplication

· Leave all other defaults

· Click Ok

· Click Cancel on the Create Project Screen

· From Applications Navigator Right click FileImportApplication

· Select New Project

· Under new projects window select BPEL Project

· Type FileUpload for the File name

· Change template to Empty BPEL Process

· Click Finish

 

We have now created a new application and Empty BPEL project.

We are now going to define a partner link that will read the CSV file from our file system

· If not already selected make sure that you select FileUpload.Bpel, so that the BPEL diagram moddler appears on your screen

· In component panel select services

· Drag and Drop a Partner Link Service to the right hand side of your BPEL diagram

· Once create partner window pops up select Define Adapter Service button(second last button from the right under the WSDL settings section.

· Select File Adapter from the adapter type screen

· Click Next

· In the service name type, PayrolFileReadService

· Click Next

· Select Read File as your Operation type

· Click Next

· Type in c:\temp\ in the directory for incoming files(you can select any folder you like here but just remember that this is where the service will be polling for new files.

· Click Next

· In the include files with Name Pattern type in payrol*.csv

· Click next

· Change polling frequency to 1 second

· Click next

· Click the Define Schema for native format button

· Skip the welcome page and select Delimited under create new native format from the choose type screen.

· Click next

· Under filename select browse and navigate to Payroll.csv file

· Change number of rows to skip to 1.

· Click next

· Select file contains multiple record instances and select multiple records are of single type.

· Click Next

· Type SalaryUpload for enter name of element containing multiple records

· And Salary for enter name for element that will represent one record

· Click Next

· Accept defaults on pg 5 and click next

· Change C1 through to C5 as follows

o C1 = Assignment_Id

o C2 = Business_Group_id

o C3 = Employee_Number

o C4 = Change_Date

o C5 = Change_Percentage

o C6 = Proposal_Reason

· Click Next

· Next

· Finish

· Click next on the Adapter Config page and then finish

 

You have now created a file listening service

Next we are going to create a receive activity

· Select Process Activities from the component pallet

· Drag and drop a Receive Activity onto you BPEL diagram

· Double click the receive activity

· Type receive File in the Name under general tab

· Select the flashlight next to the partner link field

· Select PayrolFileReadService from the partner links

· Click ok

· Click the create wand next Variable (this will create a default variable for the receive activity

· Click ok

· Make sure you select Create Instance on the receive activity and click ok

· Click file Save ALL

 

We have now create a receive activity to receive the file once picked up

Although not necessary in this scenario , but necessary in most business scenarios I will create a transformation activity.. so that we can transform data types, but first we need to create the Oracle Applications Service Partner

 

· Click on services in the component palette

· Drag and drop and Oracle Applications Partner link to the right side of your diagram

· Type in SalaryPropasalService in the Name field

· Click Next

· Select a defined apps connection(if one is not showing define one)

· Click Next

· The oracle applications module browser will now popup

· Type %PROPOSAL% and Select API’s and select search( I wrote a wrapper procedure, as the seeded proc contains Boolean values, which are not compatable with BPEL)

· Select Insert Salary Proposal

· Click OK

· Click next

· Click finish

· Click OK

 

 

The service has now been created. We need to now create a invoke method in order to be able to use the invoke method’s variables in the transformation activity.

 

· Select Process activities

· Drag a invoke activity below your receive activity

· In name type invokeProposalAPI

· Select the flashlight next to the Partner link field and select the salaryproposalapi partner link

· Select the wand next to input variable to generate a variable

· Click Ok

 

 

 

 

We are now going to create a transformation activity.

 

· Select Process Activities

· Drag a transform activity to below your receive file activity

· Double click the transform activity

· Click General Tab

· Type TransformDataForAPI for name

· Click transformation

· Select source variable as receiveFile_Read_InputVariable

· Select SalaryUpload as the source part

· Select target variable as invokeProposalAPI_salaryProposal

· Select Input Parameters as the Target Part

· Select the wand next to the transformation mapper file field

· A screen will appear that has source and targets

· Drag and drop the mappings AssignmentID > P_Assignment_Id, and the rest

· In my example I used a concat string function by dragging the function onto the map and then selecting employee-number and change percentage as the input variable

· Right click the map and select test

Ok

 

We have now selected a file from the file system transformed it and called a Apps API. One would still add error handling to this.

Deploy the BPEL File to BPEL Serv

 

· Right click FIleUpload project

· Select Deploy

· Deploy to default Server

To test this you can copy SalaryUpload.csv file into c:\temp


George Goosen

Comments   

0 #1 Shireen 2008-04-21 12:28
Hi George,

Really a very nice article. Was really looking for such article.

Thank s and Regards,
Shiree n
Quote
0 #2 Shirin 2008-04-28 22:29
Hi,

When i come to the stage of creating a Oracle Applications Partner link, it gives WSDL Write Error and the message is The Wrapper procedure HR_MAINTAIN_PRO POSAL_API$INSE, could not be found in the package XX_BPEL_SalaryP ropasalService for the schema APPS.

My Question is do i need to create a Wrapper before i execute this step and if i need to create what should be available in Wrapper

Apprec aite your help

Thanks.
Shiri n
Quote
0 #3 Debanjan De 2009-02-27 06:25
Hi George,

This is a very nice and handy document for beginers. I have worked on Oracle SOA for last few months and have come across many performance related issues while designing any SOA interface.
I was little bit curious if there could be any perfomance issue if we use File Adapter rather than using straight forward OS scripting.
Would you please share your views in this regard.

Many Thanks,

Debanj an
Quote
0 #4 Ajit101 2009-11-14 14:43
I could follow your very lucid article. I am new to Apps though. could you list out the steps to verify that the salary proposal has indeed been created from Apps UI?

TIA
Quote
0 #5 sangita deshmukh 2013-04-22 06:21
Very Nice Article to pull data from API
Quote
0 #6 AAgfsmi 2021-06-25 09:48
http://clck.ru/Vhqmh http://clck.ru/Vhquw http://clck.ru/Vhquu http://clck.ru/Vhquq http://clck.ru/Vhqus http://clck.ru/VhqxL http://clck.ru/VhqxJ http://clck.ru/VhqxQ http://clck.ru/VhqxN http://clck.ru/VhqwK http://clck.ru/VhqxU http://clck.ru/VhqwT http://clck.ru/Vhqws http://clck.ru/VhqwF http://clck.ru/VhqxY http://clck.ru/VhqwR http://clck.ru/Vhqvv http://clck.ru/Vhqxc http://clck.ru/VhqwM http://clck.ru/Vhqwq http://clck.ru/VhqxS http://clck.ru/VhqwP http://clck.ru/VhqwH http://clck.ru/Vhqvt http://clck.ru/Vhqvz http://clck.ru/Vhqw7 http://clck.ru/VhqwD http://clck.ru/Vhqx4 http://clck.ru/Vhqwm http://clck.ru/Vhqx2 http://clck.ru/VhqxW http://clck.ru/Vhqw5 http://clck.ru/Vhqwh http://clck.ru/VhqxC http://clck.ru/Vhqw3 http://clck.ru/Vhqw9 http://clck.ru/VhqwB http://clck.ru/Vhqwu http://clck.ru/VhqwV http://clck.ru/Vhqx6 http://clck.ru/VhqwX http://clck.ru/Vhqwf http://clck.ru/Vhqwy http://clck.ru/VhqwZ http://clck.ru/Vhqwo http://clck.ru/Vhqwd http://clck.ru/Vhqwj http://clck.ru/VhqxE http://clck.ru/Vhqwb http://clck.ru/Vhqvx http://clck.ru/Vhqxa http://clck.ru/VhqxA http://clck.ru/Vhqww http://clck.ru/VhqxG http://clck.ru/Vhqx8 http://clck.ru/VhqzJ http://clck.ru/Vhqyy http://clck.ru/Vhqxe http://clck.ru/VhqyH http://clck.ru/Vhqxz http://clck.ru/Vhqys http://clck.ru/Vhqz2 http://clck.ru/Vhqy9 http://clck.ru/VhqyB http://clck.ru/Vhqyd http://clck.ru/Vhqz6 http://clck.ru/VhqyD http://clck.ru/Vhqyf http://clck.ru/Vhqy5 http://clck.ru/VhqyF http://clck.ru/VhqyM http://clck.ru/VhqyP http://clck.ru/VhqyX http://clck.ru/Vhqxx http://clck.ru/Vhqxg http://clck.ru/VhqyR http://clck.ru/Vhqxn http://clck.ru/Vhqxk http://clck.ru/Vhqxv http://clck.ru/Vhqxp http://clck.ru/VhqzE http://clck.ru/VhqyT http://clck.ru/Vhqy3 http://clck.ru/VhqzA http://clck.ru/Vhqxi http://clck.ru/Vhqyw http://clck.ru/VhqyK http://clck.ru/Vhqyq http://clck.ru/Vhqz4 http://clck.ru/VhqzC http://clck.ru/Vhqxt http://clck.ru/VhqyZ http://clck.ru/VhqyV http://clck.ru/Vhqy7 http://clck.ru/Vhqz8 http://clck.ru/Vhqyo http://clck.ru/Vhqxr http://clck.ru/Vhqyu http://clck.ru/Vhqyb http://clck.ru/Vhqyh http://clck.ru/VhqzG http://clck.ru/Vhqyj http://clck.ru/Vhqym http://clck.ru/VhqhR http://clck.ru/Vhqhq http://clck.ru/Vhqgt http://clck.ru/Vhqgz http://clck.ru/Vhqhh http://clck.ru/VhqgJ http://clck.ru/Vhqhj http://clck.ru/Vhqgv http://clck.ru/VhqhD http://clck.ru/Vhqhf http://clck.ru/Vhqhy http://clck.ru/Vhqgi http://clck.ru/VhqgQ http://clck.ru/VhqhX
gjwhdzcvcxbnsba vhk
Quote
0 #7 토토사이트 추천 2022-03-31 21:41
only your gloss of necessity to be more than the CliffsNotes interlingual rendition of
the billet you simply show. Merely alternatively of salutation you or eventide acknowledging you
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Apr 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  1  2  3  4  5  6  7
  8  91011121314
15161718192021
22232425262728
2930     

Enquire For Training

Related Items

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner