官术网_书友最值得收藏!

Chapter 2. Service Composition with BPEL

In this chapter, we will get familiar with BPEL concepts, and discuss composing services with BPEL. We will look at how to develop executable business processes. In a nutshell, we will:

  • Discuss service composition with BPEL
  • Explain how business processes are defined in BPEL
  • Get familiar with core concepts including:
    • The structure of BPEL process definitions
    • Invoking services
    • Synchronous and asynchronous processes
    • Partner links
    • The role of WSDL
    • Important activities and other constructs
    • Define an example BPEL process

Developing business processes with BPEL

BPEL uses an XML-based vocabulary that allows us to specify and describe business processes. BPEL is a programming language. Most development environments that support BPEL, such as Oracle JDeveloper, IBM WebSphere Integration Developer, or Eclipse usually provide a visual editor, where we can compose BPEL processes by dragging and dropping the BPEL activities in a visual way. However, the majority of tools also allow a switch to the source view, where you can enter the BPEL code directly. A BPEL visual representation is generated out of BPEL code. In this chapter we will look at the BPEL code.

With BPEL, you can describe business processes in two distinct ways:

  • Executable business processes: They specify the exact details of business processes and can be executed by a BPEL process server. In the majority of cases, we will use BPEL to specify executable processes.
  • Abstract business processes: They process templates or public message exchange between parties, without including the specific details of process flows. They are not executable and are rarely used.

This chapter focuses on executable business processes. Abstract business processes are covered in the next chapter.

Executable business processes are processes that comprise a set of services. When we describe a business process in BPEL, we actually define a new service that is a composition of existing services. The interface (WSDL) of the new BPEL composite service uses a set of port types, through which it provides operations like any other service. To invoke a business process described in BPEL, we must invoke the resulting composite service.

In a typical scenario, the BPEL business process receives a request. To fulfill it, the process then invokes the involved services and finally responds to the original caller. Because the BPEL process communicates with other services, it relies heavily on the WSDL description of the services invoked by the composite BPEL service.

Anyone developing BPEL processes requires a good understanding of WSDL and other related technologies. BPEL introduces WSDL extensions, which enable us to accurately specify relations between several services in the business process. These relations are called partner links. The following figure shows a BPEL process and its relation to services (partner links):

Developing business processes with BPEL

Any BPEL process specifies the exact order in which participating services should be invoked. This can be done sequentially or in parallel. With BPEL, we can express conditional behavior; for example, a service invocation can depend on the value of a previous invocation. We can also construct loops, declare variables, copy, assign values, define fault handlers, and so on. By combining all these constructs, we can define complex business processes in an algorithmic manner. We can describe deterministic as well as non-deterministic flows. Because business processes are essentially graphs of activities, it is sometimes useful to express them using a modeling notation, such as BPMN (Business Process Modeling Notation) or UML (Unified Modeling Language) activity diagrams. BPEL is not a modeling language for processes, but an execution language for processes and orchestration of services. To understand how business processes are defined in BPEL, we look at the core concepts in the next section.

主站蜘蛛池模板: 阿尔山市| 三台县| 汶上县| 茶陵县| 桑植县| 通城县| 太仓市| 彭阳县| 叶城县| 海口市| 和龙市| 临西县| 榆林市| 林州市| 凌海市| 县级市| 涟水县| 十堰市| 武清区| 上高县| 都兰县| 神木县| 蓝田县| 竹北市| 元江| 伊宁市| 都兰县| 喀喇沁旗| 旺苍县| 墨玉县| 砚山县| 台东市| 泗水县| 加查县| 永寿县| 安顺市| 鹿泉市| 永和县| 洪洞县| 会宁县| 绵竹市|