Presentation is loading. Please wait.

Presentation is loading. Please wait.

Aplicatii Web bazate pe semantica, agenti si servicii

Similar presentations


Presentation on theme: "Aplicatii Web bazate pe semantica, agenti si servicii"— Presentation transcript:

1 Aplicatii Web bazate pe semantica, agenti si servicii
Universitatea Politehnica Bucuresti Anul universitar , Master Adina Magda Florea

2 Orchestrarea serviciilor Web
Standarde pentru servicii – pozitionare Modelarea procesului de business BPML UML Orchestrarea procesului de business WSBPEL ebXML Orientare pe procese

3 Standarde pentru servicii Web

4 Modelarea proceselor Modelarea proceselor
Reprezentarea unei secvente ordonate de activitati de business si a continutului informational asociat Un model de proces = diagrame de flux de activitati care contin suficiente detalii a.i procesul sa poata fi analizat, simulat si executat BPMN permite modelarea proceselor utilizarea unor metodologii diverse cat si scopuri diverse in modelare (de ex orchestrare si coreografie)

5 BPMN BPMN este o reprezentarea grafica pe baza de organigrame pentru definirea BP (Business Processes) BPMN ofera un mecanism pentru generarea BP executabile (BPEL) din aceasta reprezentare grafica BP modelat in BPMN poate fi direct dat unui motor BPEL pentru executie

6 Originile BPMN BPMI (Business Process Management Institute) – acum parte a OMG a dezvoltat BPML (un limbaj bazat pe XML pentru executarea BP) BPML a fost mai tarziu inlocuit de BPEL BPMN Mai BPMN 1.0 Februarie 2006 BPMN 1.0 adoptat ca standard OMG la ora actuala exsita 39 de mari companii care au implementari ale BPMN

7 BPMN – elemente de baza BPMN este format dintr-o multime de elemente grafice Defineste Business Process Diagram (BPD) – flowchart pentru crearea modelelor grafice a operatiilor BP 4 categorii de baza de elemente Flow Objects Connecting Objects Swimlanes Artifacts

8 Flow Objects Events = ceva ce se intampla in timpul unui BP
Activity = atomice sau non-atomice (compuse) Task – activitate atomica Sub-Process – dezvoltare ierarhica Se pot executa o data sau pot avea bucle interne Gateway = divergenta sau convergenta unui secvente de flux – element de decizie start intermediate end Task Sub-Process + Looped task

9 Event Events = ceva ce se intampla in timpul unui BP Start
untriggered message (procesul incepe la receptionarea unui mesaj; se poate implementa ca un WS) timer – procesul incepe la o data/ora specificata sau la un interval de timp (ciclic) rule – procesul incepe odata cu executia unei reguli link – un sub-proces al procesului curent incepe la terinarea unui alt sub-proces al procesului curent Intermediate – la fel + Error – arunca o eroare Compensation – indica encesitatea unei compensari (apel compensare) End – la fel cu Intermedaite + Terminate – termina toate activitatile din proces fara alte compensari sau evenimente start intermediate end

10 Activity Tasks User tasks – necesita interventie umana in aplic software (eg introduce date client) Manual tasks – facute de o persoana fara software (eg cheama seful) Service tasks – fara interventie umana (eg apel fct software, WS) Send task – trimite mesaj catre sistem sau persoana Receive task –asteapta un mesaj de la sistem sau persoana Reference task – refera un task deja existent (impiedica duplicare taskuri) Sub-processes Embedded – continut integral in procesul parinte si executat in acesta; au acces la aceleasi Data Objact ca procesul parinte Independent – apel al unui proces separat care poate fi apelat si din alt proces; nu are acces la Data Objects a procesului parinte Transactions – comportarea sub-procesului este acea a unui protocol de tranzactie Activity markers – pt bucle

11 Exemplu Sub-procese Evenimente intermediare
Business process modelling (BPM) and Workflow Management (WfM) are two popular subjects in the area of information systems research. At first sight, they seem very similar: BPM and WfM foster a mainly  process-oriented perspective on organisations. The process-oriented view comprises activities and their relationships within and to an organisation's context. Relationships among business processes might be specified using control flow (consecutive, parallel, or alternative execution), hierarchical decomposition and/or generic relationships. Relationships to the organisational context comprise the assignment of organisational units (company, department, role) and resources (tools, machinery). However, the different view points taken by BPM and WfM, respectively, have lead to conceptual differences, which require thorough analysis before a mapping of both approaches can take place. They represent  different levels of abstraction on process-oriented organisations. The following table displays typical differences found in the literature: Business Process Includes manual activities/processes [FrLa03] "Conceptual level" of the enterprise (e.g. [Böhm00]) Business processes can be related to every kind of resource (i.e. not only IT) [Jung01] ModellingWorkflow Management Focusses on processing of digital business/office documents [FrLa03] Manual processes or decision making processes are not considered [FrLa03] Emphasises use of information technology [Böhm00, p. 3] Workflows are business processes combined with IT [Sta97] Evenimente intermediare

