lezione 14 model transformations for bp analysis and execution
TRANSCRIPT
1
1
Ingegneria dei Processi Aziendali
Modulo 1 - Servizi Web
Unità didattica 1 – Protocolli Web
Ernesto Damiani
Università di Milano
Lezione 14 – Model Transformations for BP Analysis and Execution
2
2
Business Process Management (BPM)
Collection of methods and techniques to
design, analyze, execute and monitor business
operations involving humans, software,
information and physical artifacts using
process models.
3
3
OK, so what is a process model?
Collection of inter-dependent activities whose collective performance is intended to achieve a goal such as delivering a product or a service.
E,g. order-to-cash, procure-to-pay, issue-to-resolution
Check
Completeness
Obtain
Additional
Information
Check Credit
History
Check Income
Source(s)
Credit Card
Application
Assess
Application
Make Credit
Offer
Notify
Rejection
4
4
Process models serve many purposes…
Process
Documentation
Workflow
Management
Enterprise
Architecture Document
Management
Knowledge
Management
Process
Improvement
Process Cost
Analysis / Simulation Enterprise
Systems
Compliance /
Risk Management
Software
Evaluation/
Selection
5
5
… they have many faces
Process
Implementation
Process
Analysis & Design
Process
Enactment &
Monitoring
Process
Evaluation
“TO BE”
Process Models
Ex
ec
uta
ble
Pro
ce
ss
Mo
de
ls
Me
as
ure
s f
or
Imp
rov
em
en
t
Process
Metrics
Organizational
Analysis
Ta
rge
t V
alu
es
“AS IS”
Process
Models
Abstract Models
EPC, BPMN
Communication,
simulation, activity-
based costing…
Detailed Models
BPEL, State Machines…
Data types, conditions, data
mappings, fault handling…
Integration, testing,
deployment…
6
6
…and can be seen from many perspectives
Control-flow
Data
Resource
Operational
Sound design
Dialog premix FX premix
Music designComposer
Sound Designer
Editor
V
V
Temp picture cut
Temp picture cut
V
V
V
V
Temp music output
Temp sound output
Effect cues Dialog cues Music cues
7
7
Many in one, or one in many?
“The thing can be many in one sense, but
also can be one in another sense.”
Imam Ghazali
Revival of Religious Sciences
8
8
Process Modelling: Dealing with Multiplicity
Multiple modelling languages (meta-models)
Multiple modelling viewpoints
• Control-flow view vs. data view
• Public views (protocols) vs. private views
Multiple abstraction levels
• High-level: tasks, performance metrics...
• Low-level: data transformations, application bindings...
9
9
Process Modelling Notations
• Business Process Modelling Notation
(BPMN)
• Event-driven Process Chains (EPC)
• Business Process Execution Language
(BPEL)
• State machines and variants (e.g. IBM
Business State Machine, WWF)
• Petri nets (and variants, e.g. YAWL)
10
10
Model transformations
BPMN-to-BPEL
• Purpose: Transform models produced by analysts into models for developers (and vice-versa)
• Commonly supported in commercial tool, but in a limited manner
BPEL-to-Petri nets
• For analysis & verification
BPMN-to-Petri nets
• For analysis & verification (e.g. deadlock-freeness)
11
11
BPMN from 10 000 miles…
Event Task Flow Gateway
12
12
BPMN: A more detailed view
Start EventIntermediate
Message EventIntermediate Timer Event
Task Parallel Fork Gateway
Parallel Join Gateway
End Terminate EventEnd Event
Flow Event-based Decision Gateway
receive
Merge Gateway
Data-based Decision Gateway
c
~c
13
13
Quick BPMN example
Check stock
availability
Reject order
Confirm order
Send invoice
Ship goods
14
14
BPEL from 10 000 miles
Basic activities: <assign>, <invoke>,
<receive>
Sequential flow: <sequence>, <while>,
<switch>
Block-structured parallel flow: <flow>
Graph-oriented (parallel) flow: <link> **
Event-action rules: <onEvent> **
Other constructs not relevant to this talk…
** Only partially supported by some tools
15
15
A quick BPEL example
<sequence>
<invoke “check stock availability” …/>
<switch (…) …/>
<case “reject”> <invoke “order rejection” …/> </case>
<otherwise>
<sequence>
<invoke “order acceptance” … />
<flow> <invoke “invoicing” … />
<invoke “ship goods” … />
</flow>
</sequence> </otherwise> </switch> </sequence>
16
16
BPMN-to-BPEL: Some monsters!
Bounded multiple-
instance task (D)Unstructured loop
LivelockUnbounded multiple-
instance tasks (C)
A B C D
A B C D
A D
A
B
C
D
17
17
BPMN-to-BPEL (from 10 000 miles)
Repeat until reduction to a single node
1. Identify a structured & quasi-structured SESE region
Fold into a BPEL structured activity
2. Identify irreducible SESE regions without parallelism
Apply GotoWhile transformations, repeat from 1
3. Identify acyclic fragments with concurrency
Fold into a BPEL activity with control links
4. Identify minimal unstructured components
BPEL event handlers
18
18
BPMN-BPEL: Structured Components
( a ) SEQUENCE-component
( b ) FLOW-component
<sequence> <invoke name="t1"/> <receive name="e1"/> . . . <invoke name="tn"/></sequence>
tc
<flow> <invoke name="t1"/> <wait name="e2"/> . . . <invoke name="tn"/></flow>
tc
t1
e1
tn
t1
tn
e2
C
C
19
19
BPMN-BPEL: Structured Components
( e ) WHILE-component
( f ) REPEAT-component
<while condition="c1"> <invoke name="t1"/></while>
tc
<sequence> <invoke name="t1"/> <while condition="c1"> <invoke name="t1"/> </while></sequence>
tc
c1
~c1
t1
C
c1
~c1t1
C
20
20
BPMN-BPEL: Structured Components
( c ) SWITCH-component
( d ) PICK-component
<switch> <case condition="c1"> <invoke name="t1"/> </case> <case condition="c2"> <receive name="e1"/> </case> . . . <otherwise> <empty/> </otherwise></switch>
tc
tc
<pick> <onMessage name="e1"/> <invoke name="t1"/> </onMessage> <onAlarm name="e2"> <empty/> </onAlarm> . . . <onMessage name="tr"> <invoke name="tn"/> </onMessage></pick>
tn
t1
tr(receive)
e1
e2
C
t1
c2
default
c1
e1
C
21
21
Example: Only Structured Components
Check stock
availability
Reject order
Confirm order
Send invoice
Ship goods
Flow-component
Switch-component
Sequence-component
Sequence-component
22
22
BPMN-to-BPEL: Acyclic component
T1
T2
T3
T4
T1 T3
T2 T4
Flow-component
AND
BPMN BPEL
Proposition: Every acyclic BPMN component
with a single entry point and a single exit
point that is 1-safe and sound can be
mapped to a BPEL Flow with links
23
23
Example Structured+Acyclic Components
a2
C1
f2
f3
m4
UBL
receive EDI 856
(ASN)
receive EDI 810
(Invoice)
receive
despatch-advice
receive invoice
EDI
send
payment-request
send
fulfillment-notice
a1
a4
a3
a5
a6
d1
m5
j6
tc1 send
fulfillment-notice
a6C2
tc2
24
24
Minimizing the use of control links
a1
a3
a2
a5
a4
a6
a7
a8
fc
jc
g2
g1
g3
g4
g5
t1
a5
a7
t2
t3
g4
jc
fc
[a3, a4]
[a1, a2]
[a6, a8]
25
25
For the rest…
Identify a minimal SESE region that is neither structured nor acyclic
For each action in the component, retrieve:
• All actions that immediately precede it
• All actions that immediately follow it
For each action, code the following behaviour using event-action rules:
• Wait for a suitable combination of predecessors to complete
• Perform action
• Notify completion to all successors
26
26
BPEL-to-Petri net Application to Conformance Checking
Services
Services abstract
BPEL
process
Petri net
model
SOAP
Messages
Event Log
Services
Monitoring /
Correlation
Conformance?
Conformance
Checking!
Translation
27
27
From BPEL to WF-nets
28
28
Petri net-based Conformance Checking
Objectives:
• quantitatively measure conformance
• locate deviations
Conformance?
29
29
Conformance Checking – Fitness
30
30
Conformance Checking – Fitness
31
31
Measuring fitness: Log replay analysis
missing tokens
remaining tokens = 0
= 1
consumed tokens
produced tokens = 0
= 0
32
32
Measuring fitness: Log replay analysis
= 1
= 2
= 0
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
33
33
Measuring fitness: Log replay analysis
= 2
= 4
= 0
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
34
34
Measuring fitness: Log replay analysis
= 3
= 5
= 0
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
35
35
Measuring fitness: Log replay analysis
= 5
= 6
= 0
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
36
36
Measuring fitness: Log replay analysis
= 6
= 7
= 0
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
37
37
Measuring fitness: Log replay analysis
= 7
= 7
= 0
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
38
38
Measuring fitness: Log replay analysis
= 9
= 9
= 0
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
39
39
Measuring fitness: Log replay analysis
= 9
= 9
= 0
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
40
40
Measuring fitness: Log replay analysis
= 0
= 1
= 0
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
41
41
Measuring fitness: Log replay analysis
= 1
= 2
= 0
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
42
42
Measuring fitness: Log replay analysis
= 2
= 4
= 1
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
43
43
Measuring fitness: Log replay analysis
= 3
= 5
= 1
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
44
44
Measuring fitness: Log replay analysis
= 4
= 6
= 1
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
45
45
Measuring fitness: Log replay analysis
= 6
= 7
= 1
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
46
46
Measuring fitness: Log replay analysis
= 7
= 8
= 1
= 0
missing tokens
remaining tokens
consumed tokens
produced tokens
47
47
Measuring fitness: Log replay analysis
= 8
= 8
= 1
= 1
missing tokens
remaining tokens
consumed tokens
produced tokens
48
48
Measuring fitness: Log replay analysis
= 8
= 8
= 1
= 1
missing tokens
remaining tokens
consumed tokens
produced tokens
49
49
Measuring fitness: Log replay analysis
50
50
Measuring fitness: Log replay analysis
f = 1.0 f ≈ 0.540 f ≈ 0.955
51
51
Conformance Checking - Appropriateness
100 % fitness
but not sufficiently
specific from
behavioral point of view.
100 % fitness
but not represented in
structurally suitable way.
52
52
Ongoing work
Reversible BPMN ↔ BPEL transformation
Two-way transformation: BPEL ↔ FSM
• Application to automated service composition
• BPEL FSM not too difficult
• FSM BPEL more exciting, e.g.
A
B
B
A
A
BFINE