27
Composing Business Process with ID-Net Ang Chen and Didier Buchs System Modeling and Verification Group PNSE’07 Workshop, Juin 25-26, Siedlce, Poland

Composing Business Process with ID-Net

  • Upload
    angchen

  • View
    1.752

  • Download
    1

Embed Size (px)

DESCRIPTION

PNSE’07 Workshop, Juin 25-26, Siedlce, Poland.

Citation preview

Page 1: Composing Business Process with ID-Net

Composing Business Process with ID-Net

Ang Chen and Didier Buchs

System Modeling and Verification Group

PNSE’07 Workshop, Juin 25-26, Siedlce, Poland

Page 2: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

Outline

• Business Process (BP) Modeling

• ID-Net: Motivations

• ID-Net: Semantics

• Model Composition with ID-Net

• Example

2

Page 3: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

BP Modeling: Elements

Process

Activity

receiveorder

collectpayment

shippingschedule

productionschedule

sendinvoice

Participant

Flow

Each color represents an organization

3

Page 4: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

BP Modeling: Control-Flow

4

A PossibleControl-Flow receive

order

schedule

shippingschedule

productionschedule

collectpayment

order

payment

invoice

sendinvoice

createinvoice

Receive order and collect payment can be parallel or sequential, depending on the interpretation of the informal model. parallel might be more flexible in this case

receive oder

collectpayment

shippingschedule

productionschedule

sendinvoice

Informal description

Page 5: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

BP Modeling: Data Model

receive oder

collectpayment

shippingschedule

productionschedule

sendinvoice

Data Model

Item Order Shipping10..* 1 0..1

Payment

1

Production

10..1

0..*

5

Page 6: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

BP Modeling: Dimensions

Executable Workflow?

Data Model

Item Order Shipping10..* 1 0..1

Payment

1

Production

10..1

0..*

Control-Flow Model

receiveorder

schedule

shippingschedule

productionschedule

collectpayment

order

payment

invoice

sendinvoice

createinvoice

??

6

Page 7: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

BP Modeling: Approaches

• (Explicit) State-Based Model: Petri Net and its variances, e.g. Workflow Nets, CPN

• Service-Oriented: service composition, e.g. BPEL

• Metamodel-Based with

• Implicit state

• Explicit state (combined with State-Based semantics)

7

Page 8: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

The CPN Solutionschedule

shippingschedule

productionschedule

order

payment

a

b

c

d

(c, d)=schedule(a,b)

The relations between a,b,c,d should be defined in the PN

The transition schedule uses a and b to produce c and d

SE: strong coupling between PN structure and data!

Forced to use the built-in data modeling mechanism (CPN ML)

8

Page 9: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

BP Modeling and Development

From SE’s point of view:

• The data modeling power is enough (e.g. with tuples), but impractical in real BP development

• Structure and data of BP are too constrained each other

• Built-in, inflexible operational semantics

• CPN is designed to analyze and verify models, not for BP development

• Same problem for other PN variances

9

Page 10: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

ID-Net: Hook Points

Semantics is operationally

different with CPN

T.around : Customized semantics for T

Hook points (as in AOP)

Tshippingschedule

productionschedule

order

payment

a

b

c

d

T.before : Select tokens from pre-set places (access the contents of places)

T.before

T.with : Working with selected resources (access selected tokens)

T.with

T.after : Working with produced resources (access post-places)

T.after :

10

Page 11: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

ID-Net: IDs

Order

Payment

shipping schedule

productionschedule

P1:P3:

P2: P4:

T order

payment

shipping schedule

production schedule

Places are typed by the kind of ID

11

Page 12: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

ID-Net: IDs (cont.)

Tokens are IDs referring to (concrete or not) resources

Order

Payment

shipping schedule

productionschedule

P1:P3:

P2: P4:

T order

payment

shipping schedule

production schedule

12

Page 13: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

IDtifier

• ID is independent of modeling formalism

• Presented in many kinds of applications, e.g. security (keys), Web (e.g. URLs, cookies)

• For BP Modeling, ID is the key to:

• symbolically represent the resource (modeling phase)

• identify a concrete resource (implementation phase)

• support data model (e.g. candidate key)

13

Page 14: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

ID-Net

1. Tokens are typed IDs to identify the resources

2. Places are typed “IDs Holder”

3. The ID-Net model controls the visibility of resources using the classical Petri Net semantics

4. Semantics of transitions can be extended by composing other models with ID-Net model

5. External models produce and use the IDs to do specific work

14

Page 15: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

ID-Net + Data Model: Type Mapping

receiveorder

schedule

shippingschedule

productionschedule

collectpayment

order

payment

invoice

sendinvoice

createinvoice

Item Order Shipping10..* 1 0..1

Payment

1

Production

10..1

0..*

15

Page 16: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