12 Gateways Utilizate pentru: branching, merging, forking, joining, conditional decisions Exclusive gateways (XOR) = decizii – numai o cale posibila Mecanisme de decizie: date (eg expresii conditionale) evenimente (eg receptia unui mesaj) Inclusive gateways (OR) = utilizate ca fork = mai multe iesiri posibile; utilizate ca merge, sincronizeaza fluxuri de intrare dar nu asteapta pentru toate Complex gateways = utilizate ca merge = expresia determina care flux de intrare este necesar pentru a continua Parallel gateways (AND) = fork sau merge mai multe cai paralele; folosita ca sincronizare (wait for) cai paralele de intrare

13 Connecting Objects Sequence flow = ordinea activitatilor intr-un proces Message flow = fluxul de mesaje intre 2 participanti diferiti la proces Association = asociaza date, text sau alte artefacte cu flow objects Asocierile sunt utilizate pentru a arata intrarile si iesirile activitatilor

14 Exemplu

15 Swimlanes Pool = reprezinta un participant la un process
Nume Pool = reprezinta un participant la un process Grupeaza activitati in B2B; 2 entitati/participanti Lane = sub-partitie intr-un Pool Folosesc la organizarea si clasificarea activitatilor Nume Nume Nume

16 Exemplu Pool

17 Artifacts Data objects = arata datele necesare producerii unei activitati Sunt conectate la activitati prin asociatii Group = utilizat pentru documentare sau analiza Nu afecteaza fluxul de activitati Annotation = text suplimentar Nume[Stare] Adnotare cu text

18 Exemplu Data object Lanes Group Annotation

19 BPD - rezumat Elemente din BPDiagram

20 BPMN - orchestrare Orchestrarea – procese interne intr-o aceeasi organizatie Procesele sunt continute intr-un singur Pool

21 BPMN - coreografie Coreografia – procese care se petrec in mai multe organizatii si interactiunea intre ele Procesele fiecarei organizatii sunt continute in Pools diferite

22 BP la nivel general Modelarea - ierarhic, la diferite niveluri de detaliere

23 BP detaliat

24 Exemplu de modelare a unui proces
Expense reimbursment process = decontarea cheltuielilor unor angajati intr-o organizatie Informatii despre proces Dupa depunerea decontului de cheltuieli (Expense Report) se creaza un nou cont (bancar) daca angajatul nu are deja unul Decontul este apoi trimis automat pentru aprobare daca suma este sub $200 atunci aprobarea este automata daca suma este egala sau mai mare cu $200 atunci necesita aprobarea supervizorului In caz de respingere, angajatul primeste o notificare prin Daca a fost aprobat cu succes, suma este depusa in contul angajatului Daca nu se intampla nici o actiune in 7 zile, angajatul primeste un "approval in progress" Daca cererea nu este rezolvata in 30 de zile, atunci procesul se opreste si angajatul primeste un prin care este notificat de acest lucru (cancellation) si trebuie sa depuna din nou decontul

25 BPMN - Expense reimbursment process

26 Meta-modelul UML al BPMN

27 Produse BPMN TIBCO Business Suite – permite modelarea proceselor si "deployment" pe TIBCO iProcess Engine BPMN iServer pt Microsoft Visio SPARX Systems Enterprise Architect – UML 2.01 si BPMN Intalio BPMS WebSphere Business Modeler ……. Demo

28 UML UML provides graphical constructs that can be used to describe (1) actions and activities, and (2) temporal precedence and control flows. The allowable control constructs are Sequence: a transition from one activity to the next in time Branch: a decision point among alternative flows of control Merge: where two or more alternative flows of control rejoin Fork: a splitting of a flow of control into two or more concurrent and independent flows of control Join: a synchronization of two or more concurrently executing flows of control into one flow

29 UML Reprezentarea unui proces de vanzare

