deriving explicit data links in ws-bpel processes
TRANSCRIPT
International Conference on Services ComputingSCC 2008 – http://conferences.computer.org/scc/
Deriving Explicit Data Links inWS-BPEL ProcessesWS BPEL Processes
Oliver Kopp, Rania Khalaf, Frank LeymannInstitute of Architecture of Application Systems
Background and Motivation
For splitting BPEL-processes, the dataflow edges have to be knownhave to be known
i.e. the def-use-edges (writer-reader-relation)
31 2
12
01
2
0
14 5
33
03
w2 and w3 are possible writers for r1w1 is a possible writer for r2
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 2
Weaknesses of existing approaches
No direct support for DPENo direct support for DPEAND-join “optimization” not built in
No support for compound variables
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 3
Basic idea
Considering flow onlyNo scope, no loop p , p
O i tiOverapproximationA dataflow-edges too much is better than a gdataflow-edge too less
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 4
The function writes
Possible writerswrites : (A [ E)£ V ! 2A £ 2A £ 2A £ Bwrites : (A [ E)£ V ! 2A £ 2A £ 2A £ B
Possible writers Disabled writersInvalid writersInvalid writersMay-be-dead
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 5
Writers before and after interpretation of an activity
is split upreturns the result before interpreting anitit
writeswrites
returns the result before interpreting an activitywrites±writes±
returns the result after interpreting an activitywrites²writes²
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 6
Initialization
writes±(a; v) Ã (;; ;; ;; false)writes±(a; v) Ã (;; ;; ;; false)
i ( ) (; ; ; f l )i ( ) (; ; ; f l )writes²(a; v) Ã (;; ;; ;; false)writes²(a; v) Ã (;; ;; ;; false)
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 7
interpretActivity
Handles writing activitiesinterpretActivity : A£ V £ 2A £ 2A £ 2A £ B ! 2A £ 2A £ 2A £ BinterpretActivity : A£ V £ 2A £ 2A £ 2A £ B ! 2A £ 2A £ 2A £ B
gHandling of joinConditions is taken into account by joinLinks() (see later)If a is no writer: identitiy. Otherwise: If there was a transition condition:
P ibl it di bl dPossible writers are disabledElse
Possible writers get invalidPossible writers get invalidActivity itself may not get disabled or invalid
interpretActivity : (a; v; P;D; I; d) 7!
8><(fag; D [ P n fag; I; false) w(a; v) ^ d
(fag;D; I [ P n fag; false) w(a; v) ^ :dinterpretActivity : (a; v; P;D; I; d) 7!
8><(fag; D [ P n fag; I; false) w(a; v) ^ d
(fag;D; I [ P n fag; false) w(a; v) ^ :d
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 8
<>:id :w(a; v)
<>:id :w(a; v)
Step from an activity to a link
Li k h l ti it Th fwrites±(l; v) Ã writes²(V
¡(l); v)writes±(l; v) Ã writes²(V¡(l); v)
Link has only one source activity. Therefore, the result from the source activity can just be t k i ttaken as input
writes²(l; v) Ã (poss±(l; v);writes²(l; v) Ã (poss±(l; v);²( ; ) (p ±( ; );
dis±(l; v);
inv±(l; v);
²( ; ) (p ±( ; );
dis±(l; v);
inv±(l; v);
everything is preserved, existence of tc
±( ; );
mbd±(l; v) _ :alwaysTrue(tc(l)))
±( ; );
mbd±(l; v) _ :alwaysTrue(tc(l)))
y g ppossibly evaluating to false is noted
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 9
Step from a link to an activity
writes±(a; v) Ã joinLinks(a; v)writes±(a; v) Ã joinLinks(a; v)
is joining the information of thewrites²(a; v) Ã interpretActivity(a; v;writes±(a; v))writes²(a; v) Ã interpretActivity(a; v;writes±(a; v))
joinLinks(a; v)joinLinks(a; v) is joining the information of the incoming links
h dl i i
j ( ; )j ( ; )
i A i i ( )i A i i ( ) handles one incoming link (which was created by joinLinks)interpretActivity(a; v; : : :)interpretActivity(a; v; : : :)
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 10
joinLinks: Possible Writers
joins the information on the incoming linksjoinLinks : (a; v) 7! (P;D; I; d)joinLinks : (a; v) 7! (P;D; I; d)
on the incoming linksAn OR join may revive disabled writersj yIf each incoming link disables a writer, this writer will not revive at this join (i e itwriter will not revive at this join (i.e., it remains disabled)
P =
8>>< [l2E¡(a)
possible(l; v) (jc(a) = AND) _ (jE¡(a)j = 1)[possible(l v) [ disabled(l v) n
\disabled(l v)
P =
8>>< [l2E¡(a)
possible(l; v) (jc(a) = AND) _ (jE¡(a)j = 1)[possible(l v) [ disabled(l v) n
\disabled(l v)
<>>: [l2E¡(a)
possible(l; v) [ disabled(l; v) n\
l2E¡(a)
disabled(l; v) otherwise
<>>: [l2E¡(a)
possible(l; v) [ disabled(l; v) n\
l2E¡(a)
disabled(l; v) otherwise
plus: Link may not have a
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 11
plus: Link may not have anegative join condition
joinLinks: Disabled Writers
An OR join revives disabled writersjoinLinks : (a; v) 7! (P;D; I; d)joinLinks : (a; v) 7! (P;D; I; d)
An OR-join revives disabled writers.But not these, which are disabled on all paths
D =
8>>< [l2E¡(a)
disabled(l; v) (jc(a) = AND) _ (jE¡(a)j = 1)\D =
8>>< [l2E¡(a)
disabled(l; v) (jc(a) = AND) _ (jE¡(a)j = 1)\D<>>: \
l2E¡(a)
disabled(l; v) otherwise
D<>>: \
l2E¡(a)
disabled(l; v) otherwise
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 12
joinLinks: Invalid Writers
joinLinks : (a; v) 7! (P;D; I; d)joinLinks : (a; v) 7! (P;D; I; d)
All invalid writers remain invalidI =
[l E ( )
invalid²(l; v)I =[
l E ( )
invalid²(l; v)l2E¡(a)l2E¡(a)
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 13
joinLinks: May be Dead
8< false alwaystrue(jc(a))8< false alwaystrue(jc(a))
joinLinks : (a; v) 7! (P;D; I; d)joinLinks : (a; v) 7! (P;D; I; d)
Activity a may never be dead even if dead paths may
d Ã
8<: true negations(jc(a))
:[[a; v]]jc:mbd² otherwise
d Ã
8<: true negations(jc(a))
:[[a; v]]jc:mbd² otherwise
Activity a may never be dead, even if dead paths may reach a. For example: There is one path, which is not dead and activity a contains an “OR” join condition. y j
Use the negated value of mbd of each link
mbd²(l1; v) = true; mbd²(l2; v) = fale; jc(a) = l1 _ l2mbd²(l1; v) = true; mbd²(l2; v) = fale; jc(a) = l1 _ l2
:[[a; v]]jc:mbd²:[[a; v]]jc:mbd²
Use the negated value of mbd of each link,Interpret the join condition on it,And use the negated result
:[[a; v]]jc:mbd²= :(:mbd²(l1; v) _ :mbd²(l2; v)) = :(:true _ :false) = :(true) = false:[[a; v]]jc:mbd²= :(:mbd²(l1; v) _ :mbd²(l2; v)) = :(:true _ :false) = :(true) = false
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 14
Complex Types
Problem:$v and $v part exist in real BPEL processes$v and $v.part exist in real BPEL processesExample:
w1: write to $v.p1 w2: write to $v.p2
Solution: Build a lattice for each variableEach node of the lattice is called “variable element”
$v
$v.part1 $v.part2
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 15
Handling of Complex Types
if a completely writes to ve
if a completely reads vw(a; ve) = truew(a; ve) = true
( )( ) if a completely reads ve
Data link has to be created from w to z,r(a; ve) = truer(a; ve) = true
if w reaches z and z reads a variable element, where parts were changed by w
Start the analysis for each variable elementDL := f(w;z) j z 2A[L; w 2 poss±(z; v
0e); v
0e v ve; r(z; ve) = truegDL := f(w;z) j z 2A[L; w 2 poss±(z; v
0e); v
0e v ve; r(z; ve) = trueg
Sta t t e a a ys s o eac a ab e e e e tOptimization: Iterate at each activity over all variable elements
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 16
Loops
is the keyThe current data of writes(l v) has to bett
The current data of writes(l,v) has to be combined with writes(nested(l,v))
A hil ti it d t it t i bl it lfA while activity does not write to a variable itself Terminate if writes(l,v) do not change
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 17
Future Work
Presented by Oliver Kopp Deriving Explicit Data Links in WS-BPEL Processes 18