Process modeling

Download Report

Transcript Process modeling

Modeling workflows

:

Mapping workflows onto Petri nets.

Wil van der Aalst

Eindhoven University of Technology Faculty of Technology Management Department of Information and Technology P.O. Box 513 5600 MB Eindhoven The Netherlands [email protected]

1

Workflow management concepts • • • A workflow definition is composed out of three parts:

process definition

: a description of the process itself

resource classification

: a classification of the resources to be used

resource management rules

: how to map work onto resources 2

Process definition

A

process definition

specifies which steps are required and in what order they should be executed.

(routing definition, procedure, workflow script) (purchase order, tax declarations, insurance claims process) • • • A process definition consists of:

Tasks

(step, activity, process element) A task is atomic: commit or rollback.

Conditions

(state, phase, requirement) A condition is used to determine the enabling of a task.

Subprocesses

3

Case A

case

is the 'thing' which needs to be processed by following the process definition.

(process instance, job, project) (insurance claim, purchase order, complaint, loan application) • • • The

state of a case

is determined by:

case variables

(case parameters ) The logistic attributes of a case which are used to route the case.

conditions

The requirements which are satisfied.

(Application data)

Beyond the scope of the WFMS.

4

Mapping a process definition onto Petri nets

task condition case subprocess case variables

5

Routing of cases

• Sequential "first A then B" • Parallel "A en B at the same time or in any order" – AND-split – AND-join • Choice "A or B" – OR-split – OR-join • Iteration "multiple A's" 6

Sequential routing A "First A then B" B 7

Parallel routing

AND-split

A B "A and B at the same time or in any order"

AND-join

8

Choice (1)

OR-split

"A or B" Overkill ?!

A B

OR-join

9

Choice (2)

OR-split OR-join

A B Implicit choice: it depends on the "eagerness" of A and B!

10

Choice (3) We use high-level Petri nets: • tokens have values: case variables • transitions determine the number of tokens produced: explicit OR-split

OR-split OR-join

A B Choice is explicit and may be based on logistic attributes!

11

Syntactic sugaring

AND-split Explicit OR-split AND-join OR-join

12

Iteration A B may be executed several times.

B C 13

Exercise

• A travel agency organizes trips. To organize a trip the following tasks are executed.

• First the customer request is registered, then an employee searches for opportunities which are communicated to the customer. Then the customer is contacted to find out whether (s)he is still interested and whether more alternatives are desired.

• If the customer selects a trip, then the trip is booked. In parallel (if desired) one or two types of insurance are prepared.

• Two weeks before the start date the documents are sent to the customer.

• It is possible that the customer cancels the trip at any time before the start date. 14

Triggers • The workflow system cannot force things to happen in reality: – The arrival of an electronic message (EDI) which is needed to execute a task.

– A resource which starts to work on a case.

– The arrival of a paper document. – A phone call to confirm a purchase order.

• A workflow system is a reactive system, i.e. it is triggered by the environment.

• Some tasks require a trigger.

15

• We identify four kinds of tasks :

Automatic

No trigger is required.

User

A resource takes the initiative.

External

A external event (message, phone call) is required.

Time

The task requires a time trigger.

16

The triggering concept can be modeled in terms of PN

trigger token

A A However, we will omit the extra place.

17

• • • There is a subtle but important distinction between the following terms:

task

A logical step which may be executed for many cases .

work item

= task + case A logical step which may be executed for a specific case.

activity

= task + case + (resource) + (trigger) The actual execution of a task for a specific case.

Work items and activities are task instances.

18

A process definition A (sub)process has one input and one output place.

19

20

21

Insurance company

• Insurance company X processes claims which result from traffic accidents with cars where customers of X are involved in.

Therefore, it uses the following procedure for the processing of the insurance claims.

• Every claim, reported by a customer, is registered by an employee of department CD (CD = Car Damages). After the registration of the claim, the insurance claim is classified by a claim handler of rank A or B within CD. There are two categories: simple and complex claims.

• For simple claims two tasks need to be executed: check insurance and phone garage. These tasks are independent of each other.

22

Insurance company (2)

• The complex claims require three tasks to be executed: check insurance, check damage history and phone garage. These tasks need to be executed sequentially in the order specified.

• Both for the simple and complex claims, the tasks are done by employees of department CD. After executing the two respectively three tasks a decision is made. This decision is made by a claim handler of rank A and has two possible outcomes: OK (positive) or NOK (negative).

