150
Solutions Selected Exercises BPMS Note that all exercises are important! This selection does not cover all material relevant for the exam. prof.dr.ir. Wil van der Aalst

Solutions Selected Exercises BPMS

  • Upload
    others

  • View
    26

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Solutions Selected Exercises BPMS

Solutions Selected

Exercises BPMS

Note that all exercises are important!

This selection does not cover all material

relevant for the exam.

prof.dr.ir. Wil van der Aalst

Page 2: Solutions Selected Exercises BPMS

PAGE 1

Page 3: Solutions Selected Exercises BPMS

Q2: Case Hospital

• Currently, many hospitals are investigating the introduction of workflow management systems to support patient diagnosis and treatment processes. Clearly, there are many complications compared to classical administrative processes. First of all, each patient is unique and given the many possible conditions and diseases there are many interacting processes. Second, there is a need for flexibility. Therefore, currently workflow management systems are only used to support relatively structured processes such as radiology, lab testing, etc. However, as workflow management systems become more powerful and flexible and patient data becomes electronic, workflow technology will become more applicable in hospitals.

Page 4: Solutions Selected Exercises BPMS

• In this assignment we consider the fictive diagnosis process of patients having a severe cough. Patient having a chronic cough (i.e., a cough that lasts for at least 3 weeks) consult a specialist of the daycare center in the hospital.

• First an appointment is made via the specialist's secretary. This is followed by the patient actually visiting the specialist in the hospital (daycare center).

• The specialist records the symptoms and decides that (1) there is no need to worry and the process ends here, (2) the patient should make a new appointment to visit the specialist in four weeks, or (3) the symptoms require an X-ray to be made. If the patient is invited to make a new appointment, then based on the subsequent visit the same three possible continuations are possible, etc. Moreover, the patient may not bother to make a new appointment. In the later case, the process ends if there is not a new appointment in 3 months.

Page 5: Solutions Selected Exercises BPMS

• If the specialist decides that an X-ray needs to be made, the patient is referred to radiology where the X-ray photograph is taken by a radiologist. The X-ray is sent to the specialist. Based on the X-ray, the specialist may decide to do more tests: (1) another X-ray, (2) a blood test, and/or (3) a CT-scan, e.g., the specialist may order a blood test and a CT scan but not another X-ray.

• The X-ray is made by a radiologist of the X-ray department. The blood test consists of two steps: taking the blood by a nurse and doing the actual test by a laboratory assistant (both from the test department). The CT-scan is done by a radiologist of the CT department.

Page 6: Solutions Selected Exercises BPMS

• Each test result is communicated to the specialist, but multiple tests can be done in parallel. Each test result is evaluated by the specialist separately, i.e., the specialist does not wait until all test results are available because this could put the patient in danger. If a test result indicates a serious problem that needs to be addressed immediately, an emergency treatment is started without waiting for the other test results.

• Note that multiple emergency treatments may be started (i.e., each time a serious problem surfaces). If none of the test results indicates such a problem, the normal treatment process is started. The diagnosis process ends if the necessary emergency treatment(s) or normal treatment have/has been started.

Page 7: Solutions Selected Exercises BPMS

• Model the above workflow diagnosis process using the notation of the book, i.e., a process definition (including triggers) and a resource classification. Make sure that the process definition is sound, i.e., it is always possible to end properly (token in final place) and there are no dead parts/dangling tokens. Test the process model using some typical scenarios to make sure that it is always possible to terminate properly!

• Model the above workflow diagnosis process using the notation of the book, i.e., depict a process definition (including triggers) which is sound. It can help to check the process model using some typical scenarios to make sure that it is always possible to terminate properly!

• Depict the resource classification using the notation of the book.

Page 8: Solutions Selected Exercises BPMS

PAGE 7

Page 9: Solutions Selected Exercises BPMS

start make

appointment

c1 record

symptoms

c3

time-out

Secr,DDC Sp,DDCc2

make X-ray

Rad,XRD

c4 send X-ray

Rad,XRD

c5

Sp,DDC

end

decide

skip1? make X-ray

Rad,XRD

c6 eval1

Sp,DDCOK

c7 c8

skip2? take blood

Nurse,TD

eval2

Sp,DDC

c10 c12

skip1? make CT-scan

Rad,CTD

eval3

Sp,DDC

c14 c15

c9 c11 test blood

LA,TD

c13

start normal

treatment

NOK

move

start

emergency

treatment

close

end

Roles:

Secr = secretary

Sp = specialist

Rad = Radiologist

Nurse = nurse LA = laboratory assistant

Groups (organizational units):

H = hospital

XRD = X-ray department

CTD = CT-scan department

DDC = daycare center

TD = test department

S2

Page 10: Solutions Selected Exercises BPMS

(Note that we do not consider the patient to be a resource

in this solution.)

Roles:

Secr = secretary

Sp = specialist

Rad = Radiologist

Nurse = nurse

LA = laboratory assistant

Groups (organizational units)

H = hospital

XRD = X-ray department

CTD = CT-scan department

DDC = daycare center

TD = test department

HDCC XRD CTD TD

Nurse

RadLA

Sp

Secr

Page 11: Solutions Selected Exercises BPMS

Roles:

Secr = secretary

Sp = specialist

Rad = Radiologist

Nurse = nurse LA = laboratory assistant

Groups (organizational units):

H = hospital

XRD = X-ray department

CTD = CT-scan department

DDC = daycare center

TD = test department

H DDC XRD CTD TD

Nurse

Rad

LA

Sp

Secr

Page 12: Solutions Selected Exercises BPMS

PAGE 11

Page 13: Solutions Selected Exercises BPMS

Instruction question - 4

order

cable

start

send bill

time-out

end

c1

c3

pay

deposit

