You are on page 1of 30

Web Service – Business Process Execution

Language

16/6/09 1
` Flow of activities that together create value
◦ e.g. order management, reserve a good (car, ticket,
etc.)

` Nowadays activities in a business process


mostly IT-based
◦ e.g. place an order, create customer (in DB)

` With SOA (service oriented architecture),


exposed as a service over a network.

16/6/09 2
` Business Process Execution Language
` A language to specify the behavior of
business processes between Web Services
as a flow of Web service interactions
` Interactions with Web Services are defined
by activities that reference to WSDLs

16/6/09 3
` BPEL Process uses Web Services
◦ (Composition of several Web Services)

Image from [3]

16/6/09 4
` BPEL Process is a Web Service
◦ provides WSDL port types and operations

Image from [3]

16/6/09 5
` Merge of two former XML-based languages
for service composition
◦ IBM’s Web Service Flow Language (WSFL), graph-
oriented style
◦ Microsoft’s XLANG, algebraic style
` BPEL Version 1.0 (BPEL4WS)
◦ released by IBM, Microsoft and BEA in August 2002
` BPEL Version 1.1 (WS-BPEL 1.1)
◦ submitted to OASIS, Standard since 2003
` BPEL Version 2.0 (WS-BPEL 2.0)
◦ Committee Specification since January 2007

16/6/09 6
` 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

16/6/09 7
` Process
◦ root container of a BPEL process
` PartnerLinks
◦ binding parties the process interacts with
` Variables
◦ data variables used in the process (message types, schema elements, schema types)
` CorrelationSets
◦ Correlating messages to process instances based on unique identifiers
` Several Scopes, e.g.:
◦ Fault Handler
x Performs activities in case of a failure
◦ Event Handler
x Invokes concurrently to normal process if a given event occurs
◦ Compensation Handlers
x Invokes compensational behaviour
` Activities
◦ Structured Activities
x Contain activities, define business logic between them (e.g.: Sequence, If/Else, …)
◦ Basic Activities
x Contain task, but no other activity (e.g.: Invoke, Receive, …)

16/6/09 8
Image from [1]

16/6/09 9
Image from [1]
16/6/09 10
16/6/09 11
16/6/09 12
16/6/09 13
16/6/09 14
container for
•<partnerLinks>
•Root
•Documentation construct
section
process
defines different parties
that interact
•Name
•Can bedefined
added with
to the
all constructs
business process.
(for human
documentation)
•Each <partnerLink>
•Process is either characterized by
• partnerLinkType
•Abstract or and
• one or two
•Executable (here)
role name.

16/6/09 15
•<faultHandlers>: contains fault handlers
•Define activities that must be performed in
response to faults (occured in the invocation of
assessement and approval services)

•<variables> defines variables used by the process


•Defined as
•WSDL message types or
•XML Schema types (simple or complex)

16/6/09 16
•Start of main activity of process (each process has one)
•Can be one of:
activity
•<sequence>
•<flow> activity
used used
to specify
to define
activities
a collection
to be of
<receive>, <reply>,<invoke>,<assign>, <throw>,
activities (performed
performed concurrently.
sequentially in lexical order).
<exit>,<wait>, <empty>, <sequence>,<if>,<while>,
•<links> can be used within a <flow> to define
<repeatUntil>,<forEach>,<pick>,<flow>,<scope>,
explicit activity:
•<receive> control dependencies
wait for message
between
to arrive.
nested child
<compensate>, <compensateScope>, <rethrow>,
activities.
<validate>, <extensionActivity> 16/6/09 17
•Each activity has optional containers <sources> and
<targets>
•contain standard elements <source> and <target>
respectively
•<source> and <target> elements: used to establish
synchronization relationships through links

•<assign> activity: used to update the values of


variables with
•<invoke> activity:
new data.
allows to invoke a one-way or
•can contain any number
request-response of elementary
operation assignments
on a portType offered by a
(<copy> or data update operations).
partner
16/6/09 18
16/6/09 19
16/6/09 20
•<reply> activity: send a message in reply to a
message received by an inbound message activity

16/6/09 21
` Basic Activities
◦ Contain other activities
◦ Define business logic between them

