Integration heterogener verteilter Systeme mit WS-BPEL – ein Praxisbeispiel Dr. Wolf-Dieter Heinrichs
NSN Ringvorlesung ITmitte.de2 Ticket- System Einsatz- planung Dokumentation Auftragnehmer Portal Oracle SOA Suite Praxisbeispiel Telekom T-HOME Interface NSN Services SAP R3
Service (Dienst) Ein Service ist eine IT-Repräsentation einer fachlicher Funktionalität. Ein Service ist in einem Netzwerk verfügbar. Ein Service ist plattformunabhängig und die zugrunde liegende Implementierung ist transparent. Ringvorlesung ITmitte.de3
Web-Service Austausch von in XML serialisierten Nachrichten zwischen Services. Transport-Protokoll ist in der Regel HTTP(S). Die Einbettung der Daten in die Transport-Schicht wird durch SOAP beschrieben. Funktionale Servicebeschreibung durch WSDL (1.1 oder 2.0 – unterstützt semantische Erweiterungen). Lose Kopplung von Services wird ermöglicht (sync./async., homog./heterog. Daten-typen, stat./dyn. Bindung, Transaktion/Kompensation). 4Ringvorlesung ITmitte.de
Ein Beispiel einer Web-Service Nachricht 7D0631FC51DE4FC40195DABC PT4 PES T00:00: :00 TSK TT PT4 Infra BVG A3 - Prüfungen ortsveränderliche Betriebsmittel P10 Assigned T09:00: T09:00: T18:00: GERMANY BERLIN Kastanienallee 8 5Ringvorlesung ITmitte.de
Ein Beispiel einer WSDL (Ausschnitt) 6Ringvorlesung ITmitte.de
Einführung in WSDL Die Struktur eines WSDL Dokuments data type definitions.... definition of the data being communicated.... set of operations and the messages that are involved.... protocol and data format specification for each port type.... 7Ringvorlesung ITmitte.de
Das -Element Ein One-Way Operation Beispiel Ein Request-Response Operation Beispiel 8Ringvorlesung ITmitte.de
Binding to SOAP Ein Beispiel Das style Attribut kann die Werte "rpc" oder "document besitzen. Als Transport Protokoll wird SOAP über HTTP verwendet. Für jede veröffentlichte Operation ist eine soapAction zu definieren. Diese wird im HTTP- Header verwendet. Der input / output ist als literal encoded 9Ringvorlesung ITmitte.de
Einführung in SOAP Die Struktur einer SOAP Nachricht: contains application-specific information like authentication, transaction, messageID Ringvorlesung ITmitte.de
Einführung in SOAP Eine Beispielnachricht, eingebettet in einen HTTP-Request: POST HTTP/1.1 Content-Type: text/xml; charset=utf-8 Content-Length: nnnn SOAPAction: "anyURI" SUN und die darauf erfolgte mögliche Antwort: HTTP/ OK Content-Type: text/xml; charset=utf-8 Content-Length: nnnn Ringvorlesung ITmitte.de
Web Services Business Process Execution Language (WS-BPEL) BPEL ist eine XML-basierte Sprache zur Beschreibung von Geschäftsprozessen als Workflows. BPEL ist eine Sprache zur Serviceorchestrierung (Programmieren im Großen - das Spezifizieren der Geschäftslogik im Gegensatz zum Programmieren im Kleinen - die Implementierung der Geschäftsfunktionen). Prozesse in BPEL importieren und exportieren Informationen über Webservices. Konzeptionell ein Enterprise Service Bus (ESB). 12Ringvorlesung ITmitte.de
13Ringvorlesung ITmitte.de
14Ringvorlesung ITmitte.de
Ein WS-BPEL -Beispiel <from variable="InvokeGetAddressGeocode_GetAddressGeocode_OutputVariable" part="parameters" query="/ns4:GetAddressGeocodeResult/ns4:Result/ns4:Locations/ns4:Location/ns4:Latitude"/> <from variable="InvokeGetAddressGeocode_GetAddressGeocode_OutputVariable" part="parameters" query="/ns4:GetAddressGeocodeResult/ns4:Result/ns4:Locations/ns4:Location/ns4:Longitude"/> <invoke name="InvokeTaskTitle" inputVariable="InvokeTaskTitle_task_titleSelect_InputVariable" outputVariable="InvokeTaskTitle_task_titleSelect_OutputVariable" partnerLink="task_title" portType="ns8:task_title_ptt" operation="task_titleSelect"/> <case condition="string(bpws:getVariableData('InvokeTaskTitle_task_titleSelect_OutputVariable', 'TxbTaskTitleTableCollection', '/ns9:TxbTaskTitleTableCollection/ns9:TxbTaskTitleTable/ns9:txbTaskType')) != """> response ok 15Ringvorlesung ITmitte.de
Einführung in WS-BPEL... definition of variables... <receive name="receiveInput" partnerLink="inboundPl" portType="..." operation="..." variable="..." createInstance="yes"/> <invoke name=invokeOutput" partnerLink="outboundPl" portType="..." operation="..." inputVariable="..."/> Ringvorlesung ITmitte.de
Aktivitäten in BPEL (1.1 / 2.0) Services Invoke (invoke other web services) Receive (receive data and begin a new process) Reply (respond to an invocation) Activities Assign (assign values to varaibles) Compensate (compensate for tasks already executed) Empty Terminate / Exit (terminate the process) Throw (throw an exception) Validate (validate variables, only 2.0) Wait (stop process execution and wait) Structured Activities Flow (parallel processing) ForEach (repeat, only 2.0) Pick (pick the branch to execute based on a signal) RepeatUntil (conditionally repeat, only 2.0) Scope (hide complex activities) Sequence (sequence of activities) Switch / If (make decisions) While (conditionally repeat) 17Ringvorlesung ITmitte.de
Kompensation - Beispiel Ringvorlesung ITmitte.de18