c2install

cable

pay billc4

send

new bill

c5

change

package

disconnect

cancel return

deposit

cancel/

disconnect

c6

c7

c8

• What patterns does

the process model

contain?

• Modify the process

model so that the pay

bill task can only

execute when the

process is in state c5

• What pattern does this

modification require?

• What patterns are

difficult/impossible to

capture with workflow

nets?

Page 14: Solutions Selected Exercises BPMS

PAGE 13

Page 15: Solutions Selected Exercises BPMS

Instruction answer – 4a

order

cable

start

send bill

time-out

end

c1

c3

pay

deposit

c2install

cable

pay billc4

send

new bill

c5

change

package

disconnect

cancel return

deposit

cancel/

disconnect

c6

c7

c8

• What patterns does the process model contain?

sync

sync

def choice

def choice

ex choice

sync

par split

ex choice

arb cycle

def choice

def choice

cancel region

• Sequence

• Parallel Split

• Synchronization

• Exclusive Choice

• Simple Merge

• Multi-Choice

• Multi-Merge

• Arbitrary Cycles

• Deferred Choice

• Milestone

• Structured Loop

• Recursion

• Cancel Region

• Structured Partial Join

• Blocking Partial Join

• Cancelling Partial Join

• Generalised AND-Join

• Structured

Synchronizing Merge

• Local Synchronizing

Merge

• General Synchronizing

Merge

• Critical Section

Page 16: Solutions Selected Exercises BPMS

Instruction answer – 4b

order

cable

start

send bill

time-out

end

c1

c3

pay

deposit

c2install

cable

pay billc4

send

new bill

c5

change

package

disconnect

cancel return

deposit

cancel/

disconnect

c6

c7

c8

• Modify the process

model so that the pay

bill task can only

execute when the

process is in state c5

• What pattern does this

modification require?

• What patterns are

difficult/impossible to

capture with workflow

nets?

milestone

• partial join variants • cancellation • multiple instance • general synchronising merge • Etc.

Page 17: Solutions Selected Exercises BPMS

PAGE 16

Page 18: Solutions Selected Exercises BPMS

Instruction question - 7

• The illustration below shows the nominal form of the milestone pattern. The

difficulty with this form is that if the thread of control has passed place

milestone, then task c will never be enabled anymore. Modify the model so

that branch 2 does not block

• Also provide another example of a fundamentally different milestone.

• Show a “fake” milestone

a b

c

m

p1 p2

Page 19: Solutions Selected Exercises BPMS

PAGE 18

Page 20: Solutions Selected Exercises BPMS

Instruction answer – 7a

a b

c

m

p1 p2

b can only remove token from m after c

ocurred

avoid adding fake milestones

Page 21: Solutions Selected Exercises BPMS

Instruction answer – 7b

a b

c

m

p1 p2

d

after b occurred d can be executed

instead of cdeferred choice

d often has a trigger (e.g., time trigger)

Page 22: Solutions Selected Exercises BPMS

Instruction answer – 7c

fake milestone!

a b

c

m

p1 p2

a b

c

m

p1 p2

Page 23: Solutions Selected Exercises BPMS

PAGE 22

Page 24: Solutions Selected Exercises BPMS

Instruction question – 13

In a workflow system such as YAWL, active work items can be in an offered, allocated or started state. The transition to each state can be initiated by the system or the resource. The triple (offered by, allocated by, started by) is termed the interaction sequence for a task.

Explain the events associated with the following interaction sequences:

• SSR

• SRS

• SRR

• SSS

• RSS

• RSR

• RRS

• RRR

How are each of them configured in YAWL?

Which patterns do they correspond to?

Page 25: Solutions Selected Exercises BPMS

PAGE 24

Page 26: Solutions Selected Exercises BPMS

Instruction answer – 13a

Offer Alloc Start Effect

S R R The system offers the workitem to one or more participants. One participant self-

allocates the workitem; it is withdrawn from the other offered participants. The

participant manually starts the workitem.

S S R The system offers then immediately allocates the workitem to a participant. The

participant manually starts the workitem.

S R S The system offers the workitem to one or more participants. One participant self-

allocates the workitem; it is withdrawn from the other offered participants. The

workitem immediately starts.

S S S The system offers and allocates the workitem to one participant in a started state.

R R R An administrator offers the workitem to one or more participants. One participant self-

allocates the workitem and it is withdrawn from the other offered participants. The

participant manually starts the workitem.

R S R An administrator chooses one or more participants to offer the workitem to. One

participant from those offered is immediately allocated the workitem. The participant

manually starts the workitem.

R R S An administrator offers the workitem to one or more participants. One participant self-

allocates the workitem and it is withdrawn from the other offered participants. The

workitem starts immediately.

R S S An administrator chooses one or more participants to offer the workitem to. One

participant from those offered is immediately allocated the workitem. The workitem

immediately starts.

Page 27: Solutions Selected Exercises BPMS

Instruction answer – 13b

Page 28: Solutions Selected Exercises BPMS

Instruction answer – 13c

created

offered to

a single

resource

offered to

multiple

resources

allocated

to a single

resource

suspended

failed

started completed

R:allocate-s

R:start-s

R:suspend R:resume

R:complete

R:fail

R:start

R:start-m

S:create

S:offer-s

S:offer-m

S:allocate

R:allocate-m

Page 29: Solutions Selected Exercises BPMS

Instruction answer – 13d

SRR Distribution by Offer – Single/Multiple Resource

Resource-Initiated Allocation

Resource-Initiated Execution – Allocated Work Item

SSR Distribution by Allocation – Single Resource

Resource-Initiated Execution – Allocated Work Item

SRS Distribution by Allocation – Single Resource

Resource-Initiated Allocation

Commencement on Allocation

