semantic business process management lectuer 4 business ...€¦ · semantic business process...
TRANSCRIPT
Semantic Business Process Management
Lectuer 4 – Business Process Execution Language
Prof. Dr. Adrian Paschke
Corporate Semantic Web (AG-CSW)
Institute for Computer Science, Freie Universitaet Berlin
http://www.inf.fu-berlin.de/groups/ag-csw/
Arbeitsgruppe
Overview
Motivation BPEL
Basic Concepts
Data Handling
Structured Activities
State Management
Exceptions, Compensations, Event-handling
Auxiliary Activities
Summary
WS-Stack und -Standards
Description
HTTP, IIOP, JMS, SMTP Transport
XMLMessaging
SOAP
WSDL
UDDI Discovery
Transactions
CoordinationWS-SecurityWS-ReliabilityQuality of
Service
Orchestration
WS-BPELBusiness
Processes
Context
Description
Managem
ent
Choreography
WS-CDL
WS-BPEL XML-based language for the specification of business processes with several web
services.
Evolved from Microsofts„ XLANG (graph based) and IBMs WS-FL (algebraic).
Current version WS-BPEL Version 2.0 – Standardized draft by OASIS (Organization for the Advancement of Structured Information Standards).
Predecessor BPEL4WS 1.1 (2003) by BEA, IBM, Microsoft, SAP, Siebel
Similar to higher imperative programming languages (if, while,..).
BPEL is based on XML Schema, XPath and WSDL.
Recursive composition : BPEL process is itself a WS (WSDL with PortTypes, Operations, …)
History – WS-Orchestration
2000/05
XLang(Microsoft)
2001/03
BPML(Intallio et al)
2001/05
WSFL(IBM)
2001/06
BPSS(ebXML)
2002/03
BPEL4WS 1.0
(IBM, Microsoft)
BPEL4WS 1.1(OASIS)
WS-BPEL 2.0(started 2005)
2002/06 2003/01
WS-Choreography(W3C)
2003/04
WSCI(Sun etc.)
WSCL(HP)
2002/08
WS-BPEL
Process Example: Price Procurement
from
devx.com
WS-Orchestration with BPEL
S
e
r
vi
c
e
s
<process>
<sequence>
<receive
… />
<invoke
… />
</sequence>
</process>
Design Tool
BPEL
Process
Orchestration Server (BPEL Engine)
Process Designer
Publish
.NET
Java
Siebel
Orchestration vs. Choreography
WS-OrchestrationAn executable business
process under the control
of a central entity
WS-Choreography
describes rules for the interchange of
messages between entities, no central
control entity
Entities need to know, in which process
they will be embedded
WS-BPEL (OASIS),
Control entity: (BPEL Engine)WS-CDL (W3C Draft),
Choreography Description Language
BPEL Basic Concepts
BPEL Syntax
<process>
<partnerLinks> … </partnerLinks>
<variables> … </variables>
<correlationSets> … </correlationSets>
<faultHandlers> … <faultHandlers>
<compensationHandler> … </compensationHandler>
<eventHandlers> … </eventHandlers>
(activities)*
</process>
activities = <receive>, <reply>, <invoke>, <assign>, <throw>,
<terminate>, <wait>, <empty>, <sequence>, <switch>,
<while>, <pick>, <flow>, <scope>, <compensate>
Session- and/or
Transaction-IDs
Rollback - Code for
tacking back actionsMain Process flow
description
Prozess state,
Data interchange between
process and partner WS
Partner
communication - WS
with which the
process interacts
Exception
Handling
Code for handling events
Document-root (Container
for BPEL Script)
BPEL Syntax
<process>
<partnerLinks> … </partnerLinks>
<variables> … </variables>
<correlationSets> … </correlationSets>
<faultHandlers> … <faultHandlers>
<compensationHandler> … </compensationHandler>
<eventHandlers> … </eventHandlers>
(activities)*
</process>
activities = <receive>, <reply>, <invoke>, <assign>, <throw>,
<terminate>, <wait>, <empty>, <sequence>, <switch>,
<while>, <pick>, <flow>, <scope>, <compensate>
Session- and/or
Transaction-IDs
Rollback - Code for
tacking back actionsMain Process flow
description
Prozess state,
Data interchange between
process and partner WS
Partner
communciation - WS
with which the
process interacts
Exception
Handling
Code for handling events
Document-root (Container
for BPEL Script)
Partner Links (I) PartnerLink-Types (defined in WSDL)
<partnerLinkType
name="BuyerSellerLink">
<role name="Buyer">
<portType name="BuyerPT"/>
</role>
<role name="Seller">
<portType name="SellerPT"/>
</role>
</partnerLinkType>
PartnerLinks (defined in BPEL)
<partnerLinks>
<partnerLink
name="buying"
partnerLinkType="BuyerSellerLink"
myRole="Buyer"
partnerRole="Seller"/>
</partnerLinks>
Buyer(BuyerPT)
BuyerSellerLink
Seller
buying
Buyer
Process Remote
service
Seller(SellerPT)
Partner (BPEL Process and external WS)
provide message channels (defined in WSDL:
PortTypes, Operations)
WSDL with PartnerLinkTypes as Extensibility Elements<?xml version="1.0" encoding="UTF-8"?>
<definitions … >
<types>…</types>
<message …</message> …
<portType name=buyerPT„> … </portType> …
<binding > …</binding> …
<service > … </service> …
<partnerLinkType name=„BuyerSellerLink">
<role name=„Buyer“ portType=„buyerPT"/>
<role name=“…" portType=“…"/> <!– Import Partner WSDL -->
</partnerLinkType>
</definitions>
concrete binding: binding, service – port not part of BPEL -> BPEL Engine
needs to process infos from WSDL files
BPEL Syntax
<process>
<partnerLinks> … </partnerLinks>
<variables> … </variables>
<correlationSets> … </correlationSets>
<faultHandlers> … <faultHandlers>
<compensationHandler> … </compensationHandler>
<eventHandlers> … </eventHandlers>
(activities)*
</process>
activities = <receive>, <reply>, <invoke>, <assign>, <throw>,
<terminate>, <wait>, <empty>, <sequence>, <switch>,
<while>, <pick>, <flow>, <scope>, <compensate>
Session- and/or
Transaction-IDs
Rollback - Code for
tacking back actionsMain Process flow
description
Prozess state,
Data interchange between
process and partner WS
Partner
communication - WS
with which the
process interacts
Exception
Handling
Code for handling events
Document-root (Container
for BPEL Script)
Activities for the Interaction with Partners
<receive …/> Process receives a call on an provided operation from a partner
(block, process waits for call)
<reply …/> Process sends reply message to the requesting partner
(synchronized communication)
<invoke …/> Process calls an operation from a partner WS
<receive> ... <reply> Simple Synchronous BPEL Process
Source: http://www-128.ibm.com/developerworks/webservices/library/ws-bpelcol2/
1. Call processes (WS) from client partner
2. Accept the SOAP message
<receivepartnerLink="b” portType="SellerPT" operation=“sell" variable=“var_received“createInstance="yes"/>
Saves received message:
correspons with received message
type (WSDL)
Starts an instance of the BPEL
processes (BPEL scripts are
executed)
3-5. Call a partner WS with <invoke>
6. Send reply to client with <reply>
<reply
partnerLink="selling" portType="SellerPT" operation=“sell" variable=“var_reply"/>
like
<receive>
Reply message for the client; corresponds with
output message type of the opreation „sell“
(WSDL)
Optional ( redundant)
<invoke>
Synchronized call of an external Partner-WS via invoke
<invokepartnerLink="buying" portType="SellerPT" operation="buy" inputVariable=“var_send" outputVariable=“var_receive"/>
Ext. WS(SellerPT)
buy(itemid)
Prozess(BuyerPT)
buying
response
Variables correspond to WSDL
message types; are explicitly
declared
Contains the result
Messages and Variable
<message name=„buyingInformationMessage">
<part name=„customerID" type="xsd:string"/>
<part name=„productID" type="xsd:Integer"/>
<part name="amount" type="xsd:integer"/>
</message>
...
<variable name=”var_send”
messageType=”buyingInformationMessage”/>
... value assignment to var_send ...
<invoke
partnerLink="buying"
portType="SellerPT"
operation="buy"
inputVariable=“var_send"
outputVariable=“var_receive"/> BPEL
WSDL
Synchronous vs. Asynchronous BPEL processes Synchronous BPEL Processes: Reply direclty within the same TCP-
connection (Client is blocked and waits…).
WSDL interface of the processes (external: Operation): Request-Response type
<process> …
<receive …> <!– Initiierend --> . .... do processing .....
<reply …>
</process>
Asynchronous Processes: No reply or within a new connection – call a call back method of the clients (client does not wait)
WSDL interface of the processes: Request-only! Type
<process> …
<receive …> <!– Initiierend --> ....... Perform time-consuming processing .....
<invoke …> …
</process>
?
Synchronous vs. asynchronous request on external services
Synchronous communication
Operation of type Request-Response
Defintion of inputVariable and outputVariable !
Process provides no PortType, only the requested WS
Unidirectional partner link, only PartnerRole
Asynchronous communication
Two roles & & PortTypes are needed
PortType of the partners offering WS -> PartnerRole
PortType of the prozesses receiving Call-Backs -> MyRole
<partnerLinkType name=„bidirectionalLT"> <role name=„provider"> <portType name=„servicePT" /> </role> <role name=„consumer"> <portType name="CallbackPT" /> </role>
</partnerLinkType>
<partnerLinkType name=„unidirectionalLT">
<role name=„provider"> <portType name=„servicePT"/> </role>
</partnerLinkType>
Data Handling
BPEL Syntax
<process>
<partnerLinks> … </partnerLinks>
<variables> … </variables>
<correlationSets> … </correlationSets>
<faultHandlers> … <faultHandlers>
<compensationHandler> … </compensationHandler>
<eventHandlers> … </eventHandlers>
(activities)*
</process>
activities = <receive>, <reply>, <invoke>, <assign>, <throw>,
<terminate>, <wait>, <empty>, <sequence>, <switch>,
<while>, <pick>, <flow>, <scope>, <compensate>
Session- and/or
Transaction-IDs
Rollback - Code for
tacking back actionsMain Process flow
description
Prozess state,
Data interchange between
process and partner WS
Partner
communication - WS
with which the
process interacts
Exception
Handling
Code for handling events
Document-root (Container
for BPEL Script)
Data Handling - Variables
BPEL variable types are WSDL message types,
XML simple types or a
XML schema element.
<variables>
<variable name=“address“ messageType=“…"/>
<variable name="itemid“ type="xsd:int"/>
<variable name=“name“ element=“…"/>
…</variables>
Variables – value assignment (I)
Assignment with <assign> Sources are Variable contents, XPath expressions or literales.
Strong static type safety.
<assign><copy>
<from>1000</from><to variable="maxprice“/>
</copy>
<copy><from variable=“itemID”/><to variable=“ibis_request“ part=“itemIDPart”>
</copy>
<copy>
<from>$HelloOperationOut.parameters/return</from>
<to variable="OperationOut" part="main“
query=“/rueck/return</to>
</copy>
</assign>
Literal
Variable content
Message Type, attribute “part”,
XPATH 1.0 Expression: part as a combined type
Implicit value assignemnt with Receive<message name="creditInformationMessage">
<part name="firstName" type="xsd:string"/>
<part name="lastName" type="xsd:string"/>
<part name="amount" type="xsd:integer"/>
</message>
<variable name=”requestLoan” messageType=”creditInformationMessage”/>
...
<receive partnerLink="loanRequester" portType="loanProcess" operation="processLoanRequest" variable=”requestLoan”/>
WSDL
BPEL
The variable contrains the results of a request
Structured Activities
Structured Activities
Sequence Activities are executed in a sequential order
while Defines cyclic behavior
switch alternative selection, based on the evaluation of an expression
pick Event based, alternative selection, executes the first received
occurrence
flow Parallel activity
<sequence> Sequentiell execution
<sequence>
<invoke ../>
<receive../>
<invoke ../>
</sequence>
invoke
receive
invoke
<while>
As long as the condition is satisfied, do…
<while condition= "getVariableData('counter') > 12">
<!– some activities -->
</while>
The BPEL function getVariableData takes a variable as
argument… as well as optional a part of it and a XPath expression
(Message Type)
getVariableData(„variableName„ „main‟ ‟/counter‟)
<switch> Multiple case differentiation – only executes the branches with fulfilled
conditions.
Otherwise will be executed, if no other branch is selected (like “default” in Java)
<switch>
<case condition = "getVariableData(account) > 1000">
<reply partnerLink=“customer" operation=“helloIHaveMoney“variable=“MoneyPlus"/>
</case>
<case …
</case>
<otherwise>
<reply partnerLink=“customer" operation=“helloIHaveMoney“variable=“MoneyMinus"/>
</otherwise>
</switch>
<pick>
Event-based distinction: execute the first event occurence
<pick>
<onMessage partnerLink=”” portType=”” operation=””>
<!– some activities>
</onMessage>
<onMessage partnerLink=”” portType=”” operation=””>
<!– some activities>
</onMessage>
<pick>
Parallel Execution <flow>
Executed all child activities of <flow> in parallel
… and then wait, till all child are finished
<flow>
<invoke partnerLink="Lufthansa" operation=“getCheapestFlight" … />
<invoke partnerLink="Hapag Lloyd" operation=" getCheapestFlight " … />
<invoke partnerLink="BBA" operation=" getCheapestFlight " … />
<invoke partnerLink="Air Berlin" operation=" getCheapestFlight " … />
</flow>
<links> - dependencies within <flow>
<links> - modelling of dependencies between activities of a flow (directed graph).
<flow>
<links><link name=“firstBookFlightThenRentCar">
</links>
<!-- operation bookFlight --><invoke partnerLink="Lufthansa" operation=“bookFlight“ ..>
<source linkName="firstBookFlightThenRentCar“
transitionCondition=“getVariableData('var_receive‟ „main‟ ‟booking_state‟)=„true‟"/>
</invoke>
<!-- operation rentCar --><invoke partnerLink="Rent-A-Car" operation=“rentCar" ..>
<target linkName="firstBookFlightThenRentCar"/></invoke>
</flow>
outputVariable
State managment
Correlation Sets
BPEL Syntax
<process>
<partnerLinks> … </partnerLinks>
<variables> … </variables>
<correlationSets> … </correlationSets>
<faultHandlers> … <faultHandlers>
<compensationHandler> … </compensationHandler>
<eventHandlers> … </eventHandlers>
(activities)*
</process>
activities = <receive>, <reply>, <invoke>, <assign>, <throw>,
<terminate>, <wait>, <empty>, <sequence>, <switch>,
<while>, <pick>, <flow>, <scope>, <compensate>
Session- and/or
Transaction-IDs
Rollback - Code for
tacking back actionsMain Process flow
description
Prozess state,
Data interchange between
process and partner WS
Partner
communication - WS
with which the
process interacts
Exception
Handling
Code for handling events
Document-root (Container
for BPEL Script)
Motivation: State management via Correlation Sets
Source: http://developer.capeclear.com
Need for processes with several (blocking)
<receive> activities
Simple Example., process with two synchronous operations: setValue and getValue
setValue set a value, which will be retrieve by getValue
setValue starts a new process instance
In case of several „waiting“ instances: which instance should be assigned to the getValueoperations call? (new TCP conn.)
Solution: transfer unique identifier in the instance of a message (like cookies with Session-IDs)
Correlation Sets - Process Instance Routing
Different parties (bank, transport service, etc.) create transaction IDs.
BPEL: A correlationSet identifies uniquely the interaction of the process instance with a partner AccountID of the bank + account number of the customer
OrderID of the supplier
Session-ID
etc.
A correlationSet consists of at least on property
Properties are transported in a SOAP message
If the property values are equal with the values of the correlationSet of a process instance then the request will be assigned to the process instance by the BPEL-Engine
Otherwise the message will be ignored
Correlation Sets and Properties Define appropriate Property Elements , which uniquely assigns the message to a
process instance
<property name=“identifier" type="xsd:string"/>
Then PropertyAlias elements define an alias per request message, which show where the message can be found(Spezification of message type, part, XPath query).
<propertyAlias propertyName="identifier“messageType="setValueRequestMessage“
part="request“ query="/SetValue/Identifier"/>
<propertyAlias messageType="getValueRequestMessage“ part="request"
propertyName="identifier“ query="/GetValue/Identifier"/>
Define correlation sets (sets of properties)
<correlationSets>
<correlationSet name="instanceID“ properties="identifier" />
</correlationSets>
WSDL
WSDL
BPEL
<property name=“identifier" type="xsd:string"/>
<propertyAlias propertyName="identifier“ messageType="setValueRequestMessge
part="request“ query="/SetValue/Identifier"/>
<propertyAlias propertyName="identifier“ messageType="getValueRequestMessage“
…
<correlationSets>
<correlationSet name="instanceID“ properties="identifier" />
</bpws:correlationSets>
…
<receive partnerLink="client" operation="setValue" portType=“…“
createInstance="yes" variable="setValueRequestMessage">
<correlations> <correlation set="instanceID" initiate="yes/> </correlations>
</receive>
…
<receive partnerLink="client" portType="ns:Correlation"
operation="getValue" variable="getValueRequestMessage>
<correlations> <correlation set="instanceID" /></correlations>
</receive>
…
Example.: BPEL Message Correlation
WSDL
BPEL
Set property-values
(via Alias)
Compare property alias
values with property
values
Execptions, Compensations, Event-handling
BPEL Syntax
<process>
<partnerLinks> … </partnerLinks>
<variables> … </variables>
<correlationSets> … </correlationSets>
<faultHandlers> … <faultHandlers>
<compensationHandler> … </compensationHandler>
<eventHandlers> … </eventHandlers>
(activities)*
</process>
activities = <receive>, <reply>, <invoke>, <assign>, <throw>,
<terminate>, <wait>, <empty>, <sequence>, <switch>,
<while>, <pick>, <flow>, <scope>, <compensate>
Session- and/or
Transaction-IDs
Rollback - Code for
tacking back actionsMain Process flow
description
Prozess state,
Data interchange between
process and partner WS
Partner
communciation - WS
with which the
process interacts
Exception
Handling
Code for handling events
Document-root (Container
for BPEL Script)
Throw-Catch – Execption Handling (I) Several ways to handle faults (BPEL Exceptions)
WSDL Fault Message as reply to synchronous WS call
Automated failure signaling of the BPEL RE: wrong configuration, network communication error, etc.
Internal, explicit failure signaling with throw activity:
<throw faultName="NoDatabaseConnectionFault"/>
Not handled failure -> stop process, are not automatically forwarded to the client
faultHandlers: except if they are captured by Fault Handler; Fault Handler handles failure, by defining flows for specific failures
<faultHandlers><catch faultName="NoDatabaseConnectionFault">
<!-- Some Fault handling activities -->
</faultHandlers>
Throw Example<!-- Check if the credit card is accepted -->
<switch>
<case condition="getVariableData('BookResponse', 'confirmation', '/confirmation/accepted')='true'">
<!-- Make a callback to the client -->
<invoke partnerLink="Client„portType="buy:ClientCallbackPT„operation="ClientCallback„inputVariable="BookResponse" />
</case>
<otherwise> <!-- Throw fault -->
<throw faultName="CreditCardNotAccepted"/>
</otherwise>
</switch>
Catch Example<process ...>
<partnerLinks> ... </partnerLinks><variables> ... </variables><faultHandlers>
<catch faultName="CreditCardNotAccepted" ><!-- First fault handler; makes a callback to the client -->
<invoke partnerLink="Client" portType="buy:ClientCallbackPT„operation="ClientCallbackFault" inputVariable="Fault"/>
</catch>
<catch ... ><!-- Perform an activity -->
</catch>...<catchAll> <!-- optional -->
<!-- Perform an activity --></catchAll>
</faultHandlers>
<sequence> ... </sequence>
</process>
Copy failure info in the variable „Fault“ of Fault-
Message-Types
<assign><copy><from expression="string(‘Credit
Card Not Accepted')" /><to variable="Fault" part="error" />
</copy></assign>
Scopes and Fault Handling I
Scopes split complex processes into several contexts (sub processes)
Scopes can be defined sequentially or nested (hierarchically) -outermost scope:= <process>
Scopes allow defining different fault handler for different groups of activities (e.g. <sequence> or <flow>).
Additionally local variables can be defined in scopes, which are not visible outside of the scopes (but in sub scopes!)
Scopes allow additional definition of own Correlation Sets, Event Handler, etc.
Not handled faults within a scope -> forward to super scope… until <process>
Scopes and Faults Handling II<scope name=„Subprocess“> …
<!– some outer scope activities -->
<scope name=„SubSubProcess“>
<variables> <!-- Variables local to scope --> </variables>
<correlationSets> <!-- local Correlation sets --> </correlationSets>
<faultHandlers> <!-- local Fault handlers --> </faultHandlers>
<compensationHandler> <!-- local --> </compensationHandler>
<eventHandlers> <!– local --> </eventHandlers>
<!-- activities, e.g. <sequence> or <flow> -->
</scope>
<!– some outer scope activities, e.g. <sequence> or <flow> -->
</scope>
Global Fault Handler allow controlled reaction on faults
But: Process jumps into failure handling routine and terminates
Scoped faultHandler: Local fault handing, process might continue … or, if no further process execution is possible
Rollback: call compensationHandlers of already executed scopes -> roll-back their activities -> consistence
Sequence with three Scopes and Fault in the third scope.
Transaction Control: Rollback
Scope 1 Scope 2 Scope 3
Handle new
failures
Eventually backtrack
previous (successful)
activities
compensationHandler faultHandler
BPEL Syntax
<process>
<partnerLinks> … </partnerLinks>
<variables> … </variables>
<correlationSets> … </correlationSets>
<faultHandlers> … <faultHandlers>
<compensationHandler> … </compensationHandler>
<eventHandlers> … </eventHandlers>
(activities)*
</process>
activities = <receive>, <reply>, <invoke>, <assign>, <throw>,
<terminate>, <wait>, <empty>, <sequence>, <switch>,
<while>, <pick>, <flow>, <scope>, <compensate>
Session- and/or
Transaction-IDs
Rollback - Code for
tacking back actionsMain Process flow
description
Prozess state,
Data interchange between
process and partner WS
Partner
communication - WS
with which the
process interacts
Exception
Handling
Code for handling events
Document-root (Container
for BPEL Script)
Compensation Handling
Compensation of Effects.
<compensate scope="ScopeName“/>
Are handled by compensationHandler
<scope name=“ScopeName”>
<compensationHandler>
<invoke partnerLink="bidding" portType="AuctionPT"operation="undoBid" inputVariable="productID"> <correlations><correlation set="visitorID" initiate="no“ …/>
</correlations></invoke>
</compensationHandler>
BPEL Syntax
<process>
<partnerLinks> … </partnerLinks>
<variables> … </variables>
<correlationSets> … </correlationSets>
<faultHandlers> … <faultHandlers>
<compensationHandler> … </compensationHandler>
<eventHandlers> … </eventHandlers>
(activities)*
</process>
activities = <receive>, <reply>, <invoke>, <assign>, <throw>,
<terminate>, <wait>, <empty>, <sequence>, <switch>,
<while>, <pick>, <flow>, <scope>, <compensate>
Session- and/or
Transaction-IDs
Rollback - Code for
tacking back actionsMain Process flow
description
Prozess state,
Data interchange between
process and partner WS
Partner
communciation - WS
with which the
process interacts
Exception
Handling
Code for handling events
Document-root (Container
for BPEL Script)
Events
Leave the primary process path
In case of faults (Fault Handler)
In case of particular event occurences (Events)
BPEL has two types of events:
<onMessage> - Message-Events
Triggered by a received message, i.e. operation call
<onMessage> syntax like <receive>, has the same attributes
<onAlarm> - time-based alarm events
(date, time, duration from XML Schema, ISO 8601)
After a time interval (for attribute)e.g.:<onAlarm for 'P1M3DT4H10M„> <!– P=Period of… -->
At a certain time point (until attribute) e.g..:<onAlarm until '2007-03-18T21:00:00+01:00„>
Pick Activity - Events<pick>
<onMessage partnerLink="name"portType="name"operation="name" variable="name">
<!-- Perform an activity or a set of activities enclosed by <sequence>, <flow>, etc. or throw a fault -->
</onMessage>
<onMessage ...><!-- Perform an activity -->
</onMessage>
...
<onAlarm ...><!-- Perform an activity -->
</onAlarm>
<onAlarm for="'PT15M'"> <!–- Nachrichtenlos für 15 Minuten --><throw faultName="Timeout"/>
</onAlarm>
...
</pick>
Event Handler <pick>, if a process should wait on an event
If process should be continued normally, without waiting on the events, but should handle occurred events -> Event Handler
Typical example: incoming „cancellation message„ of a client for a certain transaction (e.g. travel booking)
Event Handler for a complete process or specific scopes
<process ...>
<partnerLinks> ... </partnerLinks>
<variables> ... </variables>
<faultHandlers> ... </faultHandlers>
<compensationHandler> ... </compensationHandler>
<eventHandlers>
<onMessage ...> <!-- Perform an activity --> </onMessage>
<onAlarm for="'PT15M'"> <throw faultName="Timeout" /> …</onAlarm>
</eventHandlers>
<!-- activities -->
</process>
Additionally…
Auxiliary Activity <empty/> <empty/> activity…does nothing
Some constructs require at least one activity
Example:
<pick>
<onMessage partnerLink="JamesBond"
operation="deaktivieren„ … >
<empty/>
</onMessage>
<onAlarm for="'PT30S'">
<invoke partnerLink="Bombe"
operation="explodiere„ … />
</onAlarm>
</pick>
Auxiliary Activity <terminate/>
<terminate/> terminates the process
Example:
<pick>
<onMessage partnerLink="Kunde„operation="bestätigen">
<reply partnerLink="Kunde" operation="bestätigen„
variable="true"/>
</onMessage>
<onAlarm for="'P30D'"> <terminate/> </onAlarm>
</pick>
Auxiliary Activity <wait/>
<wait/> wait for a certain time span or till a
fixed time point
Examples:
<wait for="'PT30M'"/>
<wait until="'2007-12 14T09:45+01:00'"
/>
Activity <if> <if> - simple case distinction
<if >
<condition> ( $userdata.password = $inputVar.inputType/paramA )
</condition>
<!– some activities -->
<else>
<!– some activities -->
</else>
</if>
BPMN to BPEL Mapping
Callenges BPMN and BPELWS Mapping
BPELWS is a block structured language and BPMN is a graph language – BPELWS is less expressive than BPMN
BPMN meta-model contains all objects and properties to generate deploy-ready BPELWS (with the exception of correlation set)
You can always generate a BPMN model from a valid BPEL.
Generating a BPEL from a valid BPMN model sometimes is not possible e.g. Discriminator Pattern
Example BPMN – BPEL Mapping
Example BPMN – BPEL Mapping
Example BPMN – BPEL Mapping
Example BPMN – BPEL Mapping
BPEL / BPMN Mapping
BPELProcess
namespaces
targetNamespaces
suppressJoinFailure
partnerLinks
Variables
variable
messageType
Type/ElementType
FaultHandlers
catch/catchAll
EventHandlers
OnMessage/OnAlarm
CompensationHandler
Activity
BPMNDiagram
namespaces
Process
targetNamespaces
suppressJoinFailure
Message
Property
BoundaryEvent
Intermediate Event
BoundaryEvent
Task
BPEL / BPMN Mapping (2)
BPELActivity
Receive
Reply
Invoke
Throw
faultName
Wait
Sequence
Activity
Switch
While
Pick
Flow
Activity
Scope
FaultHandlers
Catch/catchAll
EventHandlers
OnMessage/OnAlarm
Variables
variable
MessageType
Type/ElementType
Compensate
BPMN
StartEvent/Task
EndEvent
Task
EndEvent
errorCode
IntermediateEvent
Task
Gateway
Subprocess
GateWay
GateWay
Task
Subprocess
BoundaryEvent
Intermediate Event
Message
Property
EndEvent
Summary
Overview on BPEL language constructs
( <if> )
Summary BPEL Abstract communication with Web Services
Defined via process-wide „Partner Links“
PartnerLinks refer to associated WSDL description
BPEL runtime environment (BPEL-Engine) is a Web Service Server and Web Service Client
Constructs for control flow and execution (like in higher programming languages)
Persistent process variables
Fault handling and compensation language constructs
Supports parallel and event-based execution
BPEL Engines
Apache jBPM 4.0
Microsoft: BizTalk Server
IBM WebSphere
Oracle AS
BEA WebLogic
SUN Application Server
Collaxa
webMethods
Active Endpoint‟s activeBPEL
…
Processdesigner – Netbeans 5.5
Collaxa BPEL Designer
Daneben: activeBPEL, Oracle JDeveloper, …
Questions and Literature Questions?
Books: Chapter about BPEL „Web Services Platform Architectures“, S. Weerawarana et al.
„Service-orientierte Architekturen mit Web Services“, Dostal et al.
Informationen im WWW WS-BPEL 2.0 Specification Draft (OASIS)
http://docs.oasis-open.org/wsbpel/2.0/wsbpel-specification-draft.htmlArtikel
Tutorials and Examples Sun Developer Network: Business Process Execution Language
http://developers.sun.com/prodtech/javatools/jsenterprise/nb_enterprise_pack \/reference/techart/bpel.html
Oracle: A Hands-on Introduction to BPEL1+2http://www.oracle.com/technology/pub/articles/matjaz_bpel1.html
Oracle: BPEL Tutorialhttp://www.oracle.com/technology/products/ias/bpel/pdf
IBM: Business Process with BPEL4WShttp://www-128.ibm.com/developerworks/webservices/library/ws-bpelcol1/
Capecear: BPEL Webhelp-Pageshttp://developer.capeclear.com/files/WebHelp
Free Modeling Tools and BPEL-Engines Apache jBPM 4.0
Active Endpoint: activeBPEL 3.0 - http://www.active-endpoints.com/
Sun: Netbeans incl. SOA Pack und AppServer- http://netbeans.org