Workflow

advertisement

Workflow

Concepts and Techniques

Claude Godart & Hala Skaf-Molli

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

1

Contents

• Where to get more information ?

• Business Process

• Workflow Definition

• Workflow Conceptual Model

• Benefits of Workflow Technology

• Workflow and Related Technologies

• Conclusion

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

2

Where to get more information?

• http://www.aiim.org/wfmc/

W orkflow M anagement C oalition (WfMC):

– non-profit, International Organization of Workflow vendors, users and analysts..

– Define standards for the workflow system

– Reference model

– 180 Members: Microsoft, Oracle, Action Technology,

DCE consultants, IBM, SAP AG, NEC ….

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

3

Where to get more information?

• Tutorials:

– Workflow and Workflow management system, P. Peretti (Altan Group),

Globecom Rio de Janeiro 1999

– Workflow Management in the Internet Age, C. Mohan (IBM Almaden

Research Center), école d’été objets répartis, Grenoble 1999.

• Books

– Production Workflow: Concepts and techniques, by F. Leymann (IBM) and D. Roller (IBM), Prentice Hall.

– Workflow Technology in Computer supported Co-coperative Work, edited by Michel Beaudouin-Lafon

• On the Web

– www.w4.fr

– www.teamware.com

– ….;

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

4

Business Process

• Procedures within an organization…

• A sequence of activities performed by various persons, the visible result being various pieces of paper.

• Example:

– loan process in a bank

– claims processing in an insurance company...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

5

Workflow

• The automation of a business process, in whole or part, during which documents, information or tasks are passed from one participant to another for action, according to a set of procedural rules [WFMC].

– Ensure that the right work is done at the right time by the right people, in the right order.

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

6

Workflow

• We call the operational aspects of a business process-the sequence of tasks and who performs them, the information flow to support the tasks, and the tracking and reporting mechanisms that measure and control them-the workflow [Mohan99]

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

7

Processes and Workflow

Real World Computer

Process Model Workflow Model

Process

Workflow

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

8

Applications Example

Every time individuals co-operate to achieve a common goal according to a predefined procedure workflow management is the appropriate tool.

• Insurance policy/claims processing (AVECOM)

• Loan request handling

• System administration (e.g. BDA activities)

• Healthcare claims (Empire Blue Cross Blue Shield)

• Order management (Microsoft)

• Travel expense approvals..

• Technical documentation creation

• Quality management

• Concurrent Engineering

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

9

Ex: Loan Request Handling

• Activities

– Collect Credit Information

– Assess Risk (amount > 10 000 FF)

– Request Approval (amount > 10 000 FF or

High Risk)

– Accept Credit

– Reject Credit

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

10

Control flow of activities

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

11

Name

Address

Risk

Amount

Name

Address

Risk

Amount

Name

Address

Risk

Amount

Data flow

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

12

Workflow challenge

• The workflow initiative promotes independence between process logic and programs

• as the database initiative promoted independence between process data and programs

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

13

Workflow Process Logic

• Two major facets:

Flow of control : the execution sequence of activities…

• nodes are activitie s, arcs are control connectors

• transition condition is attached to a control connector...

Data Flow : determines which paths should be taken..

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

14

Typologie et caractéristiques des

Valeur ajoutée des processus

Workflow

Workflow Collaboratif

Documents complexes et composites :

- Document technique

- Document de recherche

Workflow de Production

Documents à compléter/instruire :

- Contrat

- Commande-Livraison

& facturation

- Publication

Workflow «Ad hoc»

Demandes spécifiques

- Gestion des cas particuliers

Workflow Administratif

Traitements administratifs :

Processus d’achat

- Agendas, notes de frais

- Gestion de personnel

Fréquence des processus

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

15

Caractéristiques requises par type de

Workflow 1/4

• Workflow de Production

– Débit important (temps de réponse faible et bonne capacité de monter en charge)

– Puissant formalisme de représentation des procédures (procédures définies de façon extensive)

– Puissant environnement de développement et des outils d’intégration avec les systèmes existants

– Mécanismes d’affectation complets

– Outil d’administration des opérations efficace (administration des utilisateurs, des droits d’accès, des instances de procédure, statistiques)

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

16

Caractéristiques requises par type de

Workflow 2/4

• Workflow Administratif

– Mêmes caractéristiques que celles du Workflow de production avec toutefois un niveau de complexité et de richesse inférieur