SSS Distribution by Allocation – Single Resource

Commencement on Creation

RRR Distribution by Offer – Single/Multiple Resource

Resource-Initiated Allocation

Resource-Initiated Execution – Allocated Work Item

RSR Distribution by Allocation – Single Resource

Resource-Initiated Execution – Allocated Work Item

RRS Distribution by Allocation – Single Resource

Resource-Initiated Allocation

Commencement on Allocation

RSS Distribution by Allocation – Single Resource

Commencement on Creation

Page 30: Solutions Selected Exercises BPMS

PAGE 29

Page 31: Solutions Selected Exercises BPMS

Instruction question - 15

• With the aid of a task lifecycle diagram, explain the difference

between the delegation and stateful reallocation patterns

• How are each of them configured in YAWL?

• What user interactions are associated with each of them?

Page 32: Solutions Selected Exercises BPMS

PAGE 31

Page 33: Solutions Selected Exercises BPMS

Instruction answer – 15a

Page 34: Solutions Selected Exercises BPMS

Instruction answer – 15b

Page 35: Solutions Selected Exercises BPMS

Instruction answer – 15c

Page 36: Solutions Selected Exercises BPMS

Instruction answer – 15d

Page 37: Solutions Selected Exercises BPMS

PAGE 36

Page 38: Solutions Selected Exercises BPMS

Exercise 4

Provide (if possible):

a)A WF-net N without inhibitor arcs such that N is sound and its short-circuited counterpart is unbounded.

b)A WF-net N without reset arcs such that N is sound and its short-circuited counterpart is unbounded.

c)A WF-net N without inhibitor arcs such that N is sound and its short-circuited counterpart is non-live.

d)A WF-net N without reset arcs such that N is sound and its short-circuited counterpart is non-live.

Page 39: Solutions Selected Exercises BPMS

PAGE 38

Page 40: Solutions Selected Exercises BPMS

A WF-net without inhibitor arcs such that N is

sound and its short-circuited counterpart is

unbounded

p5p1

t1 t2 t3

p2 p3 p4

t5

t4

Solution 4 (a)

Page 41: Solutions Selected Exercises BPMS

A WF-net without reset arcs such that N

is sound and its short-circuited

counterpart is unbounded.

p5p1

t1 t2 t3

p2 p3 p4

t5

t4

Solution 4 (b)

Page 42: Solutions Selected Exercises BPMS

A WF-net N without inhibitor arcs such that N is sound

and its short-circuited counterpart is non-live.

A WF-net N without reset arcs such that N is sound

and its short-circuited counterpart is non-live.

Both are NOT possible as shown by the

following Lemma:

Solution 4 (c+d)

Page 43: Solutions Selected Exercises BPMS

PAGE 42

Page 44: Solutions Selected Exercises BPMS

Exercise 5

Provide (if possible):

a)A WF-net N without inhibitor arcs such that N is not sound and its short-circuited counterpart is live and bounded.

b)A WF-net N without reset arcs such that N is not sound and its short-circuited counterpart is live and bounded.

Page 45: Solutions Selected Exercises BPMS

PAGE 44

Page 46: Solutions Selected Exercises BPMS

p1

t1 t2

p2 p4

p3

p1

t1

t2

p2

p3

or

Solution 5 (a)

A WF-net N without inhibitor arcs such

that N is not sound and its short-

circuited counterpart is live and

bounded.

Page 47: Solutions Selected Exercises BPMS

p1

t1 t2

p2 p4

p3

t3 t4

p1

t1

t2

p2

p3

or

A WF-net N without reset arcs such that

N is not sound and its short-circuited

counterpart is live and bounded.

Solution 5 (b)

Page 48: Solutions Selected Exercises BPMS

PAGE 47

Page 49: Solutions Selected Exercises BPMS

• Is the reverse also true ("proper completion"

implies "option to complete")?

• If yes, provide proof.

• If no, give counter-example.

Exercise 6

Page 50: Solutions Selected Exercises BPMS

PAGE 49

Page 51: Solutions Selected Exercises BPMS

• Not true, i.e., "proper completion" does NOT imply

"option to complete".

• Counter example:

Solution 6

p1 t1 t2p2 p4

t3 p3Proper completion

because if p4 has a

token the rest is

empty.

After firing t3 there is

no option to

complete.

Page 52: Solutions Selected Exercises BPMS

PAGE 51

Page 53: Solutions Selected Exercises BPMS

• Provide a general (i.e., also incorporate reset and inhibitor arcs) translation to map any WF-net with arc weights onto an equivalent WF-net without arc weights (i.e., W(x,y)=1).

Exercise 8

Page 54: Solutions Selected Exercises BPMS

PAGE 53

Page 55: Solutions Selected Exercises BPMS

(a) net with arc weights

p

...

(b) net without arc weights

p1

p2

pk

2

k k

2t12 t21

Solution 8 Basic idea for removing

up-to-k weighted arcs:

Page 56: Solutions Selected Exercises BPMS

PAGE 55

Page 57: Solutions Selected Exercises BPMS

accept

cook

collect

p6

p7

p8

p5

place

eat

pay

p2

p3

p4

p1

order

food

money

order

money

food

Exercise 9 (a)

• Consider the two WF-

nets.

• They can be

composed into one

WF-net by connecting

the interface places

and by adding a

"start" and "end"

place and transition.

• Is the composed WF-

net sound?

Page 58: Solutions Selected Exercises BPMS

PAGE 57

Page 59: Solutions Selected Exercises BPMS

accept

cook

collect

p6

p7

p8

p5

place

eat

pay

p2

p3

p4

p1

order

money

food

tstart

pstart

tend

pend

Solution 9 (a)

• See the composed

WF-net on the right.

• This composed WF-

