310 likes | 335 Views
Explore BPQL, a query language for business processes, its formal model, implementation, and applications in distributed systems. Discover how it facilitates querying complex processes and integrating web services.
E N D
Querying Business Processes Catriel Beeri Hebrew University Anat Eyal, Simon Kamenkovich, Tel Aviv University Tova Milo VLDB 2006
Outline • Introduction and motivation • Overview of BPQL by example • Formal model • Implementation • Summary VLDB 2006
(Distributed) Business Processes • Complex applications • Integrating remote Web Services Common practice: • Use BPEL for specifications VLDB 2006
BPEL in a nutshell BPEL4WS (V1.0 by BEA, IBM, Microsoft, July 2002) Process spec.represented in XML • operations, flow and data Actions: • atomic • compound : fork, join, while, process call,… Commercial products: • Application generators compile to executable code • Application servers execute the code • Design tools with “conceptual” model VLDB 2006
Motivation Not just simplifying development… This is a new mine of Information! Interesting questions: • What kind of credit services are used (in)directly? • How can I buy a plane ticket? • Can one get a price quote without first giving credit card info? VLDB 2006
Requirements • Flexible granularity • Coarse-grainqueries that allow for high level abstraction • Fine-grainedqueries that zoom-in on all components • Distribution • Zoom into remote components • Query remote specifications • Path extraction • E.g. What should I do to confirm my trip? • Ease of querying • Visual query similar to specifications (BPEL designer) VLDB 2006
Can a query language be based on XQuery over BPEL? NO! The BPEL XML representation is machine oriented, complex, unfit for human consumption • Difficult to understand • Queries require lots of joins Need: Similarity of system and query models VLDB 2006
Outline • Introduction and motivation • Overview of BPQL by example • Formal model • Implementation • Summary VLDB 2006
Travel Agency Spec • Property, data & activity nodes • Control and data flow edges A process is a di-graphof atomic and compound activities Compound activities can be zoomed-in (a-la statecharts) VLDB 2006
Zoom-in VLDB 2006
Single/double-headed edges(compare to / and // in XPath) • – edges • – paths of arbitrary length • Single/double-bounded activities: • – w/o zoom-in • –unbounded zoom-in • Mark requested nodes/edges by • Node label variables BPQL Queries • Use process patterns(like tree patterns for xml) Query1:Provided operations? VLDB 2006
Query2: used credit card services? local VLDB 2006
Query3: search without login? VLDB 2006
Query4: data flow Data elements affected by searchRequest and affecting returnTripResults VLDB 2006
Outline • Introduction and motivation • Overview of BPQL by example • Formal model • Implementation • Summary VLDB 2006
Formal Model System: • Process graphs + implementation function • Graph refinement (graph rewriting) Query: • A system where some nodes & edges are marked transitive implementation VLDB 2006
Semantics An embedding: a mapping from: query graphs to: [refinements of] process graphs satisfying conditions: (nodes): preserves nodes types and labels (edges): edge are mapped to edges transitive edge mapped to paths (imp): preserves implementation relationships Aresult: image of query graph under an embedding Answer: all results VLDB 2006
Large or Infinite answers! • Many fork/joins exponential number of paths • Cycles in process graph • Cycles (recursion) in zoom-in relationships Infinite # of refinements VLDB 2006
Recursion example Travel Agency Airline VLDB 2006
Compact representation Query Infinite Compact VLDB 2006
Query Evaluation Algorithm Systems and queries are essentially (Vertex Replacement) Context Free Graph Grammars Bad news: These are not closed in general under intersection Good news: • Our systems and queries are sufficiently simple: Complexity: Polynomial in size of spec VLDB 2006
Extensions: • OK extensions(implemented): • label predicates • Regular path expressions (on node labels) • Negation • Joins on node labels • Not OK extensions(hence not implemented): : • Joins on path variables • The result is not a VR context free graph grammar • Emptiness is undecidable • NP-hard (data complexity) even without cycles and recursion VLDB 2006
Outline • Introduction and motivation • Overview of BPQL by example • Formal model • Implementation • Summary VLDB 2006
First Attempt Translation to XQuery queries over the BPEL XML Problem: too many joins, because of the relational representation in BPEL nodes process variables descrription … var1 links start searchTrip reserveTrip confirmTrip cancelTrip end … … link link … source description target source description target source source description … … … “L5” “L1” “L1” “L1” “L2” “L2” “L3” “L4” edges VLDB 2006
Solution: use Active XML (www.activexml.net) Travel agency serviceProvider capability behavior zoomin AXML:XML + Embedded calls to web services start searchTrip zoomin reserveTrip start cancelTrip confirmTrip getTripRequest xml:sc end fork getActivity(end) searchCars searchFlights searchRooms join getActivity(join) getActivity(join) zoomin end getOperation(searchRooms,join) zoomout getActivity(reserveTrip) VLDB 2006
Results Joins vs. calls to Web services … … … VLDB 2006
Distribution Effect VLDB 2006
Outline • Introduction and motivation • Overview of BPQL by example • Formal model • Implementation • Summary VLDB 2006
Summary • Simple and intuitive query language • Similar to how processes are specified • Flexible granularity • Two navigation axis • Path retrieval • Operates in a distributed environment • Systems and queries are modeled as graph grammars Allows compact representation of large/infinite answers • Ignores semantics of some BPEL constructs and data values • Reasonable tradeoff of expressivity and complexity • AXML as an implementation platform supports • Transparent distribution • Taking advantage of built-in optimization VLDB 2006
Ongoing and future work • Incomplete information • Querying/mining logs • Applications to software verification and monitoring • Capturing more BPEL semantics • Process integration • Optimization • … VLDB 2006
Thank you VLDB 2006