Presentation is loading. Please wait.

Presentation is loading. Please wait.

Protsesside realiseerimine, BPEL Tarvo Treier

Similar presentations


Presentation on theme: "Protsesside realiseerimine, BPEL Tarvo Treier"— Presentation transcript:

1 Protsesside realiseerimine, BPEL Tarvo Treier idu0110@gmail.com

2 Täna kavas Kordamine Projekt BPEL Ülesanded

3 Kordamine XML XSD WSDL SOAP Veebiteenus XPath XSLT

4 Projekt Iga grupp valib omale teema (vt. eelmise tunni suusalaenutust) ja kooskõlastab selle õppejõuga. Kui ise ei oska teemat valida, saate selle õppejõu käest. Kui tänase tunni jooksul on teema välja valitud, siis saate boonuspunkti. Projekt koosneb 3 osast:  Protsessi kirjeldus tekstiline (Use Case) graafiline (vabalt valitud notatsioonis eelmises tunnis mainitute hulgast)  Protsessi realisatsioon BPEL-is (+SoapUi projekt protsessi väljakutseks ja veebiteenused, mida protsess kasutab, kui need pole avalikud teenused) Kes soovib, võib protsessi kirjeldada kahes osas: teha nö. AS-IS analüüsi ja tehnilisele protsessile lähema TO-BE analüüsi. Projekti formaalse kirjelduse panen välja selle nädala lõpuks.

5 Mis on BPEL? Business Process Execution Language Wikipedia: http://en.wikipedia.org/wiki/Business_Process_E xecution_Language http://en.wikipedia.org/wiki/Business_Process_E xecution_Language Standard: http://docs.oasis- open.org/wsbpel/2.0/wsbpel-v2.0.pdfhttp://docs.oasis- open.org/wsbpel/2.0/wsbpel-v2.0.pdf Tutorial: http://www.netbeans.org/kb/61/soa/bpel- guide.html, http://weblogs.java.net/blog/kalali/archive/2007/0 5/a_scenario_base.html http://www.netbeans.org/kb/61/soa/bpel- guide.html http://weblogs.java.net/blog/kalali/archive/2007/0 5/a_scenario_base.html

6 BPEL <bpel:process name="simpleExampleProcess" targetNamespace="foo" xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:links="wsdl://elsewhere"> [... declarations omitted... ] [... more BPEL omitted... ] BPEL kood (XML) BPEL visuaalne vaade

7 BPEL protsess

8 BPEL elemendid(1) Help> SOA Development > BPEL Designer

9 BPEL elemendid(2) InvokeInvoke. Enables the business process to send a message to a partner web service. Invokes a one-way or request-response operation on a portType offered by a partner. The operation is defined in the partner's WSDL file. ReceiveReceive. Causes the process to wait for a matching message to arrive from a partner service. The process cannot continue or end until it receives a matching message from the partner service. ReplyReply. Causes the process to send a message in reply to a partner service's message that came through a Receive activity. Partner LinkPartner Link. Identifies a partner web service listed in the BPEL source code which will exchange messages with your business process. The relationships between your process and a partner web service are characterized by defining the "roles" played by each of the services and specifying the portType provided by each service to receive messages.

10 BPEL elemendid(3) AssignAssign. Copies the values of one variable to another, or assigns new data to variables using expressions. For details, see About the BPEL Mapper.About the BPEL Mapper EmptyEmpty. Expresses no particular activity, and thus is useful when a fault needs to be caught and suppressed. WaitWait. Instructs the process to wait for a specified time or until a certain time has passed. Only one of the expiration criteria must be satisfied. ThrowThrow. Generates a fault from inside a business process or throws an exception within a business process. It can be used to explicitly signal an internal fault of the process. ExitExit. Terminates the execution of a business process instance. RethrowRethrow. Rethrows the fault caught by the fault handler CompensateCompensate. Terminates the execution of a business process instance. CompensateScopeCompensateScope. Terminates the execution of a business process instance.

11 BPEL elemendid(4) IfIf. Specifies a conditional process behavior when one branch of activity is executed from a set of choices. WhileWhile. Repeats an activity as long as the specified condition is true. Repeat UntilRepeat Until. Repeatedly executes one or more activities as long as specific conditions hold true after the execution of each iteration. For EachFor Each. Repeatedly executes the activities contained inside a Scope activity N+1 times, where N equals the Final Counter Value minus the Start Counter Value. FlowFlow. Specifies one or more activities to be performed concurrently, one after another. SequenceSequence. Defines a collection of activities to be performed sequentially, in the order they are listed. PickPick. Waits for the occurrence of one of the defined events and then performs the activity associated with the event that occurred. The occurrence of these events is often mutually exclusive. If more than one event occurs, the one that occurred first is performed. ScopeScope. Defines a nested activity with its own associated local variables, fault handlers, partner links, and correlation sets.

12 <process name="tempConverter".... <variable name="invokeFaherenheitToCelsiusInput" messageType="ns1:FahrenheitToCelsiusSoapIn"/> <receive name="receiveInput" partnerLink="client" portType="client:tempConverter" operation="process" variable="inputVariable" createInstance="yes"/> <from variable="inputVariable" part="payload" query="/client:tempConverterProcessRequest/client:in put"/> <to variable="invokeFaherenheitToCelsiusInput" part="parameters" query="/ns1:FahrenheitToCelsius/ns1:Fahrenheit"/> <invoke name="invokeFaherenheitToCelsius" partnerLink="TempconvertService_PL" portType="ns1:TempConvertSoap" operation="FahrenheitToCelsius" inputVariable="invokeFaherenheitToCelsiusInput" outputVariable="invokeFaherenheitToCelsiusOutput"/>... <reply name="replyOutput" partnerLink="client" portType="client:tempConverter" operation="process" variable="outputVariable"/> Muutujate defineerimine Protsessi sisend Protsessi väljund Väärtuste omistamine (XPATH) Välise teenuse väljakutsumine

13 Ülesanne 1 Loo lihtne sünkroonne BPEL protsess, mille sisendiks on nimi (string) ja väljundiks sisestatud nimi + “, tere!”. Kutsu loodud protsess välja kasutades SoapUi-d

14 Ülesanne 2 Muuda Ülesanne 1 BPEL protsessi nii, et see kutsuks välja avaliku temperatuuri teisendamise veebiteenuse: http://www.w3schools.com/webservices/tempconvert.a smx?WSDL http://www.w3schools.com/webservices/tempconvert.a smx?WSDL Protsess peab tagastama konverteerimise tulemuse. Lisa protsessi uus sisendparameeter “action” ( valige ise sobiv andmetüüp ja võimalikud väärtused ) ja protsess peab “action” sisendi põhjal otsustama, kas kutsuda välja operatsioon FahrenheitToCelsius või CelsiusToFahrenheit. Kutsu loodud protsess välja kasutades SoapUi-d

15 Ülesanne 3 Võta aluseks eelmises tunnis kirjeldatud suusalaenutuse protsess ning loo selle protsessi realisatsioon Kutsu protsess välja SoapUI-d kasutades.


Download ppt "Protsesside realiseerimine, BPEL Tarvo Treier"

Similar presentations


Ads by Google