model-based software engineering (02341) · „workflows are long-lived transactions ... a workflow...

59
Model-based Software Engineering (02341, spring 2016) Ekkart Kindler

Upload: danghanh

Post on 23-Apr-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Model-based Software Engineering

(02341, spring 2016)

Ekkart Kindler

Page 2: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

III. Business processes &

(Workflow Management)

Page 3: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

3 MBSE (02341 f16), L04

1. Business Processes

A simple example: A business trip (“German version”)

determine trip data

apply for trip

support trip

book trip

approve trip

send trip form

make trip

fill in trip form

reimburse expenses

Page 4: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

4 MBSE (02341 f16), L04

Business process

A business process consists of a collection of

activities that are executed in some enterprise or

administration according to certain rules and with

respect to certain goals.

Page 5: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

5 MBSE (02341 f16), L04

Examples

Business trip

Hospital information system

Patient registration

Special physical examination of a patient

Complete stay of a patient

Facility management

apply for the construction of a new building

Production

Air plane construction

...

Page 6: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

6 MBSE (02341 f16), L04

Observations

1. Business processes can take quite different time:

from a few seconds to several months or even

years.

Slogan from transaction theory: „Workflows are long-lived transactions“

Page 7: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

7 MBSE (02341 f16), L04

Observations

2. A business process can be composed from other

business processes.

Slogan from transaction theory: „Workflows are nested transactions“

Page 8: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

8 MBSE (02341 f16), L04

Observations

3. The order of activities is fully defined in some

examples; in other examples, there is only a

vaguely defined order.

In some examples, the order is not defined at all;

maybe, not even the possible activities are defined.

Page 9: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

9 MBSE (02341 f16), L04

Our example revisited

determine trip data

apply for trip

support trip

book trip

approve trip

send trip form

make trip

fill in trip form

reimburse expenses

Page 10: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

10 MBSE (02341 f16), L04

Activity / Task

An task of a business process is an atomic work step

that, on the given level of abstraction, cannot be split

into more detailed steps.

NB: „Atomic“ is with respect to some given or chosen

level of abstraction.

Page 11: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

11 MBSE (02341 f16), L04

Task

Examples:

fill in an application form

support trip (signature of superior)

send a reminder

take a blood-sample

pay out a credit

Page 12: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

12 MBSE (02341 f16), L04

Observations

4. The level of automation of a task varies:

Some tasks/activities can be executed fully

automatically.

Some tasks/activities can be executed semi-

automatically.

Some tasks/activities can be executed manually only.

Page 13: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

13 MBSE (02341 f16), L04

Re: Business Trip

note

note

trip documents receipts

application form

approval

reimburse-ment form

reimburse-ment form & receipts

copy of af

determine trip data

apply for trip

support trip

book trip

approve trip

send trip form

make trip

fill in trip form

reimburse expenses

Page 14: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

14 MBSE (02341 f16), L04

Document

In a business process, documents are created, used,

and changed.

These documents help to exchange information

among different activities of the same business

process and among different business processes.

Page 15: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

15 MBSE (02341 f16), L04

Document

Examples:

Applications

Approvals

Contracts

Reminders

Receipts

Tickets, ...

Notes

Page 16: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

16 MBSE (02341 f16), L04

Remarks

Documents can be in electronic form or on paper.

We use documents as a modelling concept; we

abstract from its physical representation.

In work flow management systems, documents will be maintained in a database (etc.) or document management system

Page 17: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

17 MBSE (02341 f16), L04

Tasks and Documents

The documents needed by the task

The documents produced by the task

Page 18: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

18 MBSE (02341 f16), L04

Re: Business Trip

determine trip data

apply for trip

support trip

book trip

approve trip

send trip form

make trip

fill in trip form

E. Kindler

E. Kindler

E. Kindler E. Kindler

W. Schäfer G. Engels Ms. Müller

Ms. Müller

E. Kindler

reimburse expenses

Page 19: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

19 MBSE (02341 f16), L04

Resources and Agents

A resource is a means necessary for executing an

activity.

When the resource is a person, we call the resource

an agent.

Page 20: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

