Querying Business Processes
Catriel Beeri
Anat Eyal,
Simon Kamenkovich,
Tova Milo
Querying Business Processes
VLDB 2006
Hebrew University
Tel Aviv University
1
Outline

Introduction and motivation

Overview of BPQL by example

Formal model

Implementation

Summary
Querying Business Processes
VLDB 2006
2
(Distributed) Business Processes
Complex applications
 Integrating remote Web Services

Common practice:
 Use BPEL for specifications
Querying Business Processes
VLDB 2006
3
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
Querying Business Processes
VLDB 2006
4
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?
Querying Business Processes
VLDB 2006
5
Requirements

Flexible granularity



Distribution



Zoom into remote components
Query remote specifications
Path extraction


Coarse-grain queries that allow for high level abstraction
Fine-grained queries that zoom-in on all components
E.g. What should I do to confirm my trip?
Ease of querying

Visual query similar to specifications (BPEL designer)
Querying Business Processes
VLDB 2006
6
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
Querying Business Processes
VLDB 2006
7
Outline

Introduction and motivation

Overview of BPQL by example

Formal model

Implementation

Summary
Querying Business Processes
VLDB 2006
8
Travel Agency Spec

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)
Querying Business Processes
VLDB 2006
9
Zoom-in
Querying Business Processes
VLDB 2006
10
BPQL Queries

Use process patterns
(like tree patterns for xml)
Query1:Provided operations?
Single/double-headed edges

(compare to / and // in XPath)



Single/double-bounded activities:




Querying Business Processes
– edges
– paths of arbitrary length
– w/o zoom-in
– unbounded zoom-in
Mark requested nodes/edges by
Node label variables
VLDB 2006
11

Query2: used credit card services?
local
Querying Business Processes
VLDB 2006
12
Query3: search without login?
Querying Business Processes
VLDB 2006
13
Query4: data flow
Data elements
affected by
searchRequest and
affecting
returnTripResults
Querying Business Processes
VLDB 2006
14
Outline

Introduction and motivation

Overview of BPQL by example

Formal model

Implementation

Summary
Querying Business Processes
VLDB 2006
15
Formal Model
System:
 Process graphs + implementation function
 Graph refinement (graph rewriting)
implementation
startSearch
startTrip
Alpha-tours
getTripRequest
searchTrip
service
provider
behavior
capability
provided
provided
cancelTrip
fork
reserveTrip
searchCars searchFlights searchRooms
confirmTrip
...
requested
provided
provided
endTrip
Query:

requested requested
join
...
endtSearch
A system where some nodes & edges are marked transitive
Querying Business Processes
VLDB 2006
16
Semantics
An embedding: a mapping
from:
to:
query graphs
[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
A result: image of query graph under an embedding
Answer: all results
Querying Business Processes
VLDB 2006
17
Large or Infinite answers!

Many fork/joins  exponential number of paths

Cycles in process graph
Cycles (recursion) in zoom-in relationships

 Infinite # of refinements
Querying Business Processes
VLDB 2006
18
Recursion example
Travel Agency
Querying Business Processes
Airline
VLDB 2006
19
Compact representation
Query
Querying Business Processes
Infinite
VLDB 2006
Compact
20
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
Querying Business Processes
VLDB 2006
21
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
Querying Business Processes
VLDB 2006
22
Outline

Introduction and motivation

Overview of BPQL by example

Formal model

Implementation

Summary
Querying Business Processes
VLDB 2006
23
First Attempt
Translation to XQuery queries over the BPEL XML
Problem: too many joins, because of the relational
representation in BPEL
nodes
process
variables
var1 …
link …
“L1”
links
descrription
start
searchTrip
reserveTrip
confirmTrip
cancelTrip
link source description target source description target source source description
…
“L5” “L1”
“L1” “L2”
“L2” “L3” “L4”
…
…
…
end
…
edges
Querying Business Processes
VLDB 2006
24
Solution: use Active XML
(www.activexml.net)
Travel agency
serviceProvider capability
behavior
zoomin
AXML: XML +
Embedded calls to web services
start
searchTrip
zoomin
reserveTrip
cancelTrip
end
start
confirmTrip
xml:sc
getTripRequest
fork
getActivity(end)
searchCars
join
searchFlights
getActivity(join)
end
searchRooms
getActivity(join)
zoomin
getOperation(searchRooms,join)
zoomout
getActivity(reserveTrip)
Querying Business Processes
VLDB 2006
25
Results
Joins vs. calls to Web services
…
…
…
Querying Business Processes
VLDB 2006
26
Distribution Effect
Distribution effect
600
Local search
x10 msec
500
Global search
400
300
200
100
0
1
2
3
4
5
number of local operations (out of 5)
Querying Business Processes
VLDB 2006
27
Outline

Introduction and motivation

Overview of BPQL by example

Formal model

Implementation

Summary
Querying Business Processes
VLDB 2006
28
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
Querying Business Processes
VLDB 2006
29
Ongoing and future work







Incomplete information
Querying/mining logs
Applications to software verification and
monitoring
Capturing more BPEL semantics
Process integration
Optimization
…
Querying Business Processes
VLDB 2006
30
Thank you
Querying Business Processes
VLDB 2006
31
Descargar

Document