– Définition des procédures et activités sous forme graphique

(limitation au maximum de la programmation)

– Présentation graphique des portefeuilles d’activités

(«worklists») fournie (agent)

– Présentation graphique de l’historique des instances de procédures fournie (agent)

– Support et distribution Internet afin de limiter le coût de déploiement

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

17

Caractéristiques requises par type de

Workflow 3/4

• Workflow collaboratif

– Définition des procédures et activités sous forme graphique

(gestion de sous-procédures, réutilisation)

– Modifications dynamiques de procédures

– Présentation graphique des portefeuilles d’activités («worklists») fournie avec des fonctionnalités de délégation, acceptation/rejet/re-soumission (agent)

– Présentation graphique de l’historique des instances de procédures fournie (agent)

– Support et distribution Internet afin de limiter le coût de déploiement

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

18

Caractéristiques requises par type de

Workflow 4/4

• Workflow Ad hoc

– Produit très simple à utiliser (formation des utilisateurs en une demie-journée)

– Aucune programmation , toutes les définitions doivent se faire de façon graphique et sous forme de règles

– Limitation des fonctionnalités disponibles à l’essentiel afin de faciliter l’utilisation du produit

– Support et distribution Internet afin de limiter le coût de déploiement

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

19

Positionnement des principales

Valeur ajoutée des processus

solutions

• TeamWare flow

(TeamWare)

• In Concert

(Xerox)

• W4

(World Wide

Web Workflow)

• Visual Worlflo

( FileNet)

• FlowMark

( IBM)

• StaffWare

(StaffWare)

• EastmanSoftware Workflow

(EastmanSoftware )

• Ensemble

(FileNet)

• In Concert

(Xerox)

• TeamWare flow

(TeamWare)

• StaffWare

(StaffWare)

• Lotus Notes

(IBM)

TeamWare flow

(TeamWare)

• W4

(World Wide

Web Workflow)

• In Concert

(Xerox)

Source : Cap Gemini

Fréquence des processus

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

20

Dimensions of Workflow

Process Logic

IT Infrastructure organization

Three Dimensional workflow space W

3

(what, who, which)

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

21

Workflow Management System

• A system that completely defines , manages and executes

« workflow » through the execution of software whose order of execution is driven by a computer representation of the workflow logic

[WFMC].

• Common characteristics:

– basis for developing integration

– interoperability

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

22

WF system characteristics

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

23

Running Activities

Worklist

Workitem

..

1

Activity

1: user click (manual activity)

2: WfS: builds input container

3: Wfs call program

4: access database

5: put new value in output container

Input Container

2

3

4

5

Program

Output Container

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

24

Modèle de référence WFMC

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

25

Workflow system’s components

Build-time functions : flow modeling component

– administrators and analysts to define processes

(procedure) and activities

– analyze and simulate them

– assign to participant specifications

– view work process statistics

– make change to process

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

26

Workflow system’s components

Run-time process control functions : workflow execution (enactment) in an operational environment

– workflow engine

• process creation and deletion

• activity scheduling

• interactions with application tools and human resources

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

27

Workflow system’s components

Run-time activity interactions with humans users and IT application tools functions :

– transfer control between activities

– tool invocation and data passing

– workflow interperability

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

28

Execution d’un WF

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

29

Workflow Concepts

A lot of words around workflow

Activity

Operation

Task

Step

Work

Job

Process

Flow of control

Transition

Route

Path

Role

Actor

Position

User

Group

Resource

Staff

Organizational unit

What is done Relationships among things done

Who does

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

30

WfMC process definition meta-model

Process definition consists_of

Sub-process

*

*

Process relevant data may use

* may use

* implemented as

Process activity

* *

* executed_by

Participant specification

*

*

Application declaration

* may reference

Participant specification from to

*

Atomic activity

Transition

Information

Loop

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

31

Process

• Workflow process (or procedure) is the automated parts of a business process

• A coordinated set of activity(s) that are connected in order to achieve a common goal.

• Example:

– « order processing procedure » Engineering

– « claims administration process » : Insurance

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

32

Activity

• The body of a work step of a process.

– Compound activity: another process.

– Elementary activity: a basic set of work; sequential set of primitive actions executed by a signal participant.

• 3 modes: automatic, manual, mixed..

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

33

Activity Example

• Process: «order equipment» has 3 work steps:

1. Order entry

2. Credit check

3. Billing

4. Shipping