` Structured Activities
◦ Execute a task

16/6/09 22
` Invoke
◦ Invoking a one-way (async) or request-response (sync)
on a port type bound by a partner link
` Receive
◦ Wait for the receipt of a given message via the process‘
own port type
◦ The process block until the message is received
` Reply
◦ Sending a response in reply to a message that was input
to a Receive before a ReceiveReply in a BPEL process
corresponds to a request
` Assign
◦ Performs one or a set of data manipulations

16/6/09 23
` Throw/(Rethrow)
◦ Generate a fault during the execution of the BPEL
process
◦ Rethrow passes on an an already thrown fault to the
enclosing scope (like in programming language)
` Wait
◦ Wait for a given time period or until a certain time has
passed
` Empty
◦ Sometimes it might be helpful to do nothing...

` ExtensionActivity
◦ Allows to define additional behavior that is not part of
the BPEL specification

16/6/09 24
` Sequence
◦ Executes the contained activities in a sequential order
` If/Else
◦ Selects exactly one branch from a set of choices
` While/RepeatUntil
◦ Executes the contained activity as long/until a given conditions becomes
true
` Pick
◦ Block and wait for one event from a given set of events (an event is is an
incoming message or a time-out alarm)
` Flow
◦ Parallel and control dependencies processing. Activities in a flow are
performed concurrently. Links might be used to establish dependencies
(resulting in a graph-like control flow)
` Scope
◦ Allows to define a nested activity having their own variables, fault
handlers, event handlers and compensation handlers

16/6/09 25
` Declare the Web services and roles used by
the process
` Tied to WSDL of the process itself and the
participating Web services by partner link
types

16/6/09 26
` Data is written to and read from lexically
scoped, typed variables
` Values are either
◦ messages exchanged or
◦ intermediate data that is private to the process
` Data can be read or written by
◦ activities that exchange messages
◦ the assign activity

16/6/09 27
` BPEL executed by BPEL engines
◦ Open Source Engines
x Apache ODE (Orchestration Director Engines)
x http://ode.apache.org/
x Active BPEL (Community Edition)
x http://www.active-endpoints.com/
x Intalio BPMS (Community Edition)
x http://www.intalio.com/
x Jboss JBPM
x http://www.jboss.org/jbossjbpm/
◦ Commercial Engines
x ActiveVOS, Oracle BPEL Process Manager, …

16/6/09 28
` With Apache ODE
` Installation of ODE:
◦ Eclipse
◦ Tomcat (installed and configured in eclipse)
◦ Install BPEL-Editor (http://www.eclipse.org/bpel/ )
x Software Updates, Available Software, Add Site (
http://download.eclipse.org/technology/bpel/update-site/ )
◦ Download ODE WAR distribution
x http://ode.apache.org/getting-ode.html
x Extract zip file, import WAR file in eclipse
x Publish ODE project on tomcat (server tab eclipse – right
click on server – Add and Remove Projects – add ode project)

16/6/09 29
` [1] WSBPEL Specification 2.0 http://docs.oasis-
open.org/wsbpel/2.0/wsbpel-v2.0.pdf
` [2] Marco Zapletal, BPEL in a nutshell
` [3] Nitzsche et. al., BPELlight
` [4] Open Source BPEL Engine,
http://twit88.com/blog/2007/10/08/open-source-bpel-engine/
` [5] BPEL-Tutorial, Daniel Lübke, Leibniz Universität Hannover
◦ http://www.se.uni-hannover.de/lehre/tutorials/BPEL-ODE-Eclipse.php
◦ http://www.se.uni-hannover.de/lehre/tutorials/BPEL-ODE-HelloBPEL.php

16/6/09 30

You might also like