18
David Kružić [email protected] Studienprojekt: DecidR+ 18. Januar 2010 WS – BPEL

WS – BPEL

  • Upload
    dorit

  • View
    50

  • Download
    0

Embed Size (px)

DESCRIPTION

WS – BPEL. Inhalt. Spezifikation Einführung BPEL Prozessdefinition BPEL Prozesstypen Aktivitäten Interaktionsaktivitäten Flow, scopes, fault und compensation handling anhand von einem Beispiel Weiterführendes Praktische Umsetzung Beispiel : Hello World!  Apache ODE & Eclipse IDE - PowerPoint PPT Presentation

Citation preview

Page 1: WS – BPEL

David Kružić[email protected]

Studienprojekt: DecidR+18. Januar 2010

WS – BPEL

Page 2: WS – BPEL

2

Inhalt

Spezifikation Einführung BPEL Prozessdefinition BPEL Prozesstypen Aktivitäten

Interaktionsaktivitäten Flow, scopes, fault und compensation handling

anhand von einem Beispiel Weiterführendes

Praktische Umsetzung Beispiel: Hello World! Apache ODE & Eclipse IDE

Projektbezug Ist-Zustand Soll-Zustand

Page 3: WS – BPEL

Spezifikation

Page 4: WS – BPEL

4

Einführung

Zusammenhang zu anderen Webstandards Prozessebene: BPEL Schnittstelle: WSDL Nachrichtenformat: SOAP Typ: XML Schema Ausdrucks Sprache: XPath 1.0

Die WSDL Schnittstelle

BPE

LPL

Typ

e

WS

DL

Message

Message Part

Process

Action

Partner Link

Port TypeOperation

Partner Link Type RoleB

PE

L

Page 5: WS – BPEL

5

BPEL Prozess Definition

Code Skelett

Orchestrierungsmodell

<process name="TimesheetSubmission" targetNamespace="http://www.xmltc.com/ptc/process/" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable/"

…> <partnerLinks>

…</partnerLinks> <variables>

… </variables> <faultHandlers>

<catchAll>…<catchAll></faultHandlers><sequence>

… </sequence>

</process>

WS1

WS2

WS3ProzessRequester

InboundOutbound

Page 6: WS – BPEL

6

BPEL Prozesstypen

Asynchron Wartet nicht Implementierung

durch invoke callback

Procedure Zwei portType’s

Executable xmlns=../executable Ausführbar Alles sichtbar Konkreter Workflow Beliebig viel

zusätzlicher BPEL Code

Abstract xmlns=../process Nicht Ausführbar Information hiding Process templates opaque = pflicht

Synchron Wartet auf

terminierung Implementierung

durch reply Function Ein portType

vs

vs

Page 7: WS – BPEL

7

Aktivitäten

Invoke Ruft einen externen

Partner (Service) auf

Reply Kommt normalerweise

nach receive

Receive (Start Aktivität)

<receivename="receiveInput" partnerLink="client" portType="tns:HelloWorld" operation="process"

variable="input" createInstance="yes" />

<invoke name=“callbackClient“ partnerLink="client" portType="tns:HelloWorldCB" operation="onResult"

inputVariable="input" />

<reply name=“replyOutput“ partnerLink="client" portType="tns:HelloWorld" operation="process“

variable="input" />

Fragen?

Page 8: WS – BPEL

8

Aktivitäten

While Nur eine Kind-Aktivität

Assign & Copy Literal Zuweisung Part‘s kopieren Query

eventHandlers Läuft asynchron ab

Sequence Nacheinander

Ausführung

<sequence name="name"><receive>…</receive> <assign>…</assign> <reply>…</reply>

</sequence>

<while><condition>

XPath Expression</condition><sequence>…</

sequence></while>

<assign><copy><from variable="Input" /><to variable="Output" />

</copy></assign>

<eventHandlers><onMessage …></onMessage><onAlarm

for="P_DT_H_M"></onAlarm>

</eventHandlers>

Page 9: WS – BPEL

9

Aktivitäten

Beispiel: Transaktion Flow: Parallele Ausführung Links: Ablauf synchronisieren Correlations: Instanz identifizieren

<flow> <links> <link name= "HotelApproval" /> <link name= "FlightApproval" /> </links> <receive name="receiveHotelApproval" ...> <sources><source linkName="HotelApproval" /></sources> <correlations><correlation set="tradeID" initiate="no" /></correlations> </receive> <receive name="receiveFlightApproval" ...> <sources><source linkName="FlightApproval" /></sources> <correlations><correlation set="ID" initiate="no" /></correlations> </receive> <scope name="invoiceSubmissionScope">…</scope> </flow>

Page 10: WS – BPEL

10

Aktivitäten

Scopes Abgesonderter Definitionsbereich Fault and compensation handling

Abfangen mit catch und catchAll Rekursiv

joinCondition Entspricht einer Startbedingung

<scope name="invoiceSubmissionScope"> <targets> <joinCondition>$EntriesApproval and $ExpensesApproval</joinCondition> <target linkName="HotelApproval" /> <target linkName="FlightApproval" /> </targets> <compensationHandler> <invoke name="withdrawInvoiceSubmission" ... /> </compensationHandler> <invoke name="submitInvoice" ... /> </scope>

Page 11: WS – BPEL

11

Weiterführendes

Fragen?

Es gibt viel mehr BPEL Konstrukte als vorgestellt!(siehe BPEL Spezifikation)

Extensions Laufzeit beeinflussende Extensions Optionale Extensions WS-BPEL4People WS-BPEL4SPE

Page 12: WS – BPEL

Praktische Umsetzung

Page 13: WS – BPEL

13

Beispiel: Hello World!

Beschreibung Input Variable wird ausgegeben

Lösungsansatz Synchron Ein SOAP Binding Simpler Web Service für Ein- Ausgabe

BPE

LPL

Typ

e

WS

DL HelloWorldResponseMessa

gepayload

HelloWorldreplyOutput

client

HelloWorldprocess

HelloWorldHelloWorldProvid

er

BPE

L

Page 14: WS – BPEL

14

Apache ODE & Eclipse IDE

Eclipse mit ODE Plugin Gut geeignet zum rumprobieren Verbunden mit tomcat Server Daher unkompliziertes Deployment Integrierter Web Service Explorer Graphische design Oberfläche

Apache

Tomcat

ODE

Eclipse

BPEL PluginDeploymen

t

WS Explorer

Page 15: WS – BPEL

Projektbezug

Page 16: WS – BPEL

16

Ist-Zustand

Modellierungstool Simple Programmblöcke:

if flow forEach

Simple und komplexe Variablen DWDL -> EDWDL -> BPEL

Human Task Web Service Tasks erstellen und Nutzern zuweisen Tasks löschen Tasks auslesen und verändern Alle Tasks auflisten Alle einem Tenant zugehörigen Tasks auflisten

Page 17: WS – BPEL

17

Soll-Zustand

Notizen aus dem Kundengespräch Extension of IF and Concurrent Tasks Deadline for Human Tasks Web Service Integration (RPC/Graphical) „Transaktions-fähigkeit“

Mögliche Lösungsansätze Zu den vorhandenen Workflow Elementen sequence

hinzufügen eventHandlers mit onAlarm Zu den vorhandenen Aktivitäten muss eine “Web

Service” Aktivität hinzugefügt werden. compensationHandler für umkehrbare Aktivitäten

Weitere Fragen?

Page 18: WS – BPEL

End Of Document