• If the decision is positive, then insurance company X will pay.

An employee of the finance department handles the payment. In any event, the insurance company sends a letter to the customer who sent the claim. An employee of the department CD writes this letter.

23

Spaghetti Carbonara INGREDIENTS: • 1 pound spaghetti • 1 pound bacon, chopped • 4 eggs, well beaten • 1 cup grated Parmesan cheese • 1/4 cup olive oil • • DIRECTIONS: • Bring a large pot of lightly salted

water to a boil

.

Add pasta

minutes or until al dente; drain. • Meanwhile,

place bacon

in a large, deep skillet.

Cook

and

cook

for 8 to 10 over medium high heat until evenly brown.

Drain

, reserving some of the drippings, crumble and set aside.

Scramble eggs Place spaghetti

in bacon drippings. in a large bowl.

Pour in olive oil

, and mix well; use enough to just moisten spaghetti.

Stir in

bacon, eggs, and Parmesan cheese.

Serve

immediately. Model the recipe as a workflow process. Focus on the process perspective and abstract from the actual ingredients.

24

Complaints handling

• Each year travel agency Y has to process a lot of complaints (about 10.000). There is a special department for the processing of complaints (department C). There is also an internal department called logistics (department L) which takes care of the registration of incoming complaints and the archiving of processed complaints. The following procedure is used to handle these complaints.

25

Complaints handling (2)

• An employee of department L first registers every incoming complaint. After registration a form is sent to the customer with questions about the nature of the complaint. This is done by an employee of department C. There are two possibilities: the customer returns the form within two weeks or not. If the form is returned, it is processed automatically resulting in a report which can be used for the actual processing of the complaint. If the form is not returned on time, a time-out occurs resulting in an empty report. Note that this does not necessarily mean that the complaint is discarded. After registration, i.e., in parallel with the form handling, the preparation for the actual processing is started.

26

Complaints handling (3)

• First, the complaint is evaluated by a complaint manager of department C. Evaluation shows that either further processing is needed or not. Note that this decision does not depend on the form handling. If no further processing is required and the form is handled, the complaint is archived. If further processing is required, an employee of the complaints department executes the task ‘process complaint’ (this is the actual processing where certain actions are proposed if needed). For the actual processing of the complaint, the report resulting from the form ´ handling is used. Note that the report can be empty. The result of task process complaint not OK, task ´ is checked by a complaint manager. If the result is ´ process complaint ´ is executed again. This is repeated until the result is acceptable. If the result is accepted, an employee of the department C executes the proposed actions. After this the processed complaint is archived by an employee of department L.

27

Travel agency

• Consider a fragment of the process of booking trips involving six steps:

register

, (booking of)

flight

, (booking of)

hotel

, (booking of)

car

,

pay

, and

cancel

.

• The process starts with task

register

and ends with

pay

or

cancel

.

• The tasks

flight

,

hotel

and

car

may succeed or fail.

Let us consider a number of variants… 28

Travel agency: Variant 1

• Every trip involves a flight, hotel and car and these are booked in parallel. If all three succeed, the payment follows. Otherwise task cancel is executed. Cancel is delayed until all three bookings succeed/fail and does not withdraw work.

29

Travel agency: Variant 2

• Every trip involves a flight, hotel and car and these are booked in parallel. If all three succeed, the payment follows. Otherwise task cancel is executed.

Task cancel can be executed the moment the first task fails and withdraws work items waiting for remaining booking tasks.

30

Travel agency: Variant 3

• Every trip may involve a flight, hotel and/or car and these are booked in parallel. A trip should involve

at least a flight, hotel or car but may be any combination of the three bookings

, e.g., a flight and car but not a hotel. If all bookings succeed, the payment follows. Otherwise task cancel is executed. Task cancel can be executed the moment the first task fails and withdraws work-items waiting for remaining booking tasks.

31

Travel agency: Variant 4

• Every trip may involve a flight, hotel and/or car and these are booked in parallel. A trip should involve at least a flight, hotel or car but may be any combination of the three bookings, e.g., a flight and car but not a hotel. If all bookings succeed, the payment follows. Otherwise task cancel is executed. Task cancel can be executed the moment the first task fails and withdraws work items waiting for remaining booking tasks.

All bookings that have completed successfully need to be compensated.

32

Template start register book_flight book_hotel pay cancel end book_car 33

