Скачать презентацию Querying and Monitoring Distributed Business Processes Daniel Deutch Скачать презентацию Querying and Monitoring Distributed Business Processes Daniel Deutch

922dc1ea06aa6cb085b7cb545a66f738.ppt

  • Количество слайдов: 103

Querying and Monitoring Distributed Business Processes Daniel Deutch, Tova Milo Tel-Aviv University Customer Logistics Querying and Monitoring Distributed Business Processes Daniel Deutch, Tova Milo Tel-Aviv University Customer Logistics HR System Bank ERP e. Comm CRM Supplier

Data model Design Students Query language Streams. . . Select… From… Where… Optimization XML Data model Design Students Query language Streams. . . Select… From… Where… Optimization XML Indexing SOAP sname Transactions Files organization cid=cid WSDL. . . sid=sid name=“Mary” Students 2 Takes Distribution. . . Courses Querying and Monitoring Distributed BPs

Outline § Introduction to Business Processes § Querying § Monitoring § Summary & Research Outline § Introduction to Business Processes § Querying § Monitoring § Summary & Research Directions 3 Querying and Monitoring Distributed BPs

Outline § Introduction to Business Processes § Querying § Monitoring § Summary & Research Outline § Introduction to Business Processes § Querying § Monitoring § Summary & Research Directions 4 Querying and Monitoring Distributed BPs

Introduction to BPs What is a Business Process? § Logically related activities that, when Introduction to BPs What is a Business Process? § Logically related activities that, when combined in a flow, achieve a business goal. § Activities may either be local or remote § Operates in a cross-organization, distributed environment § Abstract representation, independent of implementation § Standards facilitate design, deployment, and execution 5 Querying and Monitoring Distributed BPs

Introduction to BPs Programming In the large § BPs are designed by Non-programmers § Introduction to BPs Programming In the large § BPs are designed by Non-programmers § Specify combination of functionalities and flow thereof, to solve a complex problem § Example: process an order § The operations/functions are implemented by programmers (programming in the small) § Example: fetch order document 6 Querying and Monitoring Distributed BPs

Introduction to BPs Abstract vs. Executable process § Abstract Process § Defines the publicly Introduction to BPs Abstract vs. Executable process § Abstract Process § Defines the publicly visible behavior of services that an executable process offers § Executable Process § Contain the partner’s business logic behind an external protocol 7 Querying and Monitoring Distributed BPs

Introduction to BPs Orchestration vs. Choreography § Orchestration: Executable process, message exchange sequences are Introduction to BPs Orchestration vs. Choreography § Orchestration: Executable process, message exchange sequences are controlled by the orchestration designer. § Choreography: Non-executable protocol for interactions. § E. g. , the legal sequences of messages exchanged, guaranteeing interoperability 8 Querying and Monitoring Distributed BPs

Introduction to BPs 9 Orchestration Querying and Monitoring Distributed BPs Introduction to BPs 9 Orchestration Querying and Monitoring Distributed BPs

Introduction to BPs Web Services Meet BPs Local to company A Web Service 1 Introduction to BPs Web Services Meet BPs Local to company A Web Service 1 Web Service 4 Web Service 2 Web Service 5 Web Service 3 Web Service n At company B Company A business process 10 On the Web Querying and Monitoring Distributed BPs

Introduction to BPs Web-Based Travel Agency BP Travel request responses Airlines Websites queries Confirmation Introduction to BPs Web-Based Travel Agency BP Travel request responses Airlines Websites queries Confirmation Consolidate Results responses Travel Service queries Hotels Websites 11 Querying and Monitoring Distributed BPs

Introduction to BPs BP Management § Planning § Modeling & Design § Development & Introduction to BPs BP Management § Planning § Modeling & Design § Development & Deployment § Execution, Interacting & Monitoring § Analysis and Optimization 12 Querying and Monitoring Distributed BPs Source: Microsoft BPM Description

Introduction to BPs § § § § 13 Modeling Challenges Complex Systems Distributed Settings Introduction to BPs § § § § 13 Modeling Challenges Complex Systems Distributed Settings Interoperability issues Robustness Scale Web interface Legacy systems Querying and Monitoring Distributed BPs

Introduction to BPs 14 BP market (BPTrends survey) Querying and Monitoring Distributed BPs Introduction to BPs 14 BP market (BPTrends survey) Querying and Monitoring Distributed BPs