Data Manipulation Operations (DMOs)

• DMO’s are derived from the metamodel (implied by the data semantics of metamodel)

• In term of DB: CRUD (Create, Read, Update, Delete) operations

OrderID order_id= Order.Create();setRelation(order_id, item_id, “has”)setAttribute(order_id, aDate, ”date”,);

Relationship Creation

Pseudo code:

ItemID item_id= Item.Create(name, price);Entity Creation

DMOs

Entity Removal Item.Delete(item_id);

Relationship Removal RemoveRelation(order_id, item_id, “has”);

16

Page 17: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

DMOs: Motivation

• Real-world BPs are constructed on and supported by DB systems

• Activities of BPs are composed of data manipulation(in memory)and data persistence(with DBMS)

• Data manipulation are relied principally the domain data model

• DMOs are services provided by DBMS

• ID is the key to access the data

17

Page 18: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

Model Composition

• Specify the composition: synchronize the PN transition with the DMOs (similar to service composition)

• Using the temporal operators of AOP to compose DMOs with the control-flow: before, after, around

• Using synchronization operator // (with) to create atomic actions (from CO-OPN)

18

Page 19: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

Example: ID -> Data Instances

payment

order shippingschedule

productionschedule

P1: P3:

P2: P4:

T payment

order

shipping

production

Order Shipping1 0..1

Payment

1

0..* Production

10..1

IDs refer to instances of data

19

Page 20: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

Example:Synchronized function

payment

order

shipping

production

P1:P3:

P2: P4:

T payment

order

shipping

production

P1.take( ); P2.take( );

payment=getPaymentFromID( );order=getOrdersFromID( );

if (payment.clientID != order.clientID) { P1.release( ); P2.release( ); throws NotFirableException()}

reserve tokens

check firability

access resources

synchronized function: M with T

M with T uses selected tokens as inputs

Executable, composed model

20

Page 21: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

Example:Synchronized function

payment

order

shipping

production

P1:P3:

P2: P4:

T payment

order

shipping

production

synchronized function: M with T

M uses the IDs to do anything it wants, and produces post-tokens

Executable, composed model ...date = estimateDeliveryDate(order);

=Shipping.Create(date, dest); =Production.Create(date, orderSet);

P1.remove( ); P2.remove( );

P3.put( ); P4.put( );

external stuff

produce post-conditions

DMOs

21

Page 22: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

Composed Semanticspayment

order

shipping

production

P1:P3:

P2: P4:

T payment

order

shipping

production

synchronized function: M with T

Executable, composed model

P1.take( ); P2.take( );payment=getPaymentFromID( );order=getOrdersFromID( );if (payment.clientID != order.clientID) throws NotFirableException(){P1.release( ); P2.release( ); }...date = estimateDeliveryDate(order); =Shipping.Create(date, dest); =Production.Create(date, orderSet);P1.remove( ); P2.remove( );P3.put( ); P4.put( );

reserve tokens

check firability

external stuff

produce post-conditions22

Page 23: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

ID-Net in BP Development

V1 V1

V2

Model-BasedIterative

DevelopmentProcess

V2

V3 V3

ID-NetModel

DataModel

ModelComposition

Executable Workflow

ModelReconciliation

23

Page 24: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

Framework

Executable Workflow

Data Model

Item Order Shipping10..* 1 0..1

Payment

1

Production

1

0..1

0..*

Control-Flow Model

receiveorder

schedule

shippingschedule

productionschedule

collectpayment

order

payment

invoice

sendinvoice

createinvoice

ModelCompositionComposition

specification

24

Page 25: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

Conclusion

• ID-Net has flexible and extensible semantics:

• it handles the tokens as the classical PN

• the external models will produce and interpret the values tokens

• the composition specifies the interplay between ID-Net and other models

• BPs can be developed in an iterative and flexible way with the framework using ID-Net

25

Page 26: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

Research Perspectives

• Relations between the functional dependency of data and dependency of activities in workflow

• How the composed external model interprets the properties of an ID-Net

• Hiding information during the design of BP service (issues in cross-organizational BPs)

26

Page 27: Composing Business Process with ID-Net

A.Chen PNSE 2007 Workshop, Siedlce, Poland

ID-Net SemanticsPreliminary operational

semantics

A Place is a multi-set which supports the following operations: •take(token): reserve token •release(token): release token (inverse of take)•put(token): put token into the place•remove(token): remove token from the place

P1 P2T

Firing a transition consists of:1. select tokens in pre-set places2. reserve pre-condition tokens temporally 3. evaluate T (if failed, release reserved tokens)4. remove reserved tokens5. put post-conditions into post-set places

before: [0..1]

with: [2..4]

after: >5

around: [0..6]

The steps can be hooked

T will be evaluated successfully if each pre-set place provides at least one token

27