net is sound.

Page 60: Solutions Selected Exercises BPMS

PAGE 59

Page 61: Solutions Selected Exercises BPMS

Exercise 9 (b)

• Consider the two WF-

nets.

• They can be composed

into one WF-net by

connecting the

interface places and by

adding a "start" and

"end" place and

transition.

• Is the composed WF-

net sound?

place accept

cook

collect

p6

p7

p8

p5

p2

p3

p4

p1

order

food

money

order

money

food

eat

pay

Page 62: Solutions Selected Exercises BPMS

PAGE 61

Page 63: Solutions Selected Exercises BPMS

Solution 9 (b)

place accept

cook

collect

p6

p7

p8

p5

p2

p3

p4

p1

order

food

money

order

money

food

eat

pay

• The composed WF-

net can be

constructed as

before.

• This composed WF-

net is not sound due

to a deadlock.

Page 64: Solutions Selected Exercises BPMS

PAGE 63

Page 65: Solutions Selected Exercises BPMS

Exercise 9 (c)

• Consider the two WF-

nets.

• They can be

composed into one

WF-net by connecting

the interface places

and by adding a

"start" and "end"

place and transition.

• Is the composed WF-

net sound?

collect

get drunk

cook

accept

p6

p7

p8

p5

leave

place

p2

p3

p4

p1

pay

eat

order

food

money

order

money

food

Page 66: Solutions Selected Exercises BPMS

PAGE 65

Page 67: Solutions Selected Exercises BPMS

Solution 9 (c)

collect

get drunk

cook

accept

p6

p7

p8

p5

leave

place

p2

p3

p4

p1

pay

eat

order

food

money

order

money

food

• The composed WF-

net can be

constructed as

before.

• This composed WF-

net is not sound due

to a non-

communicated

internal choice.

Page 68: Solutions Selected Exercises BPMS

PAGE 67

Page 69: Solutions Selected Exercises BPMS

Exercise 9 (d)

• Consider the two

WF-nets.

• They can be

composed into one

WF-net by

connecting the

interface places and

by adding a "start"

and "end" place

and transition.

• Is the composed

WF-net sound?

collect

accept

p5

p6

get drunk

cook

p7

p8

pay

leave

place

p2

p3

p4

p1

eat

order

food

money

song

order

money

food

song

Page 70: Solutions Selected Exercises BPMS

PAGE 69

Page 71: Solutions Selected Exercises BPMS

Solution 9(d)

collect

accept

p5

p6

get drunk

cook

p7

p8

pay

leave

place

p2

p3

p4

p1

eat

order

food

money

song

order

money

food

song

• The composed WF-

net can be

constructed as

before.

• This composed WF-

net is sound.

Page 72: Solutions Selected Exercises BPMS

PAGE 71

Page 73: Solutions Selected Exercises BPMS

Exercise 1

• Remove reset arcs, i.e., construct an

equivalent WF-net without reset arcs

(possibly with inhibitor arcs)

register

pay

start

book_hotel_OK

book_hotel_NOK

hOK

book_flight_OK

book_flight_NOK

fOK

book_car_OK

book_car_NOK

cOK

bf

bh

bcc

cancel

end

ecNOK

Page 74: Solutions Selected Exercises BPMS

PAGE 73

Page 75: Solutions Selected Exercises BPMS

Solution 1

t

p

ts pt te

tc

p

x

Use construction:

register

pay

start

book_hotel_OK

book_hotel_NOK

hOK

book_flight_OK

book_flight_NOK

fOK

book_car_OK

book_car_NOK

cOK

bf

bh

bcc

cancel

end

ecNOK

Page 76: Solutions Selected Exercises BPMS

register

pay

start

book_hotel_OK

book_hotel_NOK

hOK

book_flight_OK

book_flight_NOK

fOK

book_car_OK

book_car_NOK

cOK

bf

bh

bc

cancel

end

ecNOK

x

i init_x clear_x o

repeated for all

original transitions

c

Result of brute force:

Page 77: Solutions Selected Exercises BPMS

PAGE 76

Page 78: Solutions Selected Exercises BPMS

Exercise 5

• Provide coverability

graph.

• Is the WF-net:

• a state machine ?

• a marked graph ?

• a free-choice net ?

• well-structured ?

• sound ?

Page 79: Solutions Selected Exercises BPMS

PAGE 78

Page 80: Solutions Selected Exercises BPMS

Solution 5

coverability graph

Page 81: Solutions Selected Exercises BPMS

• Is the WF-net:

– a state machine ? NO

– a marked graph ? NO

– a free-choice net ? YES

– well-structured ? NO

– sound ? NO

Solution 5

Page 82: Solutions Selected Exercises BPMS

PAGE 81

Page 83: Solutions Selected Exercises BPMS

Exercise 6

start

A

B

D

C E

end

• Consider the incomplete WF-net shown above. The workflow always starts with A and ends with E. In the model tasks B, C and D can be executed multiple times and in any order. However, there is one requirement: tasks B and D exclude one another. If B occurs, D is not allowed to occur and if D occurs, B is not allowed to occur. Hence ABCBCBCBE and ADDDCCDCE are possible executions but ABCDE is not. Because B, C, and D are potentially concurrent, make sure that all choices are deferred choices. The model should be sound and use the book notation.

• Is the WF-net:

• a state machine ?

• a marked graph ?

• a free-choice net ?

• well-structured ?

Page 84: Solutions Selected Exercises BPMS

PAGE 83

Page 85: Solutions Selected Exercises BPMS

Solution 6

start

A

B

C

E

end

D

B

D

E

E

c1

c2

c3

c4

Is the WF-net:

•a state machine ? NO

•a marked graph ? NO

•a free-choice net ? NO

•well-structured ? NO