1. automatic; 2. manual; 3. automatic; 4. mixed

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

34

Activity Example

2. Credit check

2.1. log request

2.2 gather data

2.3 evaluate

2.4. fill out report form

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

35

Process instance state-transition

terminate

Suspended abort

Terminated

Iterate through all active activities

Initiate Initiated start suspend resume

Running restart

Active

Completed

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

36

Activity instance state-transition

terminate

Suspended abort

Terminated

Iterate through all active activities

Initiate Initiated start suspend resume

Running restart

Active

Completed

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

37

Transition information

AND Join parallel activities converges into single activity with synchronization..

OR join parallel activities converges into single activity without synchronization..

AND Split single activity splits into two or more parallel activities ..

Or Split single activity makes a decision upon which branch to take when encountered with multiple branches

• start, end...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

38

Transition information

Fork activity

Join activity

B1

B1

A B1

B2 C

A C

B2

A

B3

B2

B3

B3

Parallel Processing

Conditional Branching

Parallel Branching with final selection

C

AND-split

AND-join OR-split

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

OR-join

39

Example: Make some coffee

Start

Start

A. Fill the kettle (Remplir la bouilloire)

B. Place coffee in cups

C. Heat the water

D. Pour hot water on coffee

A

B

C

C

A

D

D

Finish

A, B, C, D are activities Finish Plans

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

B

40

Work case (Job)

• An instance of the process

• Has its own data

• Example:

– 2 loans request from Micheal, Jean

=> 2 work cases

– Micheal Loan request

– Jean Loan request..

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

41

Role

• Basis for access control and execution control.

• The execution of activities is associated with roles rather than end-user => flexibility; handle exception..

• Ex: “order entry activity” is executed by the order administrator (not by Micheal :-)

• Role: associated with an actor; a group of actors..

• Ex: order administrators; «send to all »

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

42

Participant

• A person, program, group or entity that can fulfill roles to execute, to be responsible for…

• Human participant is an actor...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

43

Job

0,n

Precedence

State previ ous

0,n next 0,n

Process

1,n

Impl i cati on

0,n

Responsibl e

0,n

1,n

Activity

0,n

Use

0,n

Data

0,n

Participant

0,n

Play

1,1

0,n

Rol e

0,n

Executi on

Workflow Conceptual Architecture

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

44

More About Activities

Join Condition

Activation Condition/Mode

TASK

Query on Organization BD

Proper Implantation

Fine

Structure of

Activities

Exit Condition

Workitems

UserId

Implementation

Worklist(UserID)

Workitem1 workitem2

...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

45

Activity state transition diagram

Finished

InError

Executed

Inactive Ready Executing

CheckOut

Skipped Expired

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

Terminated

46

Different Types of Activities

• Information Activity:

– do some action (call a customer)

• Program Activity

– separation between conceptual and implementation

– different implementation according to OS(Windows NT,

AIX,..)

• Process activity:

– activity is implemented by a subprocess..

• Bundle Activity:

– executed multiple times (Compilation activity)..

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

47

Subprocess

• Local subprocess

• Remote subprocess (same or different vendor WF)

• Subprocess behaves w.r.t its parent:

– Autonomy model: his own life, not affected when parent terminate….

– Connected discrete Model

– hierarchical Model

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

48

Autonomy model

• Has his own life

• Autonomy rules define relation with parent

• if completely autonomous then parent termination does not affect the subprocess

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

49

Connected Discrete Model

• Two processes A, B..

• An activity of A causes the creation of an instance of B

• A and B are independent ...

• Chained services model

A1

A2

A3

Process A

A5

A4

B1

B2

B3

B4

Process B

B5

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

50

Hierarchical Model

• Two processes A, B..

• An activity of A causes creation of an instance of B

• A waits B

Nested Model

A1

A2

A3

Process A

A5

A4

B1

B2

B3

B4

Process B

B5

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

51

Why Workflow Technology

• To streamline, coordinate and monitor an organizational process involving human and automated tasks spread across multiple enterprises with heterogeneous (existing and new) computing environment.

• Some products focus on one aspects of workflow technology, primarily to reduce paper work or coordinate activities among humans:

– document management, e-mail routing, etc...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

52

Benefits of Workflow Technology

• For customers:

– Gain improved insight into the processing of their work cases.

– Response time,

– Quality of services and accuracy of status are enhanced.

• At enterprise level

– Organize, schedule, control and monitor process

