BPEL4WS Business Process Execution Language for Web Services ITK E54 kevät 2005 Ville Seppänen <rissepp@cc.jyu.fi>
Palveluarkkitehtuuri Palvelu: standardimuotoisen ja julkisen rajapinnan läpi käytettävä (ohjelmallinen) toiminnallisuus Selkeästi määritelty tehtävä, käyttötapa, semantiikka. Sisäinen toteutus kätketty, vrt. black box [SOA] implements business functionality as a set of shared, reusable services BPEL4WS:n suhde SOA:an?
BPEL4WS Business Process Execution Language for Web Services Alunperin BEA:n, IBM:n ja Microsoftin luoma Yhdistää kaksi aiempaa määritystä: WSFL and XLANG XML-sanasto koosteisten verkkopalvelujen määrittelyyn ja verkkopalveluista koostuvien prosessien suorituslogiikan kuvaamiseen: Service Orchestration Rakentuu muiden XML-standardien päälle: esim. WSDL ja XPath
Orchestration Describes how Web services can interact with each other at the message level, including business logic and execution order of the transactions These interactions may span applications and/or organizations, and result long-lived, transactional, multi-step processes. Refers to an executable business process that may interact with both internal and external Web services.
Transactions & Exceptions Transactional properties and handling of exceptions in BPEL processes are implemention on top of WS-Coordination and WStransaction specifications http://www-128.ibm.com/developerworks/library/ specification/ws-tx
Business process & workflow? Workflow Management Coalition Business process a set of one or more linked procedures or activities, which collectively realize a business objective or policy goal, normally within the context of an organizational structure defining functional roles and relationships Workflow the automation of a business process, in whole or in part, during which documents, information, or tasks are passed for action from one participant to another in compliance with the set of procedural rules
Toteuttaako BPEL4WS edellisen? Business Process Execution Language... a set of one or more linked procedures or activities, which collectively realize a business objective or policy goal Kyllä, mikäli aktiviteetit on esitettävissä verkkopalveluina ja liiketoiminnan tavoitteet on saavutettavissa niitä käyttäen
Toteuttaako BPEL4WS edellisen? the automation of a business process, in whole or in part, during which documents, information, or tasks are passed for action from one participant to another in compliance with the set of procedural rules Kyllä, mikäli dokumentit, informaatio on kuvattavissa XML-skeemoina; mikäli prosessin kulku on määritettävissä BPEL-kielen aktiviteeteilla; ja tehtävät voidaan tarjota verkkopalveluina. Ei aina mahdollista
Entä Business Process Management? Understanding, codifying, automating, and improving the way the company does business. Automation of the processes improves efficiency by elimination of unnecessary steps, brings better process control through standardizing working methods, and gives flexibility because software control over processes enables their re-design in line with changing business needs. BPEL tarjoaa välineistöä, mutta ei kerro kuinka pitäisi menetellä: ei tarjoa prosessistandardeja tai -käytänteitä, mittareita ymv.
BPEL-prosessin osat Business logic Process engine Composite Service / BPEL Process instantiate Process API Work Flow entry point Service API Internal App Service API External App Service API External App
BPEL4WS and WSDL BPEL processes link to Web services using WSDL interface descriptions WSDL defines the operations consumed in the process BPEL4WS defines the scheduling of the operations Also the BPEL process itself is published as a WSDL defined Web service WSDL describes the public entry and exit points of the process
Inside out -lähestymistapa Lähdetään liikkeelle prosessin sisältä prosessi kuvataan sen omistajan näkökulmasta omistaja = prosessin suorittaja roolit vaihtuvat näkökulman mukaan
BPEL4WS osaa... Määritellä prosessin rakenteen ja kontrollikulun (haaraumat, sisäkkäisyys, toisto, rinnakkainen suorittaminen...) Prosessissa vaihdettavien viestien yhdistämisen kontekstiin (message correlation, scope) Asynkronisen toiminnan (triggerit, eventit, timerit) ja tuen pitkäkestoisille tapahtumille Virhetilanteiden kuvaamisen ja kompensoinnin
BPEL integrointimenetelmänä Business Process Integration Application Integration Data Integration BPEL4WS WSDL/SOAP?
BPEL:n peruselementit Process - juurielementti Partners - prosessiin osallistuvat osapuolet/palvelut Partner links - kuvaa kahden tai useamman palvelun (rajapinnan) välisen vuorovaikutussuhteen prosessissa Variables - säilyttävät (WSDL-määritellyn) datan, jota prosessin aikana siirretään partnereiden välillä sekä prosessin tilainformaation jmv.
Basic activities <receive> block and wait for a message from partner <reply> reply back to the partner that sent the message received <invoke> call some other web service, either one-way or request-response <assign> assign or copy values to variables <throw> generate a fault <wait> wait for a given time period (time-out) or until a particular time has passed (alarm) <empty> a no-op http://www.activebpel.org/docs/architecture.html
Structured activities <sequence> execute children in order <switch> just like a switch or case statement <while> repeat an activity while a condition is true <pick> block and wait for a message, time-out, or alarm <flow> children are executed concurrently, links can provide additional control structure (link synkronoi rinnakkaiset aktiviteetit. transitioncondition, joincondition) http://www.activebpel.org/docs/architecture.html
Special activities <scope> define a new scope for variables, fault handlers, and compensation handlers <compensate> invoke compensation on an inner scope that has already completed normally <terminate> immediately terminate a business instance http://www.activebpel.org/docs/architecture.html
http://www.activebpel.org/docs/loanapproval.bpel.xml
Demot ja Cape Clear Orchestration Studio
Kolmansien osapuolten palvelujen WSDL-kuvaukset tuodaan (import) prosessiin paikallisesta tiedostojärjestelmästä
Partner linkit ja muuttujat määritellään tuotujen WSDLdokumenttien perusteella client/server ja peer-to-peer -linkkityypit
BPEL-aktiviteetit Ehtojen määrittely Xpath-muodossa Prosessin kulun määrittely Mieti poikkeukset (ja kompensointi)
Lisää... http://www.capeclear.com/download/kits/cc6/ Building_Orchestrated_Services.pdf http://www-128.ibm.com/developerworks/library/ specification/ws-bpel/