Page 86: Solutions Selected Exercises BPMS

PAGE 85

Page 87: Solutions Selected Exercises BPMS

Exercise 7

Is the WF-net:

•a state machine ?

•a marked graph ?

•a free-choice net ?

•well-structured ?

•sound ?

Page 88: Solutions Selected Exercises BPMS

PAGE 87

Page 89: Solutions Selected Exercises BPMS

Solution 7

Is the WF-net:

•a state machine ? NO

•a marked graph ? NO

•a free-choice net ? YES

•well-structured ? NO

•sound ? YES

Page 90: Solutions Selected Exercises BPMS

PAGE 89

Page 91: Solutions Selected Exercises BPMS

Exercise 3

• Construct two transition systems for event

log L9

− One based on past with no abstractions (prefix

automaton)

− One based on the last event only.

• Compute all minimal non-trivial regions for

both transition systems.

• Show the corresponding Petri nets.

• Check results using ProM. PAGE 90

Page 92: Solutions Selected Exercises BPMS

PAGE 91

Page 93: Solutions Selected Exercises BPMS

Prefix automaton

PAGE 92

s1

as2

s9

s6

s3

b

cs4

s5c

d

e‹b› ‹b,c›‹b,c,e›

‹a,c,d›

‹a,c›‹a›

‹›

Page 94: Solutions Selected Exercises BPMS

Regions

PAGE 93

s1

as2

s9

s6

s3

b

cs4

s5c

d

e‹b› ‹b,c›‹b,c,e›

‹a,c,d›

‹a,c›‹a›

‹›

b

c

a

e

d

s1

as2

s9

s6

s3

b

cs4

s5c

d

e‹b› ‹b,c›‹b,c,e›

‹a,c,d›

‹a,c›‹a›

‹› !

Page 95: Solutions Selected Exercises BPMS

Transition system based on

last event only

PAGE 94

s1

as2

s9 s3

b

c

s5

c

s8 d

e

{b}

{c}

{e}

{d}

{a}

{ }

Page 96: Solutions Selected Exercises BPMS

Regions and Petri net

PAGE 95

s1

as2

s9 s3

b

c

s5

c

s8 d

e

{b}

{c}

{e}

{d}

{a}

{ }

b

c

a

e

d

Page 97: Solutions Selected Exercises BPMS

PAGE 96

Past with no abstractions (note optimization wrt to merging final states)

Page 98: Solutions Selected Exercises BPMS

PAGE 97

Based on the last event only

Page 99: Solutions Selected Exercises BPMS

PAGE 98

Page 100: Solutions Selected Exercises BPMS

Exercise 4

• Construct a transition system based on past

with no abstractions (prefix automaton) for

event log L6.

• Compute all minimal non-trivial regions.

• Show the corresponding Petri net.

• Check result using ProM (also explore other

abstractions).

PAGE 99

Page 101: Solutions Selected Exercises BPMS

PAGE 100

Page 102: Solutions Selected Exercises BPMS

PAGE 101

s1

s5

12

‹a›

‹›

s4

s2

s3

s8

13 s9

‹a,c›

‹a,e›

‹a,c,e›

‹a,e,c›

‹a,c,e,g›

‹a,e,c,g›

s7

14 s6 s10

15 s11

‹b,d›

‹b,f›

‹b,d,f›

‹b,f,d›

‹b,d,f,g›

a

ce g

ec g

g

g

b

‹b›

d

fd

f

‹b,f,d,g›

Page 103: Solutions Selected Exercises BPMS

Some regions

PAGE 102

s1

s5

12

‹a›

‹›

s4

s2

s3

s8

13 s9

‹a,c›

‹a,e›

‹a,c,e›

‹a,e,c›

‹a,c,e,g›

‹a,e,c,g›

s7

14 s6 s10

15 s11

‹b,d›

‹b,f›

‹b,d,f›

‹b,f,d›

‹b,d,f,g›

a

ce g

ec g

g

g

b

‹b›

d

fd

f

‹b,f,d,g›

Page 104: Solutions Selected Exercises BPMS

Additional non-trivial minimal regions

PAGE 103

s1

s5

12

‹a›

‹›

s4

s2

s3

s8

13 s9

‹a,c›

‹a,e›

‹a,c,e›

‹a,e,c›

‹a,c,e,g›

‹a,e,c,g›

s7

14 s6 s10

15 s11

‹b,d›

‹b,f›

‹b,d,f›

‹b,f,d›

‹b,d,f,g›

a

ce g

ec g

g

g

b

‹b›

d

fd

f

‹b,f,d,g›

s1

s5

12

‹a›

‹›

s4

s2

s3

s8

13 s9

‹a,c›

‹a,e›

‹a,c,e›

‹a,e,c›

‹a,c,e,g›

‹a,e,c,g›

s7

14 s6 s10

15 s11

‹b,d›

‹b,f›

‹b,d,f›

‹b,f,d›

‹b,d,f,g›

a

ce g

ec g

g

g

b

‹b›

d

fd

f

‹b,f,d,g›

s1

s5

12

‹a›

‹›

s4

s2

s3

s8

13 s9

‹a,c›

‹a,e›

‹a,c,e›

‹a,e,c›

‹a,c,e,g›

‹a,e,c,g›

s7

14 s6 s10

15 s11

‹b,d›

‹b,f›

‹b,d,f›

‹b,f,d›

‹b,d,f,g›

a

ce g

ec g

g

g

b

‹b›

d

fd

f

‹b,f,d,g›

s1

s5

12

‹a›

‹›

s4

s2

s3

s8

13 s9

‹a,c›

‹a,e›

‹a,c,e›

‹a,e,c›

‹a,c,e,g›

‹a,e,c,g›

s7

14 s6 s10