– Improve productivity

– Reduce paper work…

– reinforces security and confidentiality ..

– The image of the enterprise is improved

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

53

Benefits of Workflow Technology

• For the enterprise staff

– Employee has more accurate view of his tasks

– External pressures for increased efficiency

– No need to spend time and effort to control the organization of work cases...

– Internal pressure for increased effectiveness

Desire by workers for more reward and less stress !!

• For the line management (supervisors)

– just in time information to make decision to improve tasks

!!

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

54

Benefits of Workflow Technology

• For the top management

– formally describe the processes of an enterprise

– improve process

– Workflow also helps to quickly educate new or temporary actors.

• In general:

– Support on-line data entry, Support data exchange and transactions across independent enterprises (EDI)

– In most general form, workflow technology can be used to support programming-in-the-large..

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

55

Be Careful !

• Workflow must be flexible…

• Must not kill creativity of people..

• Must be accepted by people..

• No successful story of Wf from 1970 to 1980 because of people rejection (don’t take in consideration social and organization setting) …

• Workflow are people systems

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

56

Example Systems

• IBM FlowMark

• Action Workflow

• Polymer

• TeamWare Flow

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

57

TeamWare Flow

• Client/Server

• TeamWARE Flow:

– server software,

– a database,

– a document management system, client tool applications

– and an Application Programming Interface

(RCAPI).

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

58

Architecture

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

59

TeamWare

• Server side:

– data base (SQL server, Oracle or Sybase)

• data + process states and history..

– DMS : document attached to a process

– BUS: TCP/IP..

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

60

Workflow and Related

Technologies

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

61

Workflow and Related Technologies

Mobile

Computing

System

Management

Multi databases

Business

Engineering

Workflow

Technology

Transaction

Management

Operating

Systems

Object

Technology

Internet

Application

Development

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

62

Research Discipline Contributing to

Workflow Management

Software

Engineering

Reengineering methodology

Quantitative and

Formal Methods

Software

Process

Distributed

Computing

WfMS

CSCW

SGBD

Organizational

Science

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

63

Workflow and Objects

• What is the relationship between objects technology and workflow technology ?

– Objects to implement activities…

– workflow as objects

• Component-based Software Construction

• OMG OO framework to manipulate workflow..

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

64

Component-based Software Construction

• Use prefabricated software artifacts in building new applications functions…

• Artifact: “Business Object”

• Scripting: build new application function out of business objects

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

65

Business Objects

• Objects that are related to the business of the enterprise: customer, credits

• As software objects:

– things from reality..

– self-contained entities: what can be done with…

– reusable: account object, payment, funds transfers,…

• object used for scripting applications functions components

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

66

Components technical proprieties

• Language independent …

• Interoperate with as many different tools as possible: capability to query metadata about itself..

• Interoperate across operating systems and networks..

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

67

Scripting

• Plug components together..

Script specifies in a simple way how component must behave: properties and methods…

• Scripting language: simple, no declaration...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

68

Example: The Loan Request

Implemented with Objects

Amount

Credit cr.Amount()>10000 check

Customer cr.Amount()<=10000 confirm

Response

Letter

Cus.check= “OK” reject

Response

Letter

The business objects methods are used to specify the proper

Claude Godart & Hala Skaf-Molli, sequencing...

ESSTIN & UFR STMIA, UHP, Nancy 1

69

Utiliser visual builder:

Example: Alarm Bean et JugglerBean...

Java beans

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

70

Scripting language vs process model

• Script must be specified as process model, if one on the following is true:

– forward recoverable: problem during execution, resuming execution where it left...

• persistent state

– components run in parallel, distributed, in heterogeneous environment

• synchronization

– different programming language for the components

– backward recovery..

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

71

Scripting language vs process model

• Component in script are not launched automatically but on explicit request from external parties..

• Data flow facilities: input parameters of a component are constructed from the output of several preceding components...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

72

Workflow and Objects

• OMG propose workflow management facility..

• Add runtime functionality of a workflow management system to an ORB (Object Request

Broker)..

• OMG standard defines a collection of interfaces in

IDL (process manager interface, activity interface,…)

• No implementation...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

73

Workflow and transactions

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

74

Why Transactional Workflow ?

Parts of Travel reservation of “traveluck”, Inc

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

75

Why Transactional Workflow ?

Data Sharing Semantics

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

76

Why Transactional Workflow ?

Failure Semantics

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