Introduction to BPs BP Management buzz § Over 20 million hits in google for Introduction to BPs BP Management buzz § Over 20 million hits in google for “business process” § Over 5 million hits for "business process management" § Vast interest by analysts (e. g. Gartner) § Rapidly growing interest in industry § New Standards 15 Querying and Monitoring Distributed BPs

Standards History Introduction to BPs BPML BPSS WSCI WS-Choreography (Intallio et al) (eb. XML) Standards History Introduction to BPs BPML BPSS WSCI WS-Choreography (Intallio et al) (eb. XML) (Sun et al) (W 3 C) 2000/05 2001/03 2001/05 2001/06 2002/03 2002/06 2002/08 XLang WSFL WSCL BPEL 4 WS 1. 0 (Micorsoft) (IBM) (HP) (IBM, Microsoft) 2003/01 2003/04 BPEL 4 PEOPLE (Oracle et. Al) 2007/04 2007/06 BPEL 4 WS 1. 1 WSBPEL 2. 0 (OASIS) BPEL 16 Querying and Monitoring Distributed BPs

Introduction to BPs 17 Standards stack Querying and Monitoring Distributed BPs Introduction to BPs 17 Standards stack Querying and Monitoring Distributed BPs

Introduction to BPs BPEL in a nutshell § Language for specifying BP behavior based Introduction to BPs BPEL in a nutshell § Language for specifying BP behavior based on Web Services (WS) § Define BPs as coordinated sets of Web service interactions § Define both abstract and executable processes § Specifies Web services Composition 18 Querying and Monitoring Distributed BPs

Introduction to BPs § § § <receive> <reply> <invoke> <assign> <throw> <wait> <sequence> <flow> Introduction to BPs § § § (parallel) BPEL constructs Communication-related constructs Flow-related constructs § … 19 Querying and Monitoring Distributed BPs

Introduction to BPs BPEL as XML § BPEL is XML-based § In general we Introduction to BPs BPEL as XML § BPEL is XML-based § In general we could use XML editors for specification design § Infeasible in practice 20 Querying and Monitoring Distributed BPs

Introduction to BPs BPEL as XML (cont. ) <process> <!– Definition and roles of Introduction to BPs BPEL as XML (cont. ) . . . . . . . . . . . . . . . . . . (activities)* 21 Querying and Monitoring Distributed BPs