15 s11

‹b,d›

‹b,f›

‹b,d,f›

‹b,f,d›

‹b,d,f,g›

a

ce g

ec g

g

g

b

‹b›

d

fd

f

‹b,f,d,g›

Page 105: Solutions Selected Exercises BPMS

Petri net

PAGE 104

s1

s5

12

‹a›

‹›

s4

s2

s3

s8

13 s9

‹a,c›

‹a,e›

‹a,c,e›

‹a,e,c›

‹a,c,e,g›

‹a,e,c,g›

s7

14 s6 s10

15 s11

‹b,d›

‹b,f›

‹b,d,f›

‹b,f,d›

‹b,d,f,g›

a

ce g

ec g

g

g

b

‹b›

d

fd

f

‹b,f,d,g›

s1

s5

12

‹a›

‹›

s4

s2

s3

s8

13 s9

‹a,c›

‹a,e›

‹a,c,e›

‹a,e,c›

‹a,c,e,g›

‹a,e,c,g›

s7

14 s6 s10

15 s11

‹b,d›

‹b,f›

‹b,d,f›

‹b,f,d›

‹b,d,f,g›

a

ce g

ec g

g

g

b

‹b›

d

fd

f

‹b,f,d,g›

s1

s5

12

‹a›

‹›

s4

s2

s3

s8

13 s9

‹a,c›

‹a,e›

‹a,c,e›

‹a,e,c›

‹a,c,e,g›

‹a,e,c,g›

s7

14 s6 s10

15 s11

‹b,d›

‹b,f›

‹b,d,f›

‹b,f,d›

‹b,d,f,g›

a

ce g

ec g

g

g

b

‹b›

d

fd

f

‹b,f,d,g›

s1

s5

12

‹a›

‹›

s4

s2

s3

s8

13 s9

‹a,c›

‹a,e›

‹a,c,e›

‹a,e,c›

‹a,c,e,g›

‹a,e,c,g›

s7

14 s6 s10

15 s11

‹b,d›

‹b,f›

‹b,d,f›

‹b,f,d›

‹b,d,f,g›

a

ce g

ec g

g

g

b

‹b›

d

fd

f

‹b,f,d,g›

b

c

a

e

d

f

g

Note redundant places!

Page 106: Solutions Selected Exercises BPMS

Even more minimal regions ?

• These would be added when using the basic

algorithm.

• However, they can be discarded because they have

no exiting arcs and are therefore not limiting the

behavior.

• ProM does not show these places. PAGE 105

s1

s5

12

‹a›

‹›

s4

s2

s3

s8

13 s9

‹a,c›

‹a,e›

‹a,c,e›

‹a,e,c›

‹a,c,e,g›

‹a,e,c,g›

s7

14 s6 s10

15 s11

‹b,d›

‹b,f›

‹b,d,f›

‹b,f,d›

‹b,d,f,g›

a

ce g

ec g

g

g

b

‹b›

d

fd

f

‹b,f,d,g›

s1

s5

12

‹a›

‹›

s4

s2

s3

s8

13 s9

‹a,c›

‹a,e›

‹a,c,e›

‹a,e,c›

‹a,c,e,g›

‹a,e,c,g›

s7

14 s6 s10

15 s11

‹b,d›

‹b,f›

‹b,d,f›

‹b,f,d›

‹b,d,f,g›

a

ce g

ec g

g

g

b

‹b›

d

fd

f

‹b,f,d,g›

Page 107: Solutions Selected Exercises BPMS

PAGE 106

Page 108: Solutions Selected Exercises BPMS

Exercise 1

• Consider an event log

containing the following traces

(frequencies are not given):

• Construct the transition

system using a multi set

abstraction based on past

events.

• Determine the non-trivial

minimal regions.

• Construct a Petri net using

these regions.

PAGE 107

a b c d b c d b c e

a b c d b c d c b e

a b c d c b d b c e

a b c d c b d c b e

a c b d b c d b c e

a c b d b c d c b e

a c b d c b d b c e

a c b d c b d c b e

• Show whether the given

transition system is elementary

or not.

• Diagnose differences between

the transition system and Petri

net.

Page 109: Solutions Selected Exercises BPMS

PAGE 108

Page 110: Solutions Selected Exercises BPMS

Transition System and Minimal Regions

PAGE 109

s1

a

s2b

s14

s3 s4

c

s5bc

d

s6b

s7 s8

c

s9bc

d

s10b

s11 s12

c

s13bc

e

s1

a

s2b

s14

s3 s4

c

s5bc

d

s6b

s7 s8

c

s9bc

d

s10b

s11 s12

c

s13bc

e

s1

a

s2b

s14

s3 s4

c

s5bc

d

s6b

s7 s8

c

s9bc

d

s10b

s11 s12

c

s13bc

e

Answer

Exercise 1

Page 111: Solutions Selected Exercises BPMS

Petri net based on non-trivial

minimal regions

PAGE 110

s1

a

s2b

s14

s3 s4

c

s5bc

d

s6b

s7 s8

c

s9bc

d

s10b

s11 s12

c

s13bc

e

s1

a

s2b

s14

s3 s4

c

s5bc

d

s6b

s7 s8

c

s9bc

d

s10b

s11 s12

c

s13bc

e

a

b

c

ed

p2

end

p4

p3p1

start

Answer

Exercise 1

Page 112: Solutions Selected Exercises BPMS

The transition system is not elementary!

PAGE 111

• GER(a) = {s1}

• GER(b) = {s2,s4,s6,s8,s10,s12}

• GER(c) = {s2,s3,s6,s7,s10,s11}

• GER(d) = {s5,s9}

• GER(e) = {s13}

• pre(a) = {{s1}}

• pre(b) = {{s2,s4,s6,s8,s10,s12}}