Modeling workflows

:

The organizational dimension and alternative notations.

Wil van der Aalst

Eindhoven University of Technology Faculty of Technology Management Department of Information and Technology P.O. Box 513 5600 MB Eindhoven The Netherlands [email protected]

34

Workflow management concepts • • • A workflow definition is composed out of three parts:

process definition

: a description of the process itself

resource classification

: a classification of the resources to be used

resource management rules

: how to map work onto resources 35

Why?

• Avoid hard coding or resources (otherwise the process needs to be changes in case of personel changes).

• Organizations have structure (cf. organigram).

• Work distribution needs to be described: Who is doing what?

• Ordering of work items: In what order do we need to do things?

Wil Pete 36

Resource classes

• •

Resource

(participant, actor, user, agent) A resource can execute certain tasks for certain cases.

Human and/or non-human (printer, modem): limited capacity.

Resource class

A set of resources with similar characteristic(s).

• • A resource class is typically based on:

Role

(skill, competence, qualification) Classification based on what a resource can do.

Group

(department, team, office, organizational unit) Classification based on the organization.

37

Example: 8 resource classes

Eindhoven Purchase Sales Amsterdam Secretary

Kees Pim Kevin Mies Truus Jan Sjaak Anita Koos Ivone Ad Frank

Manager Sales_clerk Office_worker

groups roles 38

Organigram TU/e groups Possible roles: student, professor, programmer 39

UFO: Roles TU/e 40

Convention used in this course R , G

• Each task executed by a resource (worker) is labelled with one role and one goup.

R G

41

Insurance company

• Insurance company X processes claims which result from traffic accidents with cars where customers of X are involved in.

Therefore, it uses the following procedure for the processing of the insurance claims.

• Every claim, reported by a customer, is registered by an employee of department CD (CD = Car Damages). After the registration of the claim, the insurance claim is classified by a claim handler of rank A or B within CD . There are two categories: simple and complex claims.

• For simple claims two tasks need to be executed: check insurance and phone garage. These tasks are independent of each other.

42

Insurance company (2)

• The complex claims require three tasks to be executed: check insurance, check damage history and phone garage. These tasks need to be executed sequentially in the order specified.

• Both for the simple and complex claims, the tasks are done by employees of department CD . After executing the two respectively three tasks a decision is made. This decision is made by a claim handler of rank A (positive) or NOK (negative).

and has two possible outcomes: OK • If the decision is positive, then insurance company X will pay.

An employee of the finance department handles the payment. In any event, the insurance company sends a letter to the customer who sent the claim. An employee of the department CD writes this letter.

43

Solution (only control flow)

44

Roles and groups

• • • • The following roles are identified:

Employee

(E)

Claim handler Claim handler A Claim handler B

(CH) (CHA) (CHB) • • The following groups are identified:

Car Damages Department

(CD)

Finance Department

(FN)

CD CH FN CHA CHB E

45

CD CH FN

Resulting model

begin

E, CD CHA CHB E, CD

AND_split c2 phone_garage

E, CD

c5 AND_join register

CH, CD

simple c1 classify

E, CD

c3 check_insurance

E, CD

c6

E, CD

complex check_insurance

E, FN

c4 check_history c7 phone_garage decide OK

CHA, CD

not_OK pay c9

E, CD

end send_letter

E

c8 46

Complaints handling

• Each year travel agency Y has to process a lot of complaints (about 10.000). There is a special department for the processing of complaints ( department C ). There is also an internal department called logistics ( department L ) which takes care of the registration of incoming complaints and the archiving of processed complaints. The following procedure is used to handle these complaints.

47

Complaints handling (2)

• An employee of department L first registers every incoming complaint. After registration a form is sent to the customer with questions about the nature of the complaint. This is done by an employee of department C . There are two possibilities: the customer returns the form within two weeks or not. If the form is returned, it is processed automatically resulting in a report which can be used for the actual processing of the complaint. If the form is not returned on time, a time-out occurs resulting in an empty report. Note that this does not necessarily mean that the complaint is discarded. After registration, i.e., in parallel with the form handling, the preparation for the actual processing is started.

48

Complaints handling (3)

