Sie sind auf Seite 1von 14

BPEL- How to call an APPS API using BPEL and Flat file imports.

BPEL- How to call an APPS API using BPEL and Flat file imports.
Friday, 18 April 2008 15:43 George Goosen

Page 1 of 14
| Print |

IhavehadmanyrequestsforanexampleonhowtouseBPELtoimportdataintoOracle,thisisacommonrequirementandIthoughtthatinsteadofjustusingatableandfile,IwilluseOracleAPPSApi alongwithBPELOracleAppsPartnerlinkforinsertingofaSalaryProposalUpdate.

PreRequisites YouwillneedSOAsuitesetuponyourmachineandaconnectiontoanOracleApplicationsInstance,andaworkingcopyofJDeveloperwithBPEL10.1.3.2willsuffice. Assumptions. Althoughthisexampleisexplainedinassimpletermsaspossible,itisassumedyouunderstandwhatBPELisandbasicunderstandingofOracleApplications IhavealreadycreatedaCSVfileforthisexamplethatwewillbeusing,thefilealthoughnotperfectlyalignedtoanormalbusinessprocesswillgiveyouagoodideaonhowtheprocessworks.Thefile itselfcontainsrowsofsalaryproposalinformationwhichwearegoingtousetoruntheAPI. Step1CreateanewworkspaceinOracleJDeveloper FromthefilemenuclickNew. SelectApplicationsandSelectApplicationunderitems InApplicationnametype,FileImportApplication Leaveallotherdefaults ClickOk ClickCancelontheCreateProjectScreen FromApplicationsNavigatorRightclickFileImportApplication SelectNewProject UndernewprojectswindowselectBPELProject TypeFileUploadfortheFilename ChangetemplatetoEmptyBPELProcess ClickFinish