• pre(c) = {{s2,s3,s6,s7,s10,s11}}

• pre(d) = {{s4,s5,s8,s9,s12,s13},{s3,s5,s7,s9,s11,s13}}

• pre(e) = {{s4,s5,s8,s9,s12,s13},{s3,s5,s7,s9,s11,s13}}

• GER(a) = {s1} = ∩ pre(a)

• GER(b) = {s2,s4,s6,s8,s10,s12} = ∩ pre(b)

• GER(c) = {s2,s3,s6,s7,s10,s11} = ∩ pre(c)

• GER(d) = {s5,s9} ≠ {s5,s9,s13} = ∩ pre(d)

• GER(e) = {s13} ≠ {s5,s9,s13} = ∩ pre(e)

s1

a

s2b

s14

s3 s4

c

s5bc

d

s6b

s7 s8

c

s9bc

d

s10b

s11 s12

c

s13bc

e

s1

a

s2b

s14

s3 s4

c

s5bc

d

s6b

s7 s8

c

s9bc

d

s10b

s11 s12

c

s13bc

e

The transition system

is not elementary

because forward

closure does not hold.

Answer

Exercise 1

Page 113: Solutions Selected Exercises BPMS

Understanding the differences

PAGE 112

s1

a

s2b

s14

s3 s4

c

s5bc

d

s6b

s7 s8

c

s9bc

d

s10b

s11 s12

c

s13bc

e

s1

a

s2b

s14

s3 s4

c

s5bc

d

s6b

s7 s8

c

s9bc

d

s10b

s11 s12

c

s13bc

e

a

b

c

ed

p2

end

p4

p3p1

start

• GER(d) = {s5,s9} ≠ {s5,s9,s13} = ∩ pre(d)

• GER(e) = {s13} ≠ {s5,s9,s13} = ∩ pre(e)

Traces such as abce, acbdbce, and abcdbcdbcdbcdbcdbce are

possible in the Petri net but not in the transition system!

Answer

Exercise 1

Page 114: Solutions Selected Exercises BPMS

PAGE 113

Page 115: Solutions Selected Exercises BPMS

Exercise 2

• Assume the transition system

is derived from some event log.

• Determine the non-trivial

minimal regions.

• Construct a Petri net using

these regions.

• Show whether the given

transition system is elementary

or not.

• Diagnose differences between

the transition system and Petri

net.

PAGE 114

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

Page 116: Solutions Selected Exercises BPMS

PAGE 115

Page 117: Solutions Selected Exercises BPMS

Minimal non-trivial regions

PAGE 116

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

Answer

Exercise 2

Page 118: Solutions Selected Exercises BPMS

Petri net constructed using the

minimal regions

PAGE 117

a c

p1

b

d

e

p2

p3

p4

p5

p6

p7

p8

e

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

Answer

Exercise 2

Page 119: Solutions Selected Exercises BPMS

Elementary Transition System?

All simple requirements hold:

• all states are reachable from initial state,

• no self loops,

• transitions signal choices.

Remains to check:

• state separation (states cannot be

identical wrt regions), and

• forward closure (regions should not allow

for more behavior than the transition

system).

PAGE 118

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

Answer

Exercise 2

Page 120: Solutions Selected Exercises BPMS

Forward closure?

PAGE 119

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

• GER(a) = {s1}

• GER(b) = {s2,s4,s5,s8}

• GER(c) = {s2,s3,s5,s7}

• GER(d) = {s2,s3,s4,s6}

• GER(e) = {s5,s7,s8,s9}

• GER(f) = {s9}

• pre(a) = {{s1}}

• pre(b) = {{s2,s4,s5,s8}}

• pre(c) = {{s2,s3,s5,s7}}

• pre(d) = {{s2,s3,s4,s6}}

• pre(e) = {{s5,s7,s8,s9}}

• pre(f) = {{s3,s6,s7,s9},{s4,s6,s8,s9},{s5,s7,s8,s9}}

• GER(a) = {s1} = ∩ pre(a)

• GER(b) = {s2,s4,s5,s8} = ∩ pre(b)

• GER(c) = {s2,s3,s5,s7} = ∩ pre(c)

• GER(d) = {s2,s3,s4,s6} = ∩ pre(d)

• GER(e) = {s5,s7,s8,s9} = ∩ pre(e)

• GER(f) = {s9} = ∩ pre(f)

Answer

Exercise 2

Page 121: Solutions Selected Exercises BPMS

State separation

PAGE 120

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

s1 s2 s3 s4 s5 s6 s7 s8 s9 s10

s1

s2

s3

s4

s5

s6

s7

s8

s9

s10

For every pair of different states we can find

a region where one is in and the other is out.

Answer

Exercise 2

Page 122: Solutions Selected Exercises BPMS

Conclusion

PAGE 121

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

cdd

b

c

b

f

e

e

e

e

The transition system

is elementary because

all conditions hold.

a c

p1

b

d

e

p2

p3

p4

p5

p6

p7

p8

e

No differences in

behavior: bisimilar.

Answer

Exercise 2

Page 123: Solutions Selected Exercises BPMS

PAGE 122

Page 124: Solutions Selected Exercises BPMS

PAGE 123

b

c

a

e

d

Exercise 5: Compute Fitness Using Missing and Remaining Tokens

trace frequency

acd 10

bce 10

ace 5

bcd 5

dca 1

abd 1

d 1

• Consider the event log containing 33 cases.

• What is the fitness?

Page 125: Solutions Selected Exercises BPMS

PAGE 124

Page 126: Solutions Selected Exercises BPMS

Fitness = 0.895705521

PAGE 125

b

c

a

e

d

