Скачать презентацию A Visual Query Language for Business Processes Catriel Скачать презентацию A Visual Query Language for Business Processes Catriel

92378e20fd9794778c34a5800ef9e979.ppt

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

A Visual Query Language for Business Processes Catriel Beeri Hebrew University Anat Eyal, Simon A Visual Query Language for Business Processes Catriel Beeri Hebrew University Anat Eyal, Simon Kamenkovich, Tova Milo Tel Aviv University Beeri, Eyal, Kamenkovitch, Milo 2006

Outline v Introduction and motivation v Overview by example v System and query formal Outline v Introduction and motivation v Overview by example v System and query formal model v Compact representation of query answers v Implementation v Summary Beeri, Eyal, Kamenkovitch, Milo 2006 2

The Standard Example itt edi red nse C c Cr eo k p h The Standard Example itt edi red nse C c Cr eo k p h Cs Re Purchase Invoice Order Client Credit Service Consolidate Results PO Service In. R ve RIn ento es serry ve po ve nto ns ey r Inventory Service Beeri, Eyal, Kamenkovitch, Milo 2006 3

Web Services Meet Business Processes Local to company A Web Service 1 Web Service Web Services Meet Business Processes 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 On the Web Company A business process Beeri, Eyal, Kamenkovitch, Milo 2006 4