WehavenowcreatedanewapplicationandEmptyBPELproject. WearenowgoingtodefineapartnerlinkthatwillreadtheCSVfilefromourfilesystem IfnotalreadyselectedmakesurethatyouselectFileUpload.Bpel,sothattheBPELdiagrammoddlerappearsonyourscreen Incomponentpanelselectservices DragandDropaPartnerLinkServicetotherighthandsideofyourBPELdiagram OncecreatepartnerwindowpopsupselectDefineAdapterServicebutton(secondlastbuttonfromtherightundertheWSDLsettingssection. SelectFileAdapterfromtheadaptertypescreen ClickNext Intheservicenametype,PayrolFileReadService

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.
ClickNext SelectReadFileasyourOperationtype ClickNext Typeinc:\temp\inthedirectoryforincomingfiles(youcanselectanyfolderyoulikeherebutjustrememberthatthisiswheretheservicewillbepollingfornewfiles. ClickNext IntheincludefileswithNamePatterntypeinpayrol*.csv Clicknext Changepollingfrequencyto1second Clicknext ClicktheDefineSchemafornativeformatbutton SkipthewelcomepageandselectDelimitedundercreatenewnativeformatfromthechoosetypescreen. Clicknext UnderfilenameselectbrowseandnavigatetoPayroll.csvfile Changenumberofrowstoskipto1. Clicknext Selectfilecontainsmultiplerecordinstancesandselectmultiplerecordsareofsingletype. ClickNext TypeSalaryUploadforenternameofelementcontainingmultiplerecords AndSalaryforenternameforelementthatwillrepresentonerecord ClickNext Acceptdefaultsonpg5andclicknext ChangeC1throughtoC5asfollows 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 ClickNext Next Finish ClicknextontheAdapterConfigpageandthenfinish

Page 2 of 14

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.

Page 3 of 14

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.

Page 4 of 14

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.

Page 5 of 14

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.

Page 6 of 14

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.

Page 7 of 14

Youhavenowcreatedafilelisteningservice Nextwearegoingtocreateareceiveactivity SelectProcessActivitiesfromthecomponentpallet DraganddropaReceiveActivityontoyouBPELdiagram Doubleclickthereceiveactivity TypereceiveFileintheNameundergeneraltab Selecttheflashlightnexttothepartnerlinkfield SelectPayrolFileReadServicefromthepartnerlinks Clickok ClickthecreatewandnextVariable(thiswillcreateadefaultvariableforthereceiveactivity Clickok MakesureyouselectCreateInstanceonthereceiveactivityandclickok ClickfileSaveALL

Wehavenowcreateareceiveactivitytoreceivethefileoncepickedup Althoughnotnecessaryinthisscenario,butnecessaryinmostbusinessscenariosIwillcreateatransformationactivity..sothatwecantransformdatatypes,butfirstweneedtocreatetheOracle ApplicationsServicePartner Clickonservicesinthecomponentpalette DraganddropandOracleApplicationsPartnerlinktotherightsideofyourdiagram TypeinSalaryPropasalServiceintheNamefield ClickNext Selectadefinedappsconnection(ifoneisnotshowingdefineone) ClickNext Theoracleapplicationsmodulebrowserwillnowpopup Type%PROPOSAL%andSelectAPIsandselectsearch(Iwroteawrapperprocedure,astheseededproccontainsBooleanvalues,whicharenotcompatablewithBPEL) SelectInsertSalaryProposal ClickOK Clicknext Clickfinish ClickOK

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.

Page 8 of 14

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.

Page 9 of 14

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.

Page 10 of 14

Theservicehasnowbeencreated.Weneedtonowcreateainvokemethodinordertobeabletousetheinvokemethodsvariablesinthetransformationactivity. SelectProcessactivities Dragainvokeactivitybelowyourreceiveactivity InnametypeinvokeProposalAPI SelecttheflashlightnexttothePartnerlinkfieldandselectthesalaryproposalapipartnerlink Selectthewandnexttoinputvariabletogenerateavariable ClickOk

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.

Page 11 of 14

Wearenowgoingtocreateatransformationactivity. SelectProcessActivities Dragatransformactivitytobelowyourreceivefileactivity Doubleclickthetransformactivity ClickGeneralTab TypeTransformDataForAPIforname Clicktransformation SelectsourcevariableasreceiveFile_Read_InputVariable SelectSalaryUploadasthesourcepart SelecttargetvariableasinvokeProposalAPI_salaryProposal SelectInputParametersastheTargetPart Selectthewandnexttothetransformationmapperfilefield Ascreenwillappearthathassourceandtargets DraganddropthemappingsAssignmentID>P_Assignment_Id,andtherest InmyexampleIusedaconcatstringfunctionbydraggingthefunctionontothemapandthenselectingemployeenumberandchangepercentageastheinputvariable Rightclickthemapandselecttest Ok

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.

Page 12 of 14

WehavenowselectedafilefromthefilesystemtransformeditandcalledaAppsAPI.Onewouldstilladderrorhandlingtothis. DeploytheBPELFiletoBPELServ RightclickFIleUploadproject SelectDeploy DeploytodefaultServer TotestthisyoucancopySalaryUpload.csvfileintoc:\temp

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.

Page 13 of 14

Hits: 6482

Email This

Bookmark

Set as favorite

Comments (4)
Subscribe to this comment's feed

...
written by Shireen , April 21, 2008

Hi George, Really a very nice article. Was really looking for such article. Thanks and Regards, Shireen
Votes: +0

vote up

vote down

report abuse

BPEL- How to call an APPS API using BPEL and Flat file imports
written by Shirin , April 28, 2008

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_PROPOSAL_API$INSE, could not be found in the package XX_BPEL_SalaryPropasalService 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 Apprecaite your help Thanks. Shirin
Votes: +0

vote up

vote down

report abuse

...
written by Debanjan De , February 27, 2009

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, Debanjan
Votes: +0

vote up

vote down

report abuse

How to verify the records were inserted


written by Ajit101 , November 14, 2009

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
Votes: +0

vote up

vote down

report abuse

Write comment
Name

Email

Title

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

BPEL- How to call an APPS API using BPEL and Flat file imports.
Comment

Page 14 of 14

smaller | bigger Subscribe via email (Registered users only)

Write the displayed characters

Add Comment

http://apps2fusion.com/at/48-gg/245-bpel-how-to-call-an-apps-api-using-bpel-and-flat-file-imports?tmpl=co... 6/18/2010

Das könnte Ihnen auch gefallen