trace frequency produced tokens (p) remaining tokens (r) consumed tokens (c) missing tokens (m) produced tokens (all) remaining tokens (all) consumed tokens (all) missing tokens (all)

acd 10 5 0 5 0 50 0 50 0

bce 10 5 0 5 0 50 0 50 0

ace 5 5 1 5 1 25 5 25 5

bcd 5 5 1 5 1 25 5 25 5

dca 1 5 3 5 3 5 3 5 3

abd 1 6 3 5 2 6 3 5 2

d 1 2 1 3 2 2 1 3 2

163 17 163 17

sum p sum r sum c sum m

fitness 0.895705521

Answer

Exercise 5

Page 127: Solutions Selected Exercises BPMS

ProM 5.2 output

PAGE 126

fitness of

0.8957

total of

17=1+3+6+6+1

remaining tokens

total of

17=1+1+7+5+3

missing tokens

Answer

Exercise 5

Page 128: Solutions Selected Exercises BPMS

PAGE 127

Page 129: Solutions Selected Exercises BPMS

Exercise 6: Compute Fitness Using Missing and Remaining Tokens

PAGE 128

a

b

c

df

p2

end

p4

p3p1

start

e

p5

trace frequency

abefcd 10

abbefccd 10

• Consider the event log

containing 20 cases.

• What is the fitness?

Page 130: Solutions Selected Exercises BPMS

PAGE 129

Page 131: Solutions Selected Exercises BPMS

Fitness = 0.8

PAGE 130

trace frequency produced tokens (p) remaining tokens (r) consumed tokens (c) missing tokens (m) produced tokens (all) remaining tokens (all) consumed tokens (all) missing tokens (all)

abefcd 10 9 2 9 2 90 20 90 20

abbefccd 10 11 2 11 2 110 20 110 20

200 40 200 40

sum p sum r sum c sum m

fitness 0.8

a

b

c

df

p2

end

p4

p3p1

start

e

p5

Answer

Exercise 6

Page 132: Solutions Selected Exercises BPMS

ProM 5.2 output

PAGE 131

fitness of 0.8 total of

40=10+10+20

remaining tokens

total of

40=20+10+10

missing tokens

Answer

Exercise 6

Page 133: Solutions Selected Exercises BPMS

PAGE 132

Page 134: Solutions Selected Exercises BPMS

Question 5: How many valid

configurations?

PAGE 133

a b e

c

d

f h

g

Page 135: Solutions Selected Exercises BPMS

PAGE 134

Page 136: Solutions Selected Exercises BPMS

Solution 5: 6 valid configurations

PAGE 135

• f cannot be blocked: hiding of f is independent of rest

• e or (c and d) need to be activated

• c is activated if and only if d is activated

• hence, 2*3=6 valid configurations

a b e

c

d

f h

gactivated:

c&d,

e, or

c&d&e.

activate

or hide,

but not

block

Page 137: Solutions Selected Exercises BPMS

Example of a valid configuration

PAGE 136

a b e

c

d

f h

g

a b e h

g

Page 138: Solutions Selected Exercises BPMS

Example of an invalid configuration

PAGE 137

a b e

c

d

f h

g

a b e

d

f h

g

Page 139: Solutions Selected Exercises BPMS

PAGE 138

Page 140: Solutions Selected Exercises BPMS

Question 6: Merge four variants into a

configurable model

PAGE 139

Minimal requirement:

Create a configurable

WF-net such that each

variant corresponds to a

valid configurations.

a b

c

d

e g

a b

c

d

e g

f

a

c

d

e g

a

c

d

e g

f

Page 141: Solutions Selected Exercises BPMS

PAGE 140

Page 142: Solutions Selected Exercises BPMS

Solution 6

PAGE 141

a b

c

d

e g

f

Page 143: Solutions Selected Exercises BPMS

PAGE 142

Page 144: Solutions Selected Exercises BPMS

Question 7: Three event logs L1-L3

• Construct three process models for these events

logs using the multiset abstraction (based on past)

and state-based regions.

• Create a configurable WF-net such that each of the

three variants corresponds to a valid configuration.

PAGE 143

L1 = [<a,b,c,d,e>20, <a,b,d,c,e>30, <a,c,b,d,e>10,

<a,c,d,b,e>20, <a,d,b,c,e>30, <a,d,c,b,e>10]

L2 = [<a,c,d,e>20, <a,d,c,e>30]

L3 = [<f,g>20]

Page 145: Solutions Selected Exercises BPMS

PAGE 144

Page 146: Solutions Selected Exercises BPMS

Solution: Regions and Petri net for L1

PAGE 145

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

c

dd b

c

b

e

a c

b

d

e

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

c

dd b

c

b

e

s1

s10

s2

a

s4

c

s3

b

s5

d

s6

s9

s7 s8

c

b

d

c

dd b

c

b

e

L1 = [<a,b,c,d,e>20, <a,b,d,c,e>30,

<a,c,b,d,e>10 ,<a,c,d,b,e>20,

<a,d,b,c,e>30, <a,d,c,b,e>10]

Page 147: Solutions Selected Exercises BPMS

Regions and Petri net for L2

PAGE 146

a c

d

e

s1

s10

s2

a

s4

c

s5

d

s8

c

d

e

s1

s10

s2

a

s4

c

s5

d

s8

c

d

e

L2 = [<a,c,d,e>20, <a,d,c,e>30]

Page 148: Solutions Selected Exercises BPMS

Regions and Petri net for L3

PAGE 147

f g

s1

s3

s2

f

g

L3 = [<f,g>20]

Page 149: Solutions Selected Exercises BPMS

Merge models into a configurable model

PAGE 148

f g

a c

d

e

a c

b

d

e

a c

b

d

e

f g

Page 150: Solutions Selected Exercises BPMS

PAGE 149

Practise!