1 / 24

BPEL 在 WEB 服务中的应用

BPEL 在 WEB 服务中的应用. 主讲人 : 高守平. 主要内容. WEB 服务简介 WEB 服务的编写、测试、执行与整合 BPEL 简介 BPEL 基本活动 BPEL 结构化活动 BPEL 实例. Web 服务的概念 Web 服务( Web Service )指一台服务器通过软件向外界提供基于 Web 技术的服务 ,用户或应用软件能够通过 Internet 来访问 Web 服务。 Web 服务是自包含、自描述、模块化的应用程序。可以发布在 Web 上,并被发现和调用。 Web Service 是新一代分布式系统的核心,它具有如下特点:

gizi
Download Presentation

BPEL 在 WEB 服务中的应用

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BPEL在WEB服务中的应用 主讲人:高守平

  2. 主要内容 • WEB服务简介 • WEB服务的编写、测试、执行与整合 • BPEL简介 • BPEL基本活动 • BPEL结构化活动 • BPEL实例

  3. Web服务的概念 Web服务(Web Service)指一台服务器通过软件向外界提供基于Web技术的服务,用户或应用软件能够通过Internet来访问Web服务。 Web服务是自包含、自描述、模块化的应用程序。可以发布在Web上,并被发现和调用。 Web Service是新一代分布式系统的核心,它具有如下特点: 互操作性:任何的Web Service都可以与其他Web Service进 行交互。 普遍性:Web Service使用HTTP和XML进行通信。 行业支持:所有主要的供应商都支持SOAP和周边Web Service技术

  4. WEB服务体系结构 UDDI注册中心 发布 查找 服务提供者 服务请求者 绑定

  5. Web服务核心技术 • SOAP:简单对象访问协议,基于XML实现了消息格式,任何实现了基本INTERNET通信服务的系统都能处理和传送这类消息。 • WSDL:Web服务描述语言,用于描述如何使用SOAP来调用Web服务。 • UDDI:统一描述、发现和集成规范,是一种发布WEB服务和查询WEB服务的规范。

  6. BPEL:Business Process Execution Language 业务流程执行语言 Building Standards-Based Business Processes with Web Services

  7. 什么是业务流程 • 业务流程是将输入转化为输出的一系列工作和活动的集合。 • 在WEB服务中,流程中的活动相互关联,相互作用。 • 在Web服务中,相应的业务流程规范是基于XML的流程定义语言BPEL4WS。 • BPEL4WS是由IBM,Microsoft和BEA在2002年联合提出的用于WEB服务集成的新规范。

  8. Business Processes Flow • Business processes are a set of activities, supported by services, that support a particular business activity. • Business processes are business services built using other business services.

  9. BPEL • BPEL4WS是专为整合Web Services而制定的一项规范标准。 • BPEL描述流程 • 可执行工作流—描述业务交互中参与者的实际行为; • 抽象流程—描述各方参与者对外可见的消息交换。 • BPEL的作用是将一组现有的服务组合起来,从而定义一个新的Web服务。因此,BPEL基本上是一种实现此种组合的语言。组合服务的接口也被描述为WSDL portType的集合。

  10. BPEL

  11. What BPEL does … • BPEL binds services together to form larger complex business services • Control Flow (branch, loop, parallel) • Asynchronous correlation • Transaction support, Units of Work • Compensation

  12. Web Services Meet Business Processes Web Service 1 Web Service 4 Web Service 2 Web Service 5 Web Service 3 Web Service n

  13. CreditResponse InventoryResponse CreditCheck Purchase Order ReserveInventory Invoice Example Problem Space Credit Service Consolidate Results PO Service Client Inventory Service

  14. Coordinate asynchronous communication between services Correlate message exchanges between parties Implement parallel processing of activities . . . Manipulate/transform data between partner interactions Support for long running business transactions and activities Provide consistent exception handling . . . Business Process Challenges

  15. Orchestration(管弦乐编曲) vs Choreography(舞蹈编排) • 使用Orchestration,需要一个总控过程来控制涉及到的Web服务,并协调Web服务不同操作的执行。所涉及到的Web服务并不知道(也不必知道)它们是组合过程的一部分。只有中央的总控过程知道它们如何组合和协调 • Choreography并不依赖中央的总控协调过程。相反,每个涉及其中的Web服务都知道何时执行自己的操作,和谁交互。所有的Choreography参与者都需要知道业务流程,要执行的操作,要交互的消息,和交换消息的时机

  16. Orchestration(管弦乐编曲) vs Choreography(舞蹈编排) • 从组合Web服务来执行业务流程的角度来看,Orchestration比Choreography更灵活:1、我们知道谁负责执行整个业务流程。2、即使Web服务并不知道它们是业务流程的一部分,仍然可以把它们组合起来。3、当错误发生时,我们可以提供一个备选的Scenario • BPEL遵循Orchestration范式

  17. Recent History of Business Process Standards BPML (Intallio et al) BPSS (ebXML) WSCI (Sun et al) WS-Choreography (W3C) 2000/05 2001/03 2001/05 2001/06 2002/03 2002/06 2002/08 2003/01 2003/04 XLang (Microsoft) WSFL (IBM) WSCL (HP) BPEL4WS 1.0(IBM, Microsoft) BPEL4WS 1.1(OASIS)

  18. Choreography - CDL4WS Orchestration - BPEL4WS Standards Building Blocks of BPEL BusinessProcesses Transactions Quality ofService Coordination WS-Security WS-Reliability Context Management Discovery UDDI Description Description WSDL SOAP Message XML Transport HTTP,IIOP, JMS, SMTP

  19. BPEL4WS的活动

  20. 实例:订单处理流程的实现 图1 订单处理流程图

  21. 订单处理服务(OrderDS):接受客户请求并为客户提供商品的必要信息订单处理服务(OrderDS):接受客户请求并为客户提供商品的必要信息 • 订单审核服务(OrderSS):用于检验客户订单商品信息的正确性; • 支付服务(PService):根据商品价格实现现金收取或卡支付功能; • 送货服务(DService):根据客户订单中的邮寄地址实现送货功能。

  22. 流程PS的关键代码 • <process name=”PS” abstractProcess=”no”> • <squence> • <receive partner=”PService” portType=”PServicePT” container=”purchaseRequest” createInstance=”yes”> • </receive> • <invoke partner=”PService” portType=”PServicePT” operation=”chooseBank” inContainer=”paymentRequest” outputContainer=”paymentResponse”> • </invoke> • <invoke> • <invoke partner=”DService” portType=”DServicePT” operation=”chooseDeliveryCompany” inContainer=”deliveryRequest” outputContainer=”deliveryResponse”> • </invoke> • </sequence> • <reply partner=”customer” portType=”producerPT” operation=”sendOrderInformation”/> • </process>

  23. THANK YOU

More Related