信息技术最佳实践ORACLE核心应用技术FUSIONMIDDLEWAREBPEL应用指南Author:黄建华CreationDate:May19,2007LastUpdated:January10,2020DocumentRef:DocumentReferenceNumberVersion:DRAFT1AApprovals:Approver1Approver2CopyNumber_____信息技术最佳实践BPEL应用指南FileRef:1578646683549(v.DRAFT1A)CompanyConfidential-ForinternaluseonlyDocRef:DocumentReferenceNumberMarch6,2012DocumentControliiDocumentControlChangeRecord3DateAuthorVersionChangeReference19-May-07Jianhua.HuangDraft1aNoPreviousDocumentReviewersNamePositionDistributionCopyNo.NameLocation1LibraryMasterProjectLibrary2ProjectManager34NoteToHolders:Ifyoureceiveanelectroniccopyofthisdocumentandprintitout,pleasewriteyournameontheequivalentofthecoverpage,fordocumentcontrolpurposes.Ifyoureceiveahardcopyofthisdocument,pleasewriteyournameonthefrontcover,fordocumentcontrolpurposes.信息技术最佳实践BPEL应用指南FileRef:1578646683549(v.DRAFT1A)CompanyConfidential-ForinternaluseonlyDocRef:DocumentReferenceNumberMarch6,2012DocumentControliiiContentsDocumentControl..................................................................................................................ii1.BPEL基础...................................................................................................................21.1.BPEL基础............................................................................................................21.2.安装数据库..........................................................................................................31.3.安装J2EE容器......................................................................................................31.4.安装BPELPM.....................................................................................................31.5.最简单的完整例子:HelloWorld....................................................................41.6.理解HelloWorld................................................................................................82.其他特性和功能实例.................................................................................................92.1.学习参考资料......................................................................................................92.2.理解BPEL对象....................................................................................................92.3.第2个例子:异步调用WS................................................................................102.4.第3个例子:待续..............................................................................................133.应用案例...................................................................................................................144.OpenandClosedIssuesforthisDeliverable......................................................15OpenIssues.....................................................................................................................15ClosedIssues..................................................................................................................15信息技术最佳实践BPEL应用指南FileRef:1578646683549(v.DRAFT1A)CompanyConfidential-ForinternaluseonlyDocRef:DocumentReferenceNumberMarch6,2012BPEL基础.2of171.BPEL基础.1.1.BPEL基础1.1.1.简介随着EAI向着SOA方向发展,如何利用WebService完成系统整合日益成为企业IT系统集成的焦点。而BPEL作为工业标准,能够快速、可视化的将各个离散的WS整合成一个个端到端的Flows!这样企业完成系统集成需要两个标准化的步骤:1、将各系统的Inbound和Outbound要求发布为Webservice2、根据业务需求,用BPEL将这些WS串成一个个可监控的Flow1.1.2.优势OracleBPEL是标准化集成工具,建模速度快、部署成本低。企业的WS越成熟,BPEL的应用效果将越显著;BPEL还可以发送Mail、使用传统Adapter连接各类应用。信息技术最佳实践BPEL应用指南FileRef:1578646683549(v.DRAFT1A)CompanyConfidential-ForinternaluseonlyDocRef:DocumentReferenceNumberMarch6,2012BPEL基础.3of171.2.安装数据库产品环境BPELProcessManagerforMiddleTire:需要,可用9i或10g数据库。开发环境BPELProcessManagerforDevelopers:不需要,因为自带OracleLite。1.3.安装J2EE容器产品环境BPELProcessManagerforMiddleTire:需要,可用OracleOC4J。开发环境BPELProcessManagerforDevelopers:不需要,因为自带OC4J。1.4.安装BPELPM1.4.1.下载从OTN下载页面,在DeveloperTools下选择BPELProcessManager。测试下来,OracleBPELProcessManager10.1.2.0.2forOC4J可以使用:则有问题,无法启动BPELPMServer,报无法连接数据库,需要进入OC4J更改配置JDBC连接配置。为简单起见,这里用10.1.2.0.2。1.4.2.安装注意事项1、独立一个Home。大约需要816M磁盘空间。2、不管你的物理内存多大,都需要1535MB以上虚拟内存,这个比较烦,可以通过命令行启动安装程序,以跳过检查:setup.exe–ignoreSysPrereqs3、开发环境安装类型选择BPELProcessManagerforDevelopers信息技术最佳实践BPEL应用指南FileRef:1578646683549(v.DRAFT1A)CompanyConfidential-ForinternaluseonlyDocRef:DocumentReferenceNumberMarch6,2012BPEL基础.4of171.4.3.启动BPELProcessManagerWindows下,开始菜单中选择StartBPELPMServer。第一次启动,会编译很多类,并把一些应用Deploy到OC4J。同时启动的OracleLiteMultiuserService,不要关闭。1.4.4.启动DeveloperPromptWindows下,开始菜单中选择DeveloperPrompt。1.4.5.连接Olite数据库先启动DeveloperPrompt,执行polsql。其位于OB_HOME\integration\orabpel\bin。它实际是调用msql.exe完成连接:msql.exesystem/any@jdbc:polite4@localhost:100:orabpel1.4.6.启动BPELDesignerWindows下,开始菜单或桌面均有JDeveloperBPELDesigner,在这里完成BPEL开发。1.4.7.启动BPELConsoleWindows下,从开始菜单启动BPELConsole,默认密码是bpel,在这里完成BPEL的测试和监控。1.5.最简单的完整例子:HelloWorld1.5.1.在JDeveloperBPELDesigner中创建项目1、创建普通WorkspaceTutorialWrkspc2、新建BPELProcessProjectSyncHelloWorld,模版选择SynchronousBPELProcess。确定后将自动生成应用框架。信息技术最佳实践BPEL应用指南FileRef