Introduction to BPs BPEL as XML (cont. ) <if> <condition> bpel: get. Variable. Property('ship. Introduction to BPs BPEL as XML (cont. ) bpel: get. Variable. Property('ship. Request', 'props: ship. Complete') 22 If (ship. Request = ship. Complete) { ship. Notice. Order. Id = ship. Request. Order. Id; ship. Notice. items. Cnt = ship. Request. items. Cnt; } Querying and Monitoring Distributed BPs

Introduction to BPs 23 Basic activities Querying and Monitoring Distributed BPs Introduction to BPs 23 Basic activities Querying and Monitoring Distributed BPs

Introduction to BPs 24 Flow activities Querying and Monitoring Distributed BPs Introduction to BPs 24 Flow activities Querying and Monitoring Distributed BPs

Introduction to BPs 25 BP specification Querying and Monitoring Distributed BPs Introduction to BPs 25 BP specification Querying and Monitoring Distributed BPs

Introduction to BPs 26 Travel Agency Process Flow Querying and Monitoring Distributed BPs Introduction to BPs 26 Travel Agency Process Flow Querying and Monitoring Distributed BPs

Introduction to BPs 27 Zoom In Querying and Monitoring Distributed BPs Introduction to BPs 27 Zoom In Querying and Monitoring Distributed BPs

Introduction to BPs 28 Example Editor (eclipse) Querying and Monitoring Distributed BPs Introduction to BPs 28 Example Editor (eclipse) Querying and Monitoring Distributed BPs

Introduction to BPs 29 Example editor (Oracle) Querying and Monitoring Distributed BPs Introduction to BPs 29 Example editor (Oracle) Querying and Monitoring Distributed BPs

Introduction to BPs 30 Example editor (IBM) Querying and Monitoring Distributed BPs Introduction to BPs 30 Example editor (IBM) Querying and Monitoring Distributed BPs

Introduction to BPs 31 Example editor (Microsoft VS) Querying and Monitoring Distributed BPs Introduction to BPs 31 Example editor (Microsoft VS) Querying and Monitoring Distributed BPs

Introduction to BPs Challenges § So far: challenges & solutions for modeling § BPs Introduction to BPs Challenges § So far: challenges & solutions for modeling § BPs are hard to analyze, debug, and optimize § Again, due to scale, distributed settings, legacy systems, …. . § Good modeling simplifies process specification § But further analysis tools are required 32 Querying and Monitoring Distributed BPs

Introduction to BPs Analysis Types § Static Analysis • “What kind of credit services Introduction to BPs Analysis Types § Static Analysis • “What kind of credit services are used (in)directly? ” • “How can I buy a plane ticket? ” • “Can one get a price quote without giving first credit card info? ” § Monitoring • “Notify me when a user hacks the system and get a price quote without giving his credit card info” § Log Analysis • “Find all logs where a user bought a plane ticket” 33 Querying and Monitoring Distributed BPs

Outline § Introduction to Business Processes § Querying § Monitoring § Summary & Research Outline § Introduction to Business Processes § Querying § Monitoring § Summary & Research Directions 34 Querying and Monitoring Distributed BPs

Querying BPs Querying Business Processes § Statically analyze a Business Process “Find all ways Querying BPs Querying Business Processes § Statically analyze a Business Process “Find all ways in which a user can buy a plane ticket” § Analysis needs • Control flow analysis (Reachability, Cycle Detection, Temporal properties, …) • Structural analysis • Data analysis • Messages Validation, Pointer analysis, Array bounds analysis, … • Combined (data and flow) analysis § Database approach • Treat BPs as data • Design a query language 35 Querying and Monitoring Distributed BPs

Querying BPs Why not XQuery? § Recall that BPEL is XML-based, then… Why not Querying BPs Why not XQuery? § Recall that BPEL is XML-based, then… Why not use XQuery? ! § Similar arguments to BPs / XML • Need to handle complex technical constructs • Complex, unintuitive queries (many joins & recursion) • No abstraction • No robustness to changes in BPEL standard 36 Querying and Monitoring Distributed BPs

Querying BPs An Ideal querying/analysis tool § Uniform § Graphical § Scalable § Flexible Querying BPs An Ideal querying/analysis tool § Uniform § Graphical § Scalable § Flexible § Similar to the specification design § Can handle partial information and uncertainty 37 Querying and Monitoring Distributed BPs

Querying BPs Models & Query Languages Monadic Second Order Logic Context Free Graph Grammars Querying BPs Models & Query Languages Monadic Second Order Logic Context Free Graph Grammars Recursive State Machine Finite State Machine Temporal Logic Mu-calculus CTL* LTL CTL First Order Logic 38 Querying and Monitoring Distributed BPs

Querying BPs First Try • Finite State Machines (FSM) for software specification • Temporal Querying BPs First Try • Finite State Machines (FSM) for software specification • Temporal Logic (TL) [Emerson, ’ 90] for querying all possible behaviors • Very common in software (and hardware) verification • Typically Linear time evaluation (data complexity) • Exponential time (query complexity) 39 Querying and Monitoring Distributed BPs

Querying BPs Finite State Machines (FSM) • States and transition function (typically no “accepting” Querying BPs Finite State Machines (FSM) • States and transition function (typically no “accepting” state) • The Finite State Machines (FSM) system configuration is encoded within the states • Interested in properties of possible traversal over the states • Temporal Logics express such properties 40 Querying and Monitoring Distributed BPs

Querying BPs FSM (example) • “Flat” – No functions – No recursion • Cycles Querying BPs FSM (example) • “Flat” – No functions – No recursion • Cycles allowed • Execution path by traversal Login Search Reserve Payment Cash Credit Confirm 41 Cancel Querying and Monitoring Distributed BPs

Querying BPs Temporal Logic - Ingredients • Predicates q q x=0? Was a reservation Querying BPs Temporal Logic - Ingredients • Predicates q q x=0? Was a reservation made? • Logical operators (and, or, not) • Queries – Can a reservation be made without relaying a credit card number? – Must one eventually login if he makes a trip search? 42 Querying and Monitoring Distributed BPs

Querying BPs Temporal Operators • Quantifiers over execution paths q q A φ - Querying BPs Temporal Operators • Quantifiers over execution paths q q A φ - All: φ holds on all paths starting from the current state. E φ - Exists: φ holds in at least one path. • Path-specific quantifiers q q q 43 X φ - Next: φ holds at the next state. G φ - Globally: φ has to hold on the entire subsequent path. F φ - Finally: φ eventually has to hold (somewhere). φ U ψ - Until: φ has to hold until at some position ψ holds, and ψ must hold eventually. φ W ψ - Weak until: φ has to hold until ψ holds. Querying and Monitoring Distributed BPs

Querying BPs Temporal Logic • Queries – Can a reservation be made without relaying Querying BPs Temporal Logic • Queries – Can a reservation be made without relaying a credit card number? E(F(Reserve) and not F(Credit)) – Must one eventually login if he makes a trip search? A (F(login) or not F(search)) • Logics – Linear time Logic (LTL) • No path quantifiers First Order – CTL* • Allows path quantifiers – Mu-calculus • Introduces fix-point operators 44 (Monadic) Second Order Querying and Monitoring Distributed BPs

Querying BPs Features & Limitations 1. Scale 2. Expressive Power (Specification) 3. Expressive Power Querying BPs Features & Limitations 1. Scale 2. Expressive Power (Specification) 3. Expressive Power (Query language) 4. (Un)Intuitive Formulation 45 Querying and Monitoring Distributed BPs

Features and Limitations 1. Scale Login • Evaluation is linear in FSM size, but… Features and Limitations 1. Scale Login • Evaluation is linear in FSM size, but… • FSM size is huge for reallife specifications • Call stack • Data • Unfeasible Evaluation Search Reserve Payment Cash Credit Confirm 46 Querying and Monitoring Distributed BPs Cancel

Features and Limitations 1. Scale Solutions • Bounded Model Checking [Biere et. Al ’ Features and Limitations 1. Scale Solutions • Bounded Model Checking [Biere et. Al ’ 99, ’ 03] , [Clarke et. Al ’ 04], … • Summarization [Reps et. Al ’ 98], [Sagiv et. Al ‘ 05], … • Compact representation – State. Charts [Harel ’ 87] – BDD [Bryant 86’, Lam et. Al ’ 05] 47 Querying and Monitoring Distributed BPs

Features and Limitations 1. Scale State. Charts • Graphical tool for designing state machine Features and Limitations 1. Scale State. Charts • Graphical tool for designing state machine based specifications • Extend basic FSM concepts (superstates) • Simplifies design • UML standard 48 Querying and Monitoring Distributed BPs

Features and Limitations 1. Scale BDD • Data structure that allows compact representation of Features and Limitations 1. Scale BDD • Data structure that allows compact representation of data with high similarities b 1 b 2 b 3 • (b 1^ b 2) V (not(b 1) ^ b 3) 1 49 0 Querying and Monitoring Distributed BPs

Features and Limitations 1. Scale Relational DB approach [Lam ’ 05] • Store commands Features and Limitations 1. Scale Relational DB approach [Lam ’ 05] • Store commands as db relations – command c is written at location l • “Open” all possible contexts • Exploit similarities and represent compactly by Binary Decision Diagrams • Datalog queries 50 Querying and Monitoring Distributed BPs

Features and Limitations 2. Expressive Power (Specification) • FSMs have limited expressive power • Features and Limitations 2. Expressive Power (Specification) • FSMs have limited expressive power • May yield inaccurate approximation of real -life specification 51 Querying and Monitoring Distributed BPs

Expressive Power (Specification) Models & Query Languages Monadic Second Order Logic Context Free Graph Expressive Power (Specification) Models & Query Languages Monadic Second Order Logic Context Free Graph Grammars Temporal Logic Recursive State Machine First Finite State Machine Order Logic 52 Querying and Monitoring Distributed BPs

Expressive Power (Specification) Recursive State Machines (RSMs) • A collection of FSMs • Each Expressive Power (Specification) Recursive State Machines (RSMs) • A collection of FSMs • Each with multiple entries & exits • Some states represent calls to other state machines (or to self) • An expansion is replacing a call state by a possible implementation • An execution is a sequence of expansions 53 Querying and Monitoring Distributed BPs

Expressive Power (Specification) RSM (example) pay search confirm reserve payment Start Payment credit cash Expressive Power (Specification) RSM (example) pay search confirm reserve payment Start Payment credit cash Home. Page Call nodes may specify several implementations Call nodes may specify entry/exit nodes for connection 54 Querying and Monitoring Distributed BPs

Expressive Power (Specification) Evaluation (Temporal Logic) • Single Exit RSMs – CTL* : Linear Expressive Power (Specification) Evaluation (Temporal Logic) • Single Exit RSMs – CTL* : Linear data complexity [Benedikt et. Al ‘ 05] – Mu-calculus: also [Alur et. Al ’ 07] • Multiple Exit RSMs – LTL: PTIME – CTL, CTL*: EXPTIME – Mu-calculus: EXPTIME 55 Querying and Monitoring Distributed BPs

Expressive Power (Specification) Models & Query Languages Monadic Second Order Logic Context Free Graph Expressive Power (Specification) Models & Query Languages Monadic Second Order Logic Context Free Graph Grammars Temporal Logic Recursive State Machine First Finite State Machine Order Logic 56 Querying and Monitoring Distributed BPs

Expressive Power (Specification) Context Free Graph Grammars • Extensions of string grammars to graphs Expressive Power (Specification) Context Free Graph Grammars • Extensions of string grammars to graphs • Labels over graph nodes (VR) or edges (HR) • Terminal and non-terminal labels • Derivation rules for non-terminal labels • No start and end nodes! • Connection rules, by labels, for the derived sub-graph 57 Querying and Monitoring Distributed BPs

Expressive Power (Specification) Context Free Graph Grammars Example pay search confirm reserve payment credit Expressive Power (Specification) Context Free Graph Grammars Example pay search confirm reserve payment credit Start Payment cash Home. Page Homepage payment Connection relation : Start. Payment connects only to Search Confirm connects to cash, but not to credit 58 Querying and Monitoring Distributed BPs

Expressive Power (Specification) Context Free Graph Grammars Evaluation • Depends greatly on the allowed Expressive Power (Specification) Context Free Graph Grammars Evaluation • Depends greatly on the allowed connection relation • A restricted model defines entries and exits for graphs and is equivalent to RSMs • Typically Monadic Second Order Queries • We’ll revisit it later. . 59 Querying and Monitoring Distributed BPs

Expressive Power (Specification) Active XML • AXML [Abiteboul, M et. Al ’ 04 -’ Expressive Power (Specification) Active XML • AXML [Abiteboul, M et. Al ’ 04 -’ 08] • Extension of XML to include embedded Web. Services calls • Very useful for modeling web-sites • Formally – a restriction of context free graph grammars to trees • XML query languages – XPath, XQuery, . . • Practically efficient evaluation 60 Querying and Monitoring Distributed BPs

Features and Limitations 3. Expressive Power (Queries) • Temporal logics have limited expressive power Features and Limitations 3. Expressive Power (Queries) • Temporal logics have limited expressive power • Basically – consider only executions • Good for behavioral properties • Can’t capture structural properties • Bisimulation-invariant • Example 61 Querying and Monitoring Distributed BPs

Expressive Power (Queries) 62 Behavioral vs. Structural Analysis Querying and Monitoring Distributed BPs Expressive Power (Queries) 62 Behavioral vs. Structural Analysis Querying and Monitoring Distributed BPs

Expressive Power (Queries) Solution? Monadic Second Order Logic Context Free Graph Grammars Temporal Logic Expressive Power (Queries) Solution? Monadic Second Order Logic Context Free Graph Grammars Temporal Logic Recursive State Machine First Finite State Machine Order Logic 63 Querying and Monitoring Distributed BPs

Expressive Power (Queries) Infeasible! • Studied extensively for Context Free Graph Grammars • Linear Expressive Power (Queries) Infeasible! • Studied extensively for Context Free Graph Grammars • Linear in grammar size • But unfortunately… • Non-elementary in the query (formula) size • 2^2^2^…. . 2 (tower size depends on query size) • Infeasible for even the smallest queries 64 Querying and Monitoring Distributed BPs

Features and Limitations 4. (Un)intuitive Formulation • Very difficult to express properties of 4. Features and Limitations 4. (Un)intuitive Formulation • Very difficult to express properties of 4. in FO or MSO interest (Un) intuitive Formulation • Long and error-prone formulas • Temporal Logic is more intuitive • Still, textual and complex, especially for large-scaled analysis • Existing tools provide inadequate interface 65 Querying and Monitoring Distributed BPs

(Un)intuitive formulation First Order Formulas TVLA (Sagiv et. Al [04]) syntax r[n, z](v) = (Un)intuitive formulation First Order Formulas TVLA (Sagiv et. Al [04]) syntax r[n, z](v) = (c[n](v) & r[n, x 1](v)? z(v) | E(v_1) z(v_1) & TC (v_1, v) (v_3, v_4) (n(v_3, v_4) & !x 1(v_3)) : r[n, z](v) & ! (E(v_1) r[n, z](v_1) & x 1(v_1) & r[n, x 1](v) & !x 1(v))) 66 Querying and Monitoring Distributed BPs

(Un)intuitive formulation Temporal Logic SMV (Clarke et. Al [04]) syntax • PReq. Fullfilled. Def (Un)intuitive formulation Temporal Logic SMV (Clarke et. Al [04]) syntax • PReq. Fullfilled. Def 1: assert (P_BUTTON_PRESSED -> (~P_REQ_FULFILLED U P_state)); • PReq. Fullfilled. Def 2: assert (P_state -> (P_REQ_FULFILLED U P_BUTTON_PRESSED)); • Enter. TState. Def: assert ((~T_state & X(T_state)) -> X(ENTER_T_STATE)); • Enter. PState. Def: assert ((~P_state & X(P_state)) -> X(ENTER_P_STATE)); • Move. To. PPrev. Def: assert ((~move_to_p & X(move_to_p)) -> MOVE_TO_P_WAS_SET_TRUE_IN_PREV_SEC); • Move. To. Ito. TPrev. Def: assert( (~move_to_i_to_t & X(move_to_i_to_t)) -> X(X(MOVE_TO_I_TO_T_WAS_SET_TRUE_IN_PREV_SEC))); 67 Querying and Monitoring Distributed BPs

Querying BPs Mid-section Summary • Model problems – expressive power – scale Pretty much Querying BPs Mid-section Summary • Model problems – expressive power – scale Pretty much solved by models we’ve seen • Query Language problems – expressive power – unintuitive formulation Not solved yet • BPQL to the rescue 68 Querying and Monitoring Distributed BPs

Querying BPs Possible Solution Monadic Second Order Logic Context Free Graph Grammars Temporal Logic Querying BPs Possible Solution Monadic Second Order Logic Context Free Graph Grammars Temporal Logic Recursive State Machine Finite State Machine BPQL First Order Logic 69 Querying and Monitoring Distributed BPs

Querying BPs BPQL Queries § BP patterns (like tree patterns for XML) § Single/double-headed Querying BPs BPQL Queries § BP patterns (like tree patterns for XML) § Single/double-headed edges (Xpath’s / and //) • edges • paths of arbitrary length § Single/double-bounded activities: • simple zoom-in • unbounded zoom-in 70 Querying and Monitoring Distributed BPs

Querying BPs Q 1: used credit card services? local 71 Querying and Monitoring Distributed Querying BPs Q 1: used credit card services? local 71 Querying and Monitoring Distributed BPs

Querying BPs 72 Q 2: search without login? Querying and Monitoring Distributed BPs Querying BPs 72 Q 2: search without login? Querying and Monitoring Distributed BPs

Querying BPs 73 Q 3: data flow Querying and Monitoring Distributed BPs Querying BPs 73 Q 3: data flow Querying and Monitoring Distributed BPs

Querying BPs Queries and their semantics § Query: A BP pattern with some transitive Querying BPs Queries and their semantics § Query: A BP pattern with some transitive nodes & edges transitive § An embedding: a mapping • from: • to: query graphs [possible flows defined by the] BP graphs § A result: image of query graph under an embedding § Answer: all results 74 Querying and Monitoring Distributed BPs

Querying BPs Structural vs. Behavioral Semantics • Sub-graph homomorphism vs. bisimulation • Both are Querying BPs Structural vs. Behavioral Semantics • Sub-graph homomorphism vs. bisimulation • Both are supported in BPQL 75 Querying and Monitoring Distributed BPs

Querying BPs 76 Query with an infinite answer? Querying and Monitoring Distributed BPs Querying BPs 76 Query with an infinite answer? Querying and Monitoring Distributed BPs

Querying BPs 77 Finite representation Querying and Monitoring Distributed BPs Querying BPs 77 Finite representation Querying and Monitoring Distributed BPs

Querying BPs Query Evaluation Algorithm § Systems and queries are essentially Context Free Graph Querying BPs Query Evaluation Algorithm § Systems and queries are essentially Context Free Graph Grammars (Recursive state machines) § We basically compute their intersection § Bad news: These are not closed in general under intersection § Good news: • Our systems and queries are sufficiently simple: PSIZE representation (as a BP) can be computed in PTIME (data complexity!) 78 Querying and Monitoring Distributed BPs

Querying BPs And what about data? § So far we have mainly considered flow Querying BPs And what about data? § So far we have mainly considered flow § Data is important as well § Data: variable values, message exchange, … § Especially interesting in context of Web § Some representative works § Web-services analysis § Pointer Analysis 79 Querying and Monitoring Distributed BPs

Querying BPs Web-services analysis § [Deutsch et. Al ‘ 06] • • Query language Querying BPs Web-services analysis § [Deutsch et. Al ‘ 06] • • Query language combines LTL and FO LTL for temporal relationships FO for data snapshots Polynomial Data Complexity (restricted versions) § [Fu et. Al ’ 04] • • • 80 Guarded automaton for flow query XPath “guards” relate to data Reduces problem into “conventional” model checking Undecidability for general case Polynomial Data Complexity for bounded message number Querying and Monitoring Distributed BPs

Querying BPs Pointer Analysis § [Lam et. Al ’ 05] • Pointer analysis for Querying BPs Pointer Analysis § [Lam et. Al ’ 05] • Pointer analysis for sql injections, buffer overflow, … • Analyzes all possible call stack contexts • BDD-based optimization techniques capture similarities • Efficient run-time, practical system § [Sagiv et. Al ’ 06] • Shape analysis • Summarization techniques • Efficient run-time, practical system 81 Querying and Monitoring Distributed BPs

Querying BPs § § § § 82 Some Systems SMV, Nu. SMV [Clarke et. Querying BPs § § § § 82 Some Systems SMV, Nu. SMV [Clarke et. Al, ’ 92] bddbddb [Lam et. Al, ’ 04] TVLA [Sagiv et. Al, ’ 99] SPIN [Bell Labs, ’ 91] SLAM [Ball et. Al. ’ 00] Moped [Schwoon ’ 02] Mops [Chen et. Al ’ 02] BPQL [Beeri, M, D et. Al ’ 05] Finite State Machine Context Free Processes Querying and Monitoring Distributed BPs

Outline § Introduction to Business Processes § Querying § Monitoring § Summary & Research Outline § Introduction to Business Processes § Querying § Monitoring § Summary & Research Directions 83 Querying and Monitoring Distributed BPs

Monitoring BPs What is Monitoring? § The aggregation, analysis, and presentation of real time Monitoring BPs What is Monitoring? § The aggregation, analysis, and presentation of real time information about activities inside organizations and involving customers and partners (Gartner) § Provide real-time information on executions 84 Querying and Monitoring Distributed BPs

Monitoring BPs Why Monitoring? § Imagine you run an auction service… • • Guarantee Monitoring BPs Why Monitoring? § Imagine you run an auction service… • • Guarantee fair play: notify on too many cancels Maintain SLA: monitor response time Promotions: prizes for the x 10, 000 transaction Illegal access: notify on buyers attempt to confirm bids without registering first Monitoring is crucial for enforcing business policies and meeting efficiency & reliability goals 85 Querying and Monitoring Distributed BPs

Monitoring BPs BPEL XML events <action. Data> <header> <process. Name> auction. House </process. Name> Monitoring BPs BPEL XML events

auction. House 517 notify_winner 2006 -05 -31 T 11: 32: 46. 510+00: 00
invoke completion … 86 Querying and Monitoring Distributed BPs

Monitoring BPs Monitoring Systems Layers 1. Absorb the stream of events coming from the Monitoring BPs Monitoring Systems Layers 1. Absorb the stream of events coming from the BP execution engine 2. Process and filter events, selects relevant events data and automatically triggers actions 3. A dashboard that allows users to follow the processes progress, view custom reports, perform analysis, … 87 Querying and Monitoring Distributed BPs

Monitoring BPs Existing Approaches § XML streams management § Complex Event Processing (CEP) § Monitoring BPs Existing Approaches § XML streams management § Complex Event Processing (CEP) § Commercial tools (BAM) § BP-Mon 88 Querying and Monitoring Distributed BPs

Monitoring BPs XML streams management § Many works on xml streaming • Query Optimization Monitoring BPs XML streams management § Many works on xml streaming • Query Optimization [Koch et. Al ’ 04, Viglas et. Al ’ 02, …] • Security [Altinel, Franklin ’ 00, Benedikt et. Al, ’ 08, …] • Updates & Concurrency [Grabs et. Al ’ 02, Nicola et. Al ’ 07, …] Automata-based techniques vastly used § BPEL processes emits XML messages § Use XML streaming engines for monitoring? 89 Querying and Monitoring Distributed BPs

Monitoring BPs Why not ? § Each XML element describes an individual event § Monitoring BPs Why not ? § Each XML element describes an individual event § Fairly complex XQuery queries (lots of joins) • Difficult to handle by existing streaming engines… § XML stream engines manage tree-shaped data (vs. DAGs) § XML stream engines expect to receive elements in document order (but we have here parallel flow). 90 Querying and Monitoring Distributed BPs

Monitoring BPs Complex Event Processing § Processing of multiple events to identify semantically meaningful Monitoring BPs Complex Event Processing § Processing of multiple events to identify semantically meaningful combinations. § Studied extensively for Active Databases [Widom ’ 96], [Payton ’ 99], [Wolski ’ 98], … § Recent works in context of BPs [Wu ’ 06], [Jobst ‘ 07] § Identify meaningful activities combinations that form a business logic § Still, somewhat low-level 91 Querying and Monitoring Distributed BPs

Monitoring BPs BP-Mon § BAM tools provide solid solutions § But do not incorporate Monitoring BPs BP-Mon § BAM tools provide solid solutions § But do not incorporate static analysis § BP-Mon is an integrated framework § Uses a query language similar to BPQL § Graphical & Intuitive § Semantics: evaluated over run-time executions (vs. potential executions in BP-QL) 92 Querying and Monitoring Distributed BPs

Monitoring BPs 93 Running Example Querying and Monitoring Distributed BPs Monitoring BPs 93 Running Example Querying and Monitoring Distributed BPs

Monitoring BPs Query Example (1) Unfair play (too many cancellations) § § As before Monitoring BPs Query Example (1) Unfair play (too many cancellations) § § As before New or rep Report/ Report* 94 Querying and Monitoring Distributed BPs

Monitoring BPs Query Example (2) Monitor response time of data-store § Sliding window • Monitoring BPs Query Example (2) Monitor response time of data-store § Sliding window • • § Output • • 95 Time based Instance based Xquery like Group by, having Querying and Monitoring Distributed BPs

Monitoring BPs Query Example (3) Illegal bidding (mix of static and run-time analysis) 96 Monitoring BPs Query Example (3) Illegal bidding (mix of static and run-time analysis) 96 Querying and Monitoring Distributed BPs

Monitoring BPs Some Nice BP-Mon Features § Intuitive monitoring (looks like BPEL) § Easy Monitoring BPs Some Nice BP-Mon Features § Intuitive monitoring (looks like BPEL) § Easy deployment (implemented as BPEL) § Greedy embedding § Automata-based evaluation algorithm § Type-based optimization 97 Querying and Monitoring Distributed BPs

Monitoring BPs Evaluation algorithm • Incrementally extends a greedy matching to one of a Monitoring BPs Evaluation algorithm • Incrementally extends a greedy matching to one of a larger prefix • Automaton with pattern nodes as states – Tries to concurrently match the all concrete patterns of a given pattern – Attempts to match events as early as possible – On failure: backtracks & retries Complexity: polynomial in the size of the execution log (with the exponent determined by the size of the pattern) 98 Querying and Monitoring Distributed BPs

Monitoring BPs Easy Deployment § The automaton is compiled into BPEL § May be Monitoring BPs Easy Deployment § The automaton is compiled into BPEL § May be used on any application server § Guarantees portability 99 Querying and Monitoring Distributed BPs

Monitoring BPs Type-Based Optimization § Exploit knowledge of specification § Infer Irrelevancy & inconsistency Monitoring BPs Type-Based Optimization § Exploit knowledge of specification § Infer Irrelevancy & inconsistency using BP-QL 100 Querying and Monitoring Distributed BPs

Outline § Introduction to Business Processes § Querying § Monitoring § Summary & Research Outline § Introduction to Business Processes § Querying § Monitoring § Summary & Research Directions 101 Querying and Monitoring Distributed BPs

Almost done Summary & Research Directions § Important aspects of Business Processes • Design Almost done Summary & Research Directions § Important aspects of Business Processes • Design • Analysis • Monitoring § Plenty of work on each subject, in many different fields § Still missing a real sinergy • Programming languages, model checking, DB technology • XML Streaming, CEP/BAM • All together… § BPQ: integrated, high-level, intuitive framework for all. 102 Querying and Monitoring Distributed BPs

Almost done Summary & Research Directions Topics for research: • • • 103 Missing Almost done Summary & Research Directions Topics for research: • • • 103 Missing information (partial specifications, logs, …) Probabilistic Processes Data values Interactions Log mining Enhanced query language features Optimizations Further applications and more… Querying and Monitoring Distributed BPs