77

Transactional Requirements

• Need to specify data sharing semantics

• Need to specify failure semantics:

– which parts of workflow behave as a whole (atomically)

• Reliable workflow process requires transaction mechanism !

• Put the transactional properties:

– at activity level: secure customer payment..

– at several activity level :consistency of the whole system..

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

78

Standard Transactions

• A transaction is a set of actions..

• ACID Properties

– Atomic (all or nothing)

– Consistent (by the programmer)

– isolation (no visibility of intermediate results)

– Durable

• Correction Criterion: Serialisability

– concurrent execution of transaction is correct if equivalent to serial execution (same read set and final results..)

• Correction protocol : 2PL (2 Phases Locking)

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

79

Standard Transactions

• Distributed transaction (Global transaction): more than resource manager

– hotel reservation, flight reservation..

– Atomic commitment:

• 2PC protocol...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

80

Advanced transaction models

• A lot of models

(database transaction Models, Ahmed K.

Elmagarmid92)

– Nested transaction[Moss 82]..

– Saga [Garcia-Molina and Salem 87]

– ConTracts [Reuter 89]

– Multi-bases transactions

– S-transactions

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

81

Nested Transaction

• Decompose a “large” transaction into a collection of transactions ..

t1 t21 t12 t22 t23 t22 t24

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

82

Nested transactions

• Each transaction can commit or abort

• The root transaction can commit or abort

• The commit of a transaction will only become effective if its predecessor transaction commits

• if a transaction aborts, all transctions of its subtree are aborted too.

• Modifications on resources of a transaction become visible to its immediate predecessor transction (« parent ») iff the transaction commits ...

• Modifications on resources of a transaction are only visible to the transaction itself and its successor transactions

(« children ») ...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

83

Open Nested Transaction

• Objective: increase the throughput …

• idea : giving up the isolation properties

– the effects of a committed transaction are visible to all transaction and not only to its parents…

• Problem: t12 abort, t21 has committed

– undo only t21 not possible and not sufficient, why ?

• Solution: compensation functions

• Example:

– credit and debit, reserve and cancel…

– complex compensation: compensating deposit transaction after days !!!!!

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

84

Saga

• Add the capability to automatically determine and start compensation functions to the environment..

• A saga is defined as a sequence

[(T1,C1),…(Tn,Cn)] that having the following properties:

– T1,…Tn and C1,..Cn, Ci compensation function of Ti

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

85

Saga

• [(T1,C1),…(Tn,Cn)] is executed as one of the following sequences:

– a. [T1,…Tn] if all Ti committed

– b. [T1…, Ti,Ci-1,….C1] if Ti aborts and

T1, …Ti-1 committed before

– used in (IBM FlowMark Workflow)...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

86

ConTracts

• A consistent and fault tolerant execution of an arbitrary sequence of predefined actions

(called steps) according to an explicitly specified control flow description (script)

• A step an unit of work, is ACID transaction..

• Atomic works are implemented ...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

87

Forward Recovery

• For each step there is an compensating step

• This is not a rollback of the step…

– the context of ConTract variables, windows, files, data) execution is persistent

• There is a correction criterion for compensation...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

88

Begin of

Contract

S1

S2

S2 S3

S8

Cancel reservation failure

S6

S7

S4 failure

S5

End of

ConTract

S1

Travel data input

S2

Check

Flight reservation

Hotel reservation

Car rental

2 Hotel and car companies flight schedules

Print documents

3 airlines

Trip reservation

are consulted

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

89

ConTracts

• Minimal loss of work in case of failures

• Forward recovery after a failure

• Fault-tolerant run-time system

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

90

(Distributed) Transaction Processing

(DTP) Vs. Advanced WfMs

• DTP/D-OLTP is focused on efficient execution of relatively simple tasks with no coordination across heterogeneous tasks …

• Advanced Workflow requires coordinated execution of heterogeneous tasks, with varied level of transactional properties, on a variety of systems..

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

91

(Distributed) Transaction Processing

(DTP) Vs. Advanced WfMs

Task

Task groups in DTP task2 task1 task4 task3

Workflow group in advanced WF

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

92

Conclusion

• Transactions are important for reliable workflow semantics

• standard ACID transaction model too restricted for workflow

• Advanced transaction models can be a good solution...

Claude Godart & Hala Skaf-Molli,

ESSTIN & UFR STMIA, UHP, Nancy 1

93

Download