- Количество слайдов: 48
SE 548 Process Modelling WEB SERVICE ORCHESTRATION AND COMPOSITION ÖZLEM BİLGİÇ
Overview n n n Definition of Web Services General View of Orchestration and Choreography Orchestration vs. Choreography Early Work in Web Service Orchestration Literature BPEL 4 WS Web Service Composition Example with BPEL 4 WS
Web Services n Web Services can convert your application into a Web-application, which can publish its function or message to the rest of the world.
Web Services n Communicate using open protocols Self-contained and self-describing Can be discovered using UDDI Can be used by other applications n XML is the basis for Web services n n n
Web Services n n n The basic Web services platform is XML + HTTP. XML provides a language which can be used between different platforms and programming languages and still express complex messages and functions. The HTTP protocol is the most used Internet protocol.
Web Services Platform Elements n n Web services platform elements: SOAP (Simple Object Access Protocol) UDDI (Universal Description, Discovery and Integration) WSDL (Web Services Description Language)
WS-Platform n n SOAP : SOAP is an XML-based protocol to let applications exchange information over HTTP. It is platform and language independent.
WS-Platform n n WSDL : It is an XML-based language for locating and describing Web services WSDL document structure composed by n n types : The data types used by the web service messages : The messages used by the web service port. Type : The operations performed by the web service The communication protocols used by the web service
The Main Structure of WSDL Document
WS-Platform n n UDDI : UDDI is a directory service where companies can register and search for Web services. It stands for Universal Description, Discovery and Integration It uses WDSL to describe interfaces to web services UDDI communicates via SOAP
Orchestration n n It describes how web services can interact with each other at the message level, including the business logic and execution order. With orchestration, the process is always controlled from the perspective of one of the bussiness parties.
Composition Of Web Services with Orchestration
Choreography n n n It relates to describing externally observable interactions between web services It is based on collaboration It tracks the sequence of public message exchanges that occur between multiple sources, including customers, suppliers, partners
Composition Of Web Services with Choreography
Orchestration vs. Choreography Orchestration n Centralized through explicit definitions of operations and the invocation order of Web Services n A single director in control Choreography n Tracks the sequence of publicly visible message exchange between multiple services n Participants has to know exactly when to become active
Early Work n Many languages have emerged in the literature for web service orchestration including WSCL, XLANG AND WSFL.
Web Service Conversation Language(WSCL) n n A simple conversation language standart based on modeling the sequnces of interactions among web services. It enables to define the abstract interfaces of web services.
XLANG n n It was developed by Microsoft. Focused on the creation of business processes and the interactions between web service providers. The specification provided support for sequential, parallel, and conditional process control flow. XLANG used WSDL as a means to describe the service interface of a process.
Web Service Flow Language(WSFL) n n WSFL was developed by IBM to specify public as well as private processes. It defines the execution order of activities and data exchanges for a process. It was integrated with XLANG language to create a BPEL 4 WS.
Orchestration Products n n n Open. Storm Service Orchestrator Microsoft Biz. Talk Server Collaxa IBM Web. Sphere Process Choreographer BEA Web. Logic 8. 1 …
Bussiness Process Execution Languages for Web Services (BPEL 4 WS) n n n BPEL 4 WS (Business Process Execution Language for Web Services) has recently been developed as a new workflow specification by IBM, Microsoft, and BEA BPEL 4 WS is a specification that models the behavior of web services in a business process interaction This specification is a result of integrating both XLANG and WSFL
BPEL 4 WS n n The specification provides an XML-based grammar for describing the control logic required to coordinate web services participating in a process flow. This grammar can then be interpreted and executed by an orchestration engine, which is controlled by one of the participating parties.
A BPEL 4 WS Process Flow BPEL 4 WSprocess defines the order in n which involved Web services are composed, either in sequence or in parallel.
BPEL 4 WS n n n BPEL 4 WS provides support for both executable and abstract business processes. An executable process models the behavior of participants in a specific business interaction, essentially modeling a private workflow. Abstract processes, modeled as business protocols in BPEL 4 WS, specify the public message exchanges between parties.
How to bulid a BPEL process? n A process consists of a set of activities. It interacts with external partner services through a WSDL interface. To define a BPEL process, we use 1. A BPEL source file (. bpel) which describes the execution order, activities and conditional behaviours. 2. A process interface (. wsdl) that defines the ports, the namespace, partner link types, operations, and messages which are required to determine process activities. WSDL files are needed in order to create a valid, executable BPEL definition.
BPEL 4 WS Process Elements and Properties n A BPEL process contains several structural parts:
BPEL 4 WS Process Elements and Properties n n n The process element : It is the root element of BPEL process definition. It has a name attribute and it is used to specify the definition related namespaces. Partner Links elements : These elements in a BPEL process define the interaction of participating services with the process. Variables elements : A BPEL process allows to declare variables in order to receive, manipulate, and send data. Fault Handlers element : A fault handler determines the activity which the process has to perform when an error occurs. Correlation Sets element : Message correlation is the BPEL mechanism which enables several processes to interact in Stateful conversation. Event handling element : An event handler allows the scope to response to events, or the expiration of timers, at any time during the execution of a scope.
BPEL 4 WS Process Elements and Properties n n Activities elements : Activities are the processing steps, performed in a BPEL body. Primitive Activities
BPEL 4 WS Process Elements and Properties n Structure and control activities : The combination of the primitive activities described above enables to build complex algorithms which define exactly the steps of business processes.
Web Service Composition Example with BPEL 4 WS n In this example, we show a client making a request in order to buy a flight ticket, rent a car and reserve a room for his travel. The Travel Agent (central process) will communicate with a hotel service, a car rent service and an airline service to fulfill the client’s wishes. Once a reservation is made, it is sent back to the client.
Travel Reservation Agent Process
Travel Reservation Agent Process n n A simplified bussiness process for a travel reservation agent is defined: The client invokes the business process, specifying his name, the destination, the departure date and the return date. The BPEL process checks if it is possible to book the flight ticket with Airline A. We assume that Airline Company A provides a Web service through which such bookings can be made. Then the BPEL checks if it is possible to rent a car from Car-Rent Company. We assume as well that the Car-Rent Company provides a web services through which such renting can be made. Finally, the BPEL process reserves a room from a hotel and returns the travel reservation summary to the client. We build a synchronous BPEL process. We assume that the Web services for booking the air plane ticket and the hotel as well as renting the car are synchronous because such data can be obtained immediately and returned to the requestor.
Getting Familiar With the Involved Web Services n Before starting the BPEL process definition, we need to get some information about the Web services involved in the process. These services are called partners. This example involves the Airlines web service, the Hotel web service and the Car rent web service.
Airline Web Service n The A Airline Web service is synchronous. It specifies one port type: Airline. Reservation which is used to book flight tickets through the book. Ticket operation. This operation returns the reservation result to the process
Hotel Web Service n The Hotel web service provides the Hotel. Reservation port. Type through which the room can be reserved by calling the reserve. Room operation. This operation will have an input message called reserve. Room and an output message (return message) reserve. Room. Response which contains a confirmation and the room number
Car Web Service n The Car Web service provides the Car. Reservation port. Type through which the car can be rent by the client by calling the rent. Car operation. This returns a confirmation and the car type attributed to the client
Define WSDL for the BPEL Processspecification of the process defines the The WSDL n n available port types for its clients as well as operations, messages, partner link types, and properties of interest to the process. The process receives messages from its clients and returns results.
WSDL for the Process
Define Partner Link Types n n n In this example, there are four different partners: the client who requests the reservation and invokes the Process, the airline web service to book the flight ticket, the hotel web service to book a room and the car rent web service. The WSDL of the process imports the WSDL of other web services providers and defines the partner link types for them. Client. Partner. Link : Used to describe the interaction between the client and the BPEL process itself. Airline. Partner. Link : used to describe the interaction between the Airline service provider and the BPEL process itself. Hotel. Partner. Link : used to describe the interaction between the BPEL process and the Hotel Reservation Web service. Car. Partner. Link : describes the interaction between the BPEL process and the Car Rent Web service.
Define the Bussiness Process n The BPEL process waits for an incoming message from the client which starts the execution of the business process. In our example, the client initiates the BPEL process through sending an input message.
Define the Bussiness Process n The main elements of the BPEL process construction: n Namespaces: here we define the target namespace and the namespaces to access the Airline WSDL, Hotel WSDL, Car WSDL, and the BPEL process WSDL description files. n Variables: they are used to store, reformat and transform messages. Each variable has a specific type like a WSDL message type, an XML Schema Simple Type. n Process logic definition: the process main body specifies the order in which the partner Web services are invoked. In our example, we start with a
The Simplified BPEL Process
The Simplified BPEL Process
The Simplified BPEL Process
Client Request Result