Recent History of Business Process Standards BPML BPSS WSCI WS-Choreography (Intallio et al) (eb. Recent History of Business Process Standards 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 2003/01 2003/04 XLang WSFL WSCL BPEL 4 WS 1. 0 BPEL 4 WS 1. 1 (Microsoft) (IBM) (HP) (IBM, Microsoft) (OASIS) BPEL Beeri, Eyal, Kamenkovitch, Milo 2006 5

BPEL in a nutshell Business process -- control and data flow • Actions: – BPEL in a nutshell Business process -- control and data flow • Actions: – atomic – compound : fork, join, while, procedure/process call, … • Process spec. represented in XML • Commercial products: – design tools with “conceptual” model – Application generators compile to executable code – Application servers execute the code Beeri, Eyal, Kamenkovitch, Milo 2006 6

Points to note • Not just a modeling language: applications are automatically generated from Points to note • Not just a modeling language: applications are automatically generated from the (relatively declarative) specs. • There will be plenty of such specs around • Specs are data; a lot of interest in querying them: “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? ” motivation for developing a query facility Beeri, Eyal, Kamenkovitch, Milo 2006 7

Can a QL be based on BPEL? NO! The BPEL XML representation is machine Can a QL be based on BPEL? NO! The BPEL XML representation is machine oriented, unfit for human consumption It decomposes the system diagram into a (XML-based) relational representation of nodes and edges loss of understanding + queries will require lots of joins Need: Similarity of system and query models Beeri, Eyal, Kamenkovitch, Milo 2006 8

Why not XQuery? (on XML representation of conceptual model) Additional requirements from query language Why not XQuery? (on XML representation of conceptual model) Additional requirements from query language : • Graphs rather than trees • Queries about control & data flow paths • Need to query at different level of granularity – Zoom-in/zoom-out • P 2 P architecture: Specs are distributed We use a home-brewed QL Beeri, Eyal, Kamenkovitch, Milo 2006 9

Querying Specs, not Runs • Not the same semantics – Q: “ does the Querying Specs, not Runs • Not the same semantics – Q: “ does the spec contain these two operations ? ” – V: “ can there be a run that contains these two operations? “ • Querying the specs is – Cheaper (specs are data, not possible executions) – Gives a reasonably good approximation for actual runs • A (practical) problem with verification: It needs a clear semantics. . . Beeri, Eyal, Kamenkovitch, Milo 2006 10

Outline v Introduction and motivation v Overview by example v System and query formal Outline v Introduction and motivation v Overview by example v System and query formal model v Compact representation of query answers v Implementation v Summary Beeri, Eyal, Kamenkovitch, Milo 2006 11

A system specification • Property, data & activity nodes • Control and data flow A system specification • Property, data & activity nodes • Control and data flow edges • A process is a di-graph of atomic and compound activities • Compound activities can be zoomed-in (a-la statecharts) Beeri, Eyal, Kamenkovitch, Milo 2006 12

Travel Agency Process Beeri, Eyal, Kamenkovitch, Milo 2006 13 Travel Agency Process Beeri, Eyal, Kamenkovitch, Milo 2006 13

Zoom In Beeri, Eyal, Kamenkovitch, Milo 2006 14 Zoom In Beeri, Eyal, Kamenkovitch, Milo 2006 14

Queries Use process patterns (like tree patterns for xml) • Single/double-headed edges (compare to Queries Use process patterns (like tree patterns for xml) • 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 • Allow * as node label • Node label variables • Mark requested nodes/edges by ü Beeri, Eyal, Kamenkovitch, Milo 2006 15

Query 1: provided operations? Beeri, Eyal, Kamenkovitch, Milo 2006 16 Query 1: provided operations? Beeri, Eyal, Kamenkovitch, Milo 2006 16

Query 2: used credit card services? local Beeri, Eyal, Kamenkovitch, Milo 2006 17 Query 2: used credit card services? local Beeri, Eyal, Kamenkovitch, Milo 2006 17

Query 3: search without login? Beeri, Eyal, Kamenkovitch, Milo 2006 18 Query 3: search without login? Beeri, Eyal, Kamenkovitch, Milo 2006 18

Query 4: data flow Data elements affected by search. Request and affecting return. Trip. Query 4: data flow Data elements affected by search. Request and affecting return. Trip. Results Beeri, Eyal, Kamenkovitch, Milo 2006 19

Outline v Introduction and motivation v Overview by example v System and query formal Outline v Introduction and motivation v Overview by example v System and query formal model v Compact representation of query answers v Implementation v Summary Beeri, Eyal, Kamenkovitch, Milo 2006 20

Formal Model System: • Process graphs + implementation function • Graph refinement (graph rewriting) Formal Model System: • Process graphs + implementation function • Graph refinement (graph rewriting) Query: Process patterns + implementation function Beeri, Eyal, Kamenkovitch, Milo 2006 21

System example implementation Beeri, Eyal, Kamenkovitch, Milo 2006 22 System example implementation Beeri, Eyal, Kamenkovitch, Milo 2006 22

Refinement (rewriting) search. Trip refined to Beeri, Eyal, Kamenkovitch, Milo 2006 23 Refinement (rewriting) search. Trip refined to Beeri, Eyal, Kamenkovitch, Milo 2006 23

Query Process patterns: • * node labels, node variables • Nodes / edges can Query Process patterns: • * node labels, node variables • Nodes / edges can be marked as transitive – Transitive edges: – Transitive node: paths of arbitrary length refinements of arbitrary depth • Nodes / edges can be marked as output Patterns related by a query implementation function Beeri, Eyal, Kamenkovitch, Milo 2006 24

Query semantics • An embedding: a mapping – from: query graphs (with uniquely identifiable Query semantics • An embedding: a mapping – from: query graphs (with uniquely identifiable nodes) – to: [refinements of] process graphs satisfying conditions: (nodes): preserves nodes types and labels (edges): edge mapped to a path (imp): preserves implementation relationships • A result: image of query graph under an embedding • Answer: all results Beeri, Eyal, Kamenkovitch, Milo 2006 25

Examples: system A B answer A 1 *4 C A 1 C 4 query Examples: system A B answer A 1 *4 C A 1 C 4 query B 2 B 3 Beeri, Eyal, Kamenkovitch, Milo 2006 26

Examples: System: A B A D C B C Query A 1 *4 B Examples: System: A B A D C B C Query A 1 *4 B 2 B 3 A 1 B 2 D 3 Answer: A 1 C 4 B 2 B 3 A 1 D 3 B 2 Beeri, Eyal, Kamenkovitch, Milo 2006 C B 27

Outline v Introduction and motivation v Overview by example v System and query formal Outline v Introduction and motivation v Overview by example v System and query formal model v Compact representation of query answers v Implementation v Summary Beeri, Eyal, Kamenkovitch, Milo 2006 28

Large or Infinite answers! Many fork/joins exponential number of paths ü ü Beeri, Eyal, Large or Infinite answers! Many fork/joins exponential number of paths ü ü Beeri, Eyal, Kamenkovitch, Milo 2006 29

Infinite answers can be generated by either • Cycles in process graph (example seen Infinite answers can be generated by either • Cycles in process graph (example seen previously) • Cycles (recursion) in zoom-in relationships Infinite # of refinements Path vars (double headed edges) + cycles infinite # of results Beeri, Eyal, Kamenkovitch, Milo 2006 30

Recursive zoom-in Beeri, Eyal, Kamenkovitch, Milo 2006 31 Recursive zoom-in Beeri, Eyal, Kamenkovitch, Milo 2006 31

A query with an infinite answer Beeri, Eyal, Kamenkovitch, Milo 2006 32 A query with an infinite answer Beeri, Eyal, Kamenkovitch, Milo 2006 32

Finite representation Beeri, Eyal, Kamenkovitch, Milo 2006 33 Finite representation Beeri, Eyal, Kamenkovitch, Milo 2006 33

Systems and queries are essentially regular graph grammars • Bad news: not closed under Systems and queries are essentially regular graph grammars • Bad news: not closed under intersection (general case) • Good news: – Our systems and queries are sufficiently simple: Psize representation (as a regular grammar) can be computed in Ptime (data complexity!) skip Beeri, Eyal, Kamenkovitch, Milo 2006 34

Answer construction Observations: • Embeddings (results) can be composed of query pattern to system Answer construction Observations: • Embeddings (results) can be composed of query pattern to system process embeddings (results) glue: the constraint (imp) • Multiple embeddings can be represented by a shared node mapping (that satisfies (nodes) and (edges) -- a homomorphism) Construction of node mappings is the core problem Beeri, Eyal, Kamenkovitch, Milo 2006 35

Node mapping/answer construction The simple case: from p. Q to p. S (not into Node mapping/answer construction The simple case: from p. Q to p. S (not into refinement) : • Find node mappings that satisfy (nodes), (edges): NP-complete in p. Q (query) , Ptime in p. S (data) • Results are 1 -1 images of mappings: – each query node is distinct, – new nodes and edges for paths (images of A D A 1 B ) C B 2 D 3 A 1 D 3 B 2 Beeri, Eyal, Kamenkovitch, Milo 2006 C B 36

The complex case: from p. Q to refinement of p. S : • A The complex case: from p. Q to refinement of p. S : • A mapping may be split into parts: – into p. S itself – into implementation of a compound action of p. S, and so on with double-headed edges – to any depth, including cycles Observations: • Only sub-graphs of p. Q with single entry/exit can be mapped to an implementation • In one mapping, a disjoint set of such graphs can be mapped to an implementation Beeri, Eyal, Kamenkovitch, Milo 2006 37

The construction: For each p. Q and p. S : • For disjoint set The construction: For each p. Q and p. S : • For disjoint set J of such sub-graphs, construct mappings for p. Q/J (each member of J replaced by $* node) to p. S • Do same for also for these sub-graphs • Glue together using by a regular grammar: – $* nodes (suitably labeled) are non-terminals – Each node (for G) is associated with the mappings for G Beeri, Eyal, Kamenkovitch, Milo 2006 38

Query : A System : A D B B E C C F Beeri, Query : A System : A D B B E C C F Beeri, Eyal, Kamenkovitch, Milo 2006 39

Extensions to QL: • OK extensions: – – label predicates , Regular path expressions Extensions to QL: • OK extensions: – – label predicates , Regular path expressions (on node labels), Negation, Joins on node labels • Not OK extensions : – Joins on path variables • The result is not a regular graph grammar • Emptiness is undecidable • NP-hard even without cycles and recursion Beeri, Eyal, Kamenkovitch, Milo 2006 40

Outline v Introduction and motivation v Overview by example v System and query formal Outline v Introduction and motivation v Overview by example v System and query formal model v Compact representation of query answers v Implementation v Summary Beeri, Eyal, Kamenkovitch, Milo 2006 41

 • Simple and intuitive query formulation similar to how processes are specified • • Simple and intuitive query formulation similar to how processes are specified • Operates in distributed environment • System and queries modeled as graph grammars allows compact representation of large/infinite answers • Ignores semantics of composite actions • AXML as an implementation platform supports – Transparent distribution – Taking advantage of built-in optimizations Beeri, Eyal, Kamenkovitch, Milo 2006 42

High Lights of Model & QL Base system unit: directed node-labeled graph QL primitives|: High Lights of Model & QL Base system unit: directed node-labeled graph QL primitives|: • /, // (forward axis only) • Node equality • Node label predicates • Regular expressions on node labels in paths • Negation on sub-patterns Can be seen as adaptation of XPath to di-graphs, but selection not restricted to one path Beeri, Eyal, Kamenkovitch, Milo 2006 43

Advanced system structure: an infinite family of directed node-labeled graphs, specified by a graph Advanced system structure: an infinite family of directed node-labeled graphs, specified by a graph grammar Additional QL primitives: • double-headed node: query on all graphs derived from a given graph • Answer representation as a graph grammar Beeri, Eyal, Kamenkovitch, Milo 2006 44

Future work • Investigate queries on logs Does this pattern exist? • “Querying of Future work • Investigate queries on logs Does this pattern exist? • “Querying of runs” – essentially verification • “Marxist” extensions to QL primitives Beeri, Eyal, Kamenkovitch, Milo 2006 45