View
214
Download
0
Category
Tags:
Preview:
Citation preview
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation
AWPN 2007
September 2007
Analysis of Workflow Graphs through SESE Decomposition
Jussi Vanhatalo, IBM Zurich Research LabHagen Völzer, IBM Zurich Research LabFrank Leymann, University of Stuttgart, IAAS
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation2 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Control-flow errors in business process models
Business process models are no longer only for documentation
Increasing importance when models are executed
– Workflow engine
– Realistic business measures through simulation
– Code generation
Our experience [Koehler, Vanhatalo, 2007] & other studies [Mendling et al., 2006]
– Control-flow errors, e.g. deadlocks occur frequently in real models
– Early detection can substantially save costs
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation3 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Trade off – Speed versus debugging information
Workflow graph
Preprocessor
Workflow graph
Workflow graph = Free-Choice workflow net
Sound workflow graph = no control-flow errors
Known soundness checkers can:
– Check soundness in cubic time
– Produce error trace in exponential time
Our contribution is a preprocessor:
– Speeds up any soundness checker
– Improves debugging information
Soundness checker
Sound? Yes / No
Debugging information
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation4 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Our contribution
Our preprocessor has two parts:
1) Decomposition of workflow graph
– Into fragments that can be checked in isolation
– Decomposition takes linear time
2) Fast heuristics
– Sort out many fragments occuring in practice
– Takes linear time
Fast heuristics
Decomposition
?
Sound? Yes / No
Workflow graph
Unsound
Sound
Debugging information
Soundness checker
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation5 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Outline
1. Introduction
– Workflow graphs
– Soundness
2. Decomposition into fragments
3. Heuristics for analyzing soundness
4. Case study
5. Conclusion
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation6 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Workflow graph
a1
a2
a3
activity
start node stop node
decision
fork join
merge
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation7 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Soundness of a workflow graph
= Terminal state never becomes dead = (1)+(2):
1. No (local) deadlock
• A join cannot get enough tokens
2. No lack of synchronization
• An edge carries two or more tokens at the same time
a1
a2
a3
a1
a2
a3
Deadlock
a1
a2
a3
Lack of synchronization
Initial state Terminal state
entryedge
exitedge
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation8 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Outline
1. Introduction
2. Decomposition into fragments
– Fragments
– Decomposition
– Process structure tree
3. Heuristics for analyzing soundness
4. Case study
5. Conclusion
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation9 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Single-entry-single-exit (SESE) fragments
Ca1
d1a2
f1 j1
a3
m4
m1
a6
a5 a7
a4 a8
a10
a11
f4 j4
d2m2
m3
a12a13 d3
f7
d4m5
f6
f5
a15
a14
a17
a16j5
j6
f2
a9
j2
f3
j3
A SESE fragment is a connected subgraph that has a single entry edge and a single exit edge.
exitedge
entryedge
fragment
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation10 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Single-entry-single-exit (SESE) fragments
CJa1
d1a2
f1 j1
a3
m4
m1
a6
a5 a7
a4 a8
a10
a11
f4 j4
d2m2
m3
a12a13 d3
f7
d4m5
f6
f5
a15
a14
a17
a16j5
j6
f2
a9
V
j2
f3
j3
SESE fragments are either nested (e.g. J and C), or disjoint (J and V)
SESE fragments do not overlap (essentially)
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation11 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
EA
B
C
D
JZ
Y
F
G
H
IK
L
X
M
a1
d1a2
f1 j1
a3
m4
m1
a6
a5 a7
a4 a8
a10
a11
f4 j4
d2m2
m3
a12a13 d3
f7
d4m5
f6
f5
a15
a14
a17
a16j5
j6
f2
a9
N
O
PQ
V R
S
T
U
W
j2
f3
j3
Decomposition into fragments
There is a unique decomposition into SESE fragments
Linear-time algorithm for SESE decomposition known from compiler theory used for discovering the structure of sequential programs [Johnson et al., 1994]
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation12 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
EA
B
C
D
JZ
Y
F
G
H
IK
L
X
M
a1
d1a2
f1 j1
a3
m4
m1
a6
a5 a7
a4 a8
a10
a11
f4 j4
d2m2
m3
a12a13 d3
f7
d4m5
f6
f5
a15
a14
a17
a16j5
j6
f2
a9
N
O
PQ
V R
S
T
U
W
j2
f3
j3
Z
X Y
KJ L
C D E F G H I
V W
M N
O P Q R S T U
A B
Process structure tree
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation13 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Each fragment can be analyzed in isolation
A fragment is sound if and only if
– all its child fragments are sound, and
– the fragment that is obtained by replacing each child fragment with an activity is sound. [Valette, 1979]
a10
a11
f4 j4
d2m2
m3
a12a13 d3
O
PQ
V
d2m2
m3
d3
V
PQ
O
a10
a11
f4 j4O
a12P
a13Q
+
Sound
SoundSound
Sound
Sound
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation14 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
View switch
“Fragment” means the second view in the following
a10
a11
f4 j4
d2m2
m3
a12a13 d3
O
PQ
V
d2m2
m3
d3
V
PQ
O
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation15 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
EA
B
C
D
JZ
Y
F
G
H
IK
L
X
M
a1
d1a2
f1 j1
a3
m4
m1
a6
a5 a7
a4 a8
a10
a11
f4 j4
d2m2
m3
a12a13 d3
f7
d4m5
f6
f5
a15
a14
a17
a16j5
j6
f2
a9
N
O
PQ
V R
S
T
U
W
j2
f3
j3
Z
X Y
KJ L
C D E F G H I
V W
M N
O P Q R S T U
A B
Bottom-up analysis
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation16 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
EA
B
C
D
JZ
Y
F
G
H
IK
L
X
M
a1
d1a2
f1 j1
a3
m4
m1
a6
a5 a7
a4 a8
a10
a11
f4 j4
d2m2
a12a13 d3
f7
d4m5
f6
f5
a15
a14
a17
a16j5
j6
f2
a9
N
O
PQ
V R
S
T
U
W
j2
f3
j3
Z
X Y
KJ L
C D E F G H I
V W
M N
O P Q R S T U
A B
Locating an error
m3
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation17 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Reduction achieved through decomposition
Number of fragments is linear in graph size
Time complexity of the soundness checker is cubic (exponential for error trace)
The size of the largest fragment is the most important factor for worst-case running time
Sound? Yes / No
Debugging information
8000 vs. 800
1 048 576 vs. 340
Decomposition
Workflow graph
Largest
Soundness checker
20
46
82
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation18 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Outline
1. Introduction
2. Decomposition into fragments
3. Heuristics for analyzing soundness
– Heuristic for sound fragments
– Heuristic for unsound fragments
4. Case Study
5. Conclusion
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation19 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Heuristic for sound fragments – Well-structured fragments
All sound, and all recognized in linear time
DA B C
Well-structured sequence
Well-structured cycle
Well-structured alternative branching
Well-structured concurrent branching
G
F
E
MK
O
N
L
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation20 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Heuristic for sound fragments – Pure fragments
No forks, no joins
No concurrency
No decisions, no merges
No cycles
Pure alternative branching(State machine)
Pure concurrent branching(Marked graph)
d2m2
m3
d3
O
PQ
V
E
F
G
H
IK
f2 j2
f3
j3
All sound, and all recognized in linear time
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation21 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Complex fragments
Not well-structured, nor pure
Mixes of forks/joins with decisions/merges
Sound or unsound
Soundness checker required
m4
d4m5
f6
f5j5R
S
T
U
W
C
B
A
Sound complex fragment Unsound complex fragment
Deadlock
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation22 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Outline
1. Introduction
2. Decomposition into fragments
3. Heuristics for analyzing soundness
– Heuristic for sound fragments
– Heuristic for unsound fragments
4. Case study
5. Conclusion
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation23 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Heuristic for unsound fragments
D
C
A
B
L
K
I
J
G
E
F
P
O
M
N
At least one join, but no forks At least one fork, but no joins
At least one merge, but no decisions At least one decision, but no merges
All unsound, and all recognized in linear time
H
DeadlockLack of synchr.
Lack of synchr.
Deadlock
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation24 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Heuristic for unsound fragments – Cyclic Fragments
G
H
G
G
H
H
A cycle, but no merges A cycle, but no decisions
A cycle, but no merges and no decisions
All unsound, and all recognized in linear time
Deadlock
Lack of synchr.
Deadlock
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation25 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Outline
1. Introduction
2. Decomposition into fragments
3. Heuristics for analyzing soundness
4. Case study
– Reductions achieved with the decomposition
– Applicability of the heuristics
5. Conclusion
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation26 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Case study
More than 340 process models:
– Industrial business process models
– Modeled with the IBM WebSphere Business Modeler
Library 1:
– More than 140 process models
Library 2:
– More than 200 process models
– Experimental extension of Library 1
Average analysis time per workflow graph is less than 0.1 seconds
– Excluding the soundness checker
Fast heuristics
Decomposition
?
Sound? Yes / No
Workflow graph
Unsound
Sound
Debugging information
Soundness checker
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation27 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Reductions achieved with the decomposition
Fast heuristics
Decomposition
Workflow graph
Largest
Debugging information
Library 1
Reduction factor = Graph size / size of largest fragment
– Average 2.8
– (min: 1.0, max: 9.0)
Average size: 67 edges(min: 11, max: 215)
Average size of the largest fragment: 24 edges(min: 11, max: 51)
Sound? Yes / No
140 x
Soundness checker
?Unsound
Sound
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation28 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Reduction increases as the graph size increases
Upper boundary for the largest fragment size seems to be independent of graph size
0
10
20
30
40
50
60
0 50 100 150 200 250
Number of edges in the workflow graph
Num
ber
of e
dges
in th
e la
rges
tfr
agm
ent o
f th
e w
orkf
low
gra
ph
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation29 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Applicability of the heuristics
Fast heuristics
Decomposition
?
Workflow graph
Largest
Unsound
Sound
Debugging information
100 %0 %
0 %
Sound? Yes / NoAll sound
140 x
Fragment category Percentage of fragments
1) Well-structured (sound) 54.8 %
2) Pure (sound) 45.2 %
3) Complex 0.0 %
3a) Complex (not sound) 0.0 %
3b) Complex (soundness unknown)
0.0 %
Library 1
Soundness checker
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation30 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Applicability of the heuristics
Fast heuristics
Decomposition
Soundness checker
?
Workflow graph
Largest
Unsound
Sound
Debugging information
80.3 %5.4 %
14.3 %
200 x
Fragment category Percentage of fragments
1) Well-structured (sound) 65.4 %
2) Pure (sound) 14.9 %
3) Complex 19.7 %
3a) Complex (not sound) 5.4 %
3b) Complex (soundness unknown)
14.3 %
Library 2
Sound? Yes / ? / No
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation31 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Outline
1. Introduction
2. Decomposition into fragments
3. Heuristics for analyzing soundness
4. Case study
5. Conclusion
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation32 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Conclusion
Our preprocessor has two parts:
1) Decomposition of workflow graph
– Divide-and-conquer technique– Linear time algorithm
2) Fast heuristics
– Resolves many fragments occurring in practice
– Linear time algorithm
Fast heuristics
Decomposition
?
Sound? Yes / No
Workflow graph
Unsound
Sound
Debugging information
Soundness checker
IBM Zurich Research Laboratory | Business Integration Technologies
© 2007 IBM Corporation33 Jussi Vanhatalo, Hagen Völzer, Frank Leymann
Future work
Integrate our prototype to a soundness checker
– Compare the analysis times
Use cases for the SESE decomposition:
– Browsing and constructing large processes
– Discovery of reusable subprocesses
– Code generation
Recommended