20 MBSE (02341 f16), L04

Resources and Agents

Examples:

Persons (W. Schäfer, W. Engels, ...)

Printers

Computers

Devices (e.g. for analysing blood)

...

Page 21: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

21 MBSE (02341 f16), L04

Remarks

In a concrete instance of a business process, there are concrete resources and agents – keeping track of the involved resources is good for documentation purposes.

In a model of a business process, concrete resources and concrete agents are problematic (business trip, vacations, sick leave, etc.)

Page 22: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

22 MBSE (02341 f16), L04

Roles

A role is the capability (or competence) of an agent or

a resource to execute specific activities.

The same resource can have several roles.

Roles can be considered as a classification of

resources.

Page 23: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

23 MBSE (02341 f16), L04

Roles

Examples:

research assistant

superior

director

doctor

clerk

head of department

...

Page 24: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

24 MBSE (02341 f16), L04

Re: Business Trip

determine trip data

apply for trip

support trip

book trip

approve trip

send trip form

make trip

fill in trip form

lecturer

lecturer

lecturer lecturer

superior dean clerk

clerk

lecturer

reimburse expenses

Page 25: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

25 MBSE (02341 f16), L04

Basis Aspects of BPM

Control

Organisation

Information

Page 26: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

26 MBSE (02341 f16), L04

Control Aspect

Causal relation among the activities

(order in which the activities are executed)

Page 27: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

27 MBSE (02341 f16), L04

Information aspect

Documents and data and their structure and

how they are propagated between different

activities.

Page 28: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

28 MBSE (02341 f16), L04

Organisation Aspect

Agents and resources

roles and

how they are needed for tasks

Page 29: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

29 MBSE (02341 f16), L04

2. Workflows

A Workflow is the realization of a

business process by some

information system.

Page 30: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

30 MBSE (02341 f16), L04

Workflows

In addition to the aspects of a business process,

workflows have more aspects:

Operational aspects:

automation of activities, automatic assignment of

activities, support of activities by applications, ...

Transactional aspects:

Consistency, persistence, recovery and role back, ...

Technical aspects:

encodings, database accesses, ...

...

Page 31: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

31 MBSE (02341 f16), L04

Applications

An application is a program that supports the execution of an activity.

Examples: Word processor

Spread sheet

Mail reader

...

Page 32: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

32 MBSE (02341 f16), L04

Workflow Management System (WfMS)

A Workflow Management System is an information

system for the

development,

planning,

control, execution, and monitoring,

documentation and

evaluation

of workflows (business processes).

Page 33: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

33 MBSE (02341 f16), L04

Measures and Involved Parties

Measures for achieving these goals:

Modelling

Analysis / Simulation

Validation

Restructuring (Optimisation / Reengineering)

Enactment: Execution, monitoring, controlling, documentation.

Business process management (BPM)

Workflow management (WfM)

Page 34: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

34 MBSE (02341 f16), L04

Involved Parties

Agents (employees in their roles)

Customers (external „users“)

Managers for a single instance of a business process

for all instances of a business process

Administrators

Developers (analysts, designers, ...)

Page 35: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

35 MBSE (02341 f16), L04

Classification (after

Leymann/Roller)

structuring

Busi

ness

valu

e

ad hoc

collaborative production

administrative

our focus

Page 36: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

36 MBSE (02341 f16), L04

3. Models and Instances

Up to now, we used the same name for two different

concepts:

The execution of a concrete business process (e.g. your

trip to Aarhus two weeks ago).

The general instructions or rules to execute a business

process (e.g. for a business trip)

Which should we call a business process? How should we call the other concept?

Page 37: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

37 MBSE (02341 f16), L04

Answers

We often call both concepts business process;

the difference is clear from the context.

If necessary we talk

about an instance of a business process or a case and

about a model of a business process or a process

In terms of OO, we identify the concept of a class with the concept of the instances of the class.

Page 38: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

38 MBSE (02341 f16), L04

4. YAWL

In this section, we introduce some additional notation

for modelling business processes with Petri nets in a

slightly more user friendly way: YAWL* (Yet another

Workflow Language)

