Modeling workflows Mapping workflows onto Petri nets Wil

  • Slides: 71
Download presentation
Modeling workflows: Mapping workflows onto Petri nets. Wil van der Aalst Eindhoven University of

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 w. m. p. v. d. aalst@tm. tue. nl 1

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

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

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

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

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

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 B "First A then B" 7

Sequential routing A B "First A then B" 7

Parallel routing AND-split AND-join A B "A and B at the same time or

Parallel routing AND-split AND-join A B "A and B at the same time or in any order" 8

Choice (1) OR-split OR-join A B "A or B" Overkill ? ! 9

Choice (1) OR-split OR-join A B "A or B" Overkill ? ! 9

Choice (2) OR-join OR-split A B Implicit choice: it depends on the "eagerness" of

Choice (2) OR-join OR-split 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 •

Choice (3) We use high-level Petri nets: • tokens have values: case variables • transitions determine the number of tokens produced: explicit 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

Syntactic sugaring AND-split Explicit OR-split AND-join OR-join 12

Iteration B A C B may be executed several times. 13

Iteration B A C B may be executed several times. 13

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

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

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

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

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

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

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

20

20

21

21

Insurance company • Insurance company X processes claims which result from traffic accidents with

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 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

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 and cook for 8 to 10 minutes or until al dente; drain. • Meanwhile, place bacon in a large, deep skillet. Cook over medium high heat until evenly brown. Drain, reserving some of the drippings, crumble and set aside. • Scramble eggs in bacon drippings. • Place spaghetti 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 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.

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

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´ is checked by a complaint manager. If the result is not OK, task ´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

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

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

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 workitems waiting for remaining booking tasks. 30

Travel agency: Variant 3 • Every trip may involve a flight, hotel and/or car

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

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 33

Template 33

Modeling workflows: The organizational dimension and alternative notations. Wil van der Aalst Eindhoven University

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 w. m. p. v. d. aalst@tm. tue. nl 34

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

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

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

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 Kees Pim Amsterdam Sales Koos Mies Truus groups

Example: 8 resource classes Eindhoven Purchase Kees Pim Amsterdam Sales Koos Mies Truus groups Sjaak Ivone Ad Kevin Secretary Jan Manager Anita Frank Sales_clerk Office_worker roles 38

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

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

UFO: Roles TU/e 40

UFO: Roles TU/e 40

Convention used in this course R, G • Each task executed by a resource

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

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 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. 43

Solution (only control flow) 44

Solution (only control flow) 44

Roles and groups The following roles are identified: • Employee (E) • Claim handler

Roles and groups The following roles are identified: • Employee (E) • Claim handler (CH) • Claim handler A (CHA) • Claim handler B (CHB) The following groups are identified: • Car Damages Department (CD) • Finance Department (FN) 45

Resulting model 46

Resulting model 46

Complaints handling • Each year travel agency Y has to process a lot of

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.

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

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´ is checked by a complaint manager. If the result is not OK, task ´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. 49

Solution (only control flow) 50

Solution (only control flow) 50

Roles and groups The following roles are identified: • Employee (E) • Complaint manager

Roles and groups The following roles are identified: • Employee (E) • Complaint manager (CM) The following groups are identified: • Department C (DC) • Logistics department (LD) 51

Resulting model 52

Resulting model 52

53

53

Protos (Pallas Athena) task 54

Protos (Pallas Athena) task 54

role group 55

role group 55

role group 56

role group 56

4 eyes principle 57

4 eyes principle 57

Assumptions so far. . . • Eventually every work-item is executed by a single

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 = if compensation > 1000 euro then role : = manager else

Further constraints = if compensation > 1000 euro then role : = manager else role : = employee = 59

Push versus pull 60

Push versus pull 60

Push control workflow enactment service push to a selected "victim" 61

Push control workflow enactment service push to a selected "victim" 61

Pull control workflow enactment service pull selected work items 62

Pull control workflow enactment service pull selected work items 62

pull control 63

pull control 63

Mosts WFM systems are hybrid, e. g. , Staffware personal queue group queue 64

Mosts WFM systems are hybrid, e. g. , Staffware personal queue group queue 64

Who is doing what? • Pull control – Determined by people, i. e. ,

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

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 Work.

Example (taken from "Operations Management" by Roberta Russell & Bernard W. Taylor) PROCESSING Work. Item 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 START SEQUENCE TIME A B C D E

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

EDD START SEQUENCE TIME C E A D B 0 2 8 13 21

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

SPT START SEQUENCE TIME C A E D B 0 2 7 13 21

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

Comparison RULE FIFO EDD SPT AVERAGE COMPLETION TIME 18. 60 15. 00 14. 80

Comparison RULE FIFO EDD SPT AVERAGE COMPLETION TIME 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