30 BPEL Poate servi ca un limbaj de executie (procese executabile si ca un limbaj de descriere (procese abstracte) Un document BPEL utilizeaza XML pentru a descrie urmatoarele aspecte ale BP: partners: o lista de WS invocate ca parte a unui proces containers: data containers sunt utilizate de procese, oferind definitii in termeni de tipuri de mesaje WSDL; sunt necesare pentru a stoca date cu stari si istoria procesului pe baza mesajelor schimbate intre componentele procesului variables: variabilele utilizate care fac parte din proces faultHandlers: routinele de tratare a exceptiilor eventHandlers: routinele detratare a evenimentelor externe (asincrone) compensationHandler: compensarea ce trebuie executata daca o tranzactie esueaza correlationSet: precedenta si corelarea intre invocarea WS care nu poate fi exprimata ca parte a procesului logic principal main logic process: o serie de structuri de control imbricate care combina activitati primitive cu algoritmi mai complicati. Structurile de control include: secventa – executie seriala while – bucla - switch – multiway branching - pick – selectia unei alternative pe baza unui eveniment extern flow – executie paralela; daca exista restrictii de executie intre activitatile ce se executa in paralel acestae se indica prin service links

31 Structura BPEL Sintaxa BPEL 1.1 Partner / Role Definitions
Process State <process> <partners> … </partners> <variables> … </variables> <correlationSets> … </correlationSets> <faultHandler> … <faultHandler> <compensationHandler> … </compensationHandler> <eventHandler> … </eventHandler> (activities)* </process> activities = <receive>, <reply>, <invoke>, <assign>, <throw>, <terminate>, <wait>, <empty>, <sequence>, <switch>, <while>, <pick>, <flow>, <scope>, <compensation> Instance Matching Transaction management Exception Handling Now let’s look at the structure of a BPEL process and the language elements that allow to control the process flow. We will go into more details shortly. Events Process Flow Sintaxa BPEL 1.1

32 Triggere de procese BPEL
Extrinsic / Incoming Messages <receive createInstance=“yes”> </receive> Intrinsic / Time-based <pick> <!-- set an alarm in 3 days and 10 hours --> <onAlarm for="'P3DT10H'"> <!-- handle timeout for order completion --> </onAlarm> </pick>

33 Activitati BPEL <sequence> <flow> <pick>
Serial: <send>, <receive>, <invoke>, <…> Paralel <send>, <receive>, <invoke>, <…> Asteapta pentru unul sau mai multe <receive> sau o alarma

34 Fluxul de control BPEL <switch> <case /> <otherwise /> </switch> While Wait

35 Date BPEL Contextul prin <scope>
Atribuirea variabilelor utilizand XPath 1.0 <assign> <copy> <from variable="AutoLoanRequest" part="creditRating" query="/creditRating/text()"/> <to variable="InterstateCarLoanRequest" part="credit" query="/credit/text()"/> </copy> </assign> Move data from one message to another, transform on during the move, even use for dynamic selection of partner services.

36 Corelarea mesajelor BPEL
<propertyAlias propertyName="orderNumber" messageType="POMessage" part="PO" query="/PO/Order"/> <correlationSets> <correlationSet name="PurchaseOrder" properties="orderNumber"/> </correlationSets> <receive partnerLink="Buyer" portType="PurchasingPT" operation="AsyncPurchase" variable="PO"> <correlations> <correlation set="PurchaseOrder" initiate="yes"> </correlations> </receive>

37 Tranzactii BPEL Support for transactional integrity
<compensationHandler> <invoke partnerLink="Seller" operation="SyncPurchase" …> operation="CancelPurchase“ …/> </compensationHandler> </invoke> Invoke via <compensate> <switch> <case …> <compensate/> </case> Ongoing discussions in the OASIS TC about use of WS-Coordination

38 Tratarea erorilor in BPEL
<faultHandlers> <catchAll> </catchAll> </faultHandlers> <switch> <case condition= "bpws:getVariableProperty(stockResult,level) > 100"> <throw faultName="OutOfStock"/> </case>

39 Meta-modelul (complet) UML al BPEL

40 Mapare BPMN la BPEL

41 Produse BPEL OpenStorm Service Orchestrator
Microsoft: BizTalk Server 2004, Visio Collaxa IBM WebSphere Process Choreographer Oracle AS, JDeveloper webMethods Eclipse plug-in Oracle: AS and JDeveloper BEA WebLogic 8.1


Download ppt "Aplicatii Web bazate pe semantica, agenti si servicii"

Similar presentations


Ads by Google