XOR-split / XOR-join

AND-split / AND-join

OR-split / OR-join

Reset-arcs

Page 39: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

39 MBSE (02341 f16), L04

Motivation

application

evaluation

result

positive

negative

One task: two different outcomes: We would like to consider this as a single activity with two possible outcomes!

Page 40: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

40 MBSE (02341 f16), L04

Problem: One Task – Two Outcomes

application

evaluation

result

positive

negative

Read as Petrinet, this would be wrong: both places, positive and negative, will be marked!

Page 41: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

41 MBSE (02341 f16), L04

Solution: Explicit XOR-Split

application

evaluation

positive

negative

Explicit XOR-Split (as a graphical shortcut)

Page 42: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

42 MBSE (02341 f16), L04

Petri Net Semantics for XOR-Split

application

evaluation

positive

negative

application

evaluation

positive

negative

XOR-split its Petri net interpretation

Page 43: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

43 MBSE (02341 f16), L04

Petri Net Semantics for XOR-Join

XOR-join its Petri net interpretation

Page 44: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

44 MBSE (02341 f16), L04

Petri Net Semantics for AND-Split

AND-split

its Petri net “interpretation”;

a transition

Page 45: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

45 MBSE (02341 f16), L04

Petri Net Semantics for

AND-Join

AND-join

its Petri net ”interpretation”;

a transition

Page 46: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

46 MBSE (02341 f16), L04

XOR-Split/Join

An XOR-splits allows us to model an activity with different outcomes as a single „transition“

An XOR-join allows us to model an activity with different preconditions as a single „transition“

XOR-joins and XOR-splits correspond to conditional routing.

Page 47: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

47 MBSE (02341 f16), L04

AND-Split/Join

AND-split and AND-join correspond to the usual

Petri net transitions;

They have been introduced for symmetry reasons

only.

AND-join and AND-splits correspond to parallel

routing.

Page 48: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler Example: OR-split/join

[from: http://www.yawlfoundation.org/pages/research/orjoin.html ]

48 MBSE (02341 f16), L04

OR-split OR-join

Adds token to

some output

places (at least

one)

Needs tokens on at least one

input place; removes one token

for each place that has a token;

but slides 51/52

Page 49: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler Example: OR-split/join

49 MBSE (02341 f16), L04

Page 50: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler Example: OR-split/join

50 MBSE (02341 f16), L04

Can fire

Page 51: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler Example: OR-split/join

51 MBSE (02341 f16), L04

Cannot fire! The

transition should

wait until the other

token has arrived!

When an input

place of an OR-join

transition is not

marked, the OR-

join should not fire,

if there still could

arrive a token from

somewhere!

Page 52: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler Example: OR-split/join

52 MBSE (02341 f16), L04

In complex examples, it is

“a bit tricky” to decide

whether a token could

arrive at some place! But,

a warning can be issued

when firing the transition,

that there is the potential

for a token to arrive from

somewhere!

Page 53: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler Reset-arcs

53 MBSE (02341 f16), L04

Reset arc For firing the transition,

we do not need any

token on this place; but,

when the transition

fires, ALL tokens on

that place are removed

(if there are any)!

Page 54: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler Reset-arcs: Semantics

54 MBSE (02341 f16), L04

Page 55: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler 5. Other notations

Except for some subtle differences, the concepts for

modelling the control aspects of business processes

are generally accepted. But there are many different

notations for business process and workflows:

BPMN (Business Process Modeling and Notation)

EPC (Event-driven Process Chains)

Activity diagrams

BPEL

...

55 MBSE (02341 f16), L04

Page 56: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Ekkart Kindler

56 MBSE (02341 f16), L04

Example: Activity diagrams

From: OMG Unified Modeling Language (OMG UML), Superstructure, V2.1.2,

November 2007, p. 331

Page 57: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Project Presentation

Page 58: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Tutorial 3: Q & A

Page 59: Model-based Software Engineering (02341) · „Workflows are long-lived transactions ... A Workflow Management System is an information ... In terms of OO, we identify the

Tutorial 4: Discussion Assignment 4