• First, the complaint is evaluated by a complaint manager of department C . Evaluation shows that either further processing is needed or not. Note that this decision does not depend on the form handling. If no further processing is required and the form is handled, the complaint is archived. If further processing is required, an employee of the complaints department executes the task ‘process complaint’ (this is the actual processing where certain actions are proposed if needed). For the actual processing of the complaint, the report resulting from the form ´ handling is used. Note that the report can be empty. The result of task process complaint not OK, task ´ is checked by a ´ process complaint ´ complaint manager . If the result is is executed again. This is repeated until the result is acceptable. If the result is accepted, an department C employee of the executes the proposed actions. After this the processed complaint is archived by an employee of department L .

49

Solution (only control flow)

complaint register c1 c2 send_form c3 c4 evaluate time_out process_form process c6 end c9 c7 archive execute c8 check 50

Roles and groups

• • The following roles are identified:

Employee

(E)

Complaint manager

(CM) • • The following groups are identified:

Department C Logistics department

(DC) (LD)

DC CM LD E

51

DC CM LD

Resulting model

complaint

E,LD

c1 register c2

E E,DC

send_form c3 time_out

CM,DC

c4 evaluate process_form

E,DC

process c6

E,LD

end c9 c7

CM,DC

archive

E,DC

execute c8 check 52

53

Protos (Pallas Athena)

task 54

role group 55

role group 56

4 eyes principle 57

Assumptions so far ...

• Eventually every work-item is executed by a single resource.

• Every resource is working on one activity at the same time.

Some observations: • There may be a need to further limit the set of resources (e.g., the 4 eyes principle), i.e., we need to be able to

specify further constraints

.

• There may be many resources that have the right role/group combination, i.e.,

work distribution

is needed.

• There may be many work items that can be executed by the same resource at a given point in time, i.e.,

work items need to be ordered

.

58

Further constraints

complaint

E,LD

c1 register c2

E,DC

send_form c3 time_out

CM,DC

c4 process_form evaluate

E,DC

process c6 if compensation > 1000 euro then role := manager else role := employee

E,LD

end c9 c7

CM,DC

archive

E,DC

execute c8 check

= =

59

Push versus pull

60

Push control

workflow enactment service push to a selected "victim" 61

Pull control

workflow enactment service pull selected work items 62

pull control 63

Mosts WFM systems are hybrid, e.g., Staffware

personal queue group queue 64

Who is doing what?

• Pull control – Determined by people, i.e., a "race" among resources.

– Select to start and/or select to allocate work item.

• Push control – Round robin.

– Weighted round robin.

– Shortest queue.

– Select the most specialized resource (i.e., do not allocate "generalists" unless needed). 65

In what order?

• Pull control – Determined by people, i.e., a "race" for attention.

– System may "suggest" urgent work items or offer multiple view on the work available.

• Push control – System decides whether the worker can view and/or select multiple work items, i.e., order may be enforced or suggested.

• In both cases possible queueing disciplines are: – FIFO (First In First Out) – LIFO (Last In First Out) – SPT (Shortest Processing Time) – EDD (Earliest Due Date) – PRIO (Prioritization based on case attributes) 66

Example

(taken from "Operations Management" by Roberta Russell & Bernard W. Taylor)

PROCESSING WorkItem TIME A B C D E 5 10 2 8 6 DUE DATE 10 15 5 12 8

Note that unlike most scheduling problems work items emerge on the fly!

67

FIFO (also known as FCFS) FIFO SEQUENCE A B C D E START TIME 0 5 15 17 25 PROCESSING COMPLETION TIME TIME 5 10 2 8 6 5 15 17 25 31 DUE DATE 10 15 5 12 8 TARDINESS 0 0 12 13 23

68

EDD EDD SEQUENCE C E A D B START TIME 0 2 8 13 21 PROCESSING COMPLETION TIME TIME 2 6 5 8 10 2 8 13 21 31 DUE DATE 5 8 10 12 15 TARDINESS 0 0 3 9 16

69

SPT SPT SEQUENCE C A E D B START TIME 0 2 7 13 21 PROCESSING COMPLETION TIME TIME 2 5 6 8 10 2 7 13 21 31 DUE DATE 5 10 8 12 15 TARDINESS 0 0 5 9 16

70

Comparison RULE AVERAGE COMPLETION TIME FIFO EDD SPT 18.60

15.00

14.80

AVERAGE TARDINESS 9.6

5.6

6.0

NO. OF WI TARDY 3 3 3 MAXIMUM TARDINESS 23 16 16

We will return to the topic of workflow analysis and simulation...

71