217
WebML Designing data-, service- and process-intensive applications with WebML EMN, Nantes, May 12, 2010 Marco Brambilla Politecnico di Milano and Web Models Srl http://home.dei.polimi.it/mbrambil http://twitter.com/MarcoBrambi http://www.slideshare.net/mbramb il

WebML and WebRatio - Business process modeling (BPM) and web application modeling

Embed Size (px)

DESCRIPTION

Seminar on WebML and WebRatio BPM at Ecole des Mines de Nantes, 2010. Business process modeling and automatic web application generation with a commercial and free toolsuite that exploits SOA, Java, and web service orchestration. For more details see: http://www.webml.org http://dbgroup.como.polimi.it/mbrambil Find an audio-video tutorial on webml here: http://dbgroup.como.polimi.it/brambilla/webml See a demonstration video here: http://www.youtube.com/watch?v=jRS1LTazxFk

Citation preview

Page 1: WebML and WebRatio - Business process modeling (BPM) and web application modeling

WebML

Designing data-, service- and process-intensive

applications with WebML

EMN, Nantes, May 12, 2010

Marco Brambilla

Politecnico di Milano and Web Models Srl

http://home.dei.polimi.it/mbrambil http://twitter.com/MarcoBrambi

http://www.slideshare.net/mbrambil

Page 2: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Agenda

WebML models and concepts WebML development process Advanced topics: Web services, BPM, Ajax WebRatio 6 BPM Industrial cases

Page 3: WebML and WebRatio - Business process modeling (BPM) and web application modeling

WebML

WebML models and concepts

Marco Brambilla

Politecnico di Milano and Web Models Srl

Page 4: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Perceived Needs 1:

lack of model-driven development

Data-intensive Web site design today is founded on methodologies stolen from different sectors (DB, software eng., …)

Lack of model-driven support of data-intensive Web Sites• Navigation equal to database structure• Lot of hand-written code

Big efforts are requested even for prototyping

Page 5: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Perceived Needs 2:

increase of sites complexity

Some factors increase complexity of modern Web sites:• Multi-device output (PC, PDA, WAP phones, 3rd gen phones, Digital TV,

videotext)• One-to-one delivery (myYahoo, myCDNOW,…)

These requirements impact on cost of:• site development • site evolution

Page 6: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Perceived Needs 3:

shortage of IT & art personnel

Need to rise the level of abstraction Available skills can address analysis and high-level design

instead of huge time-wasting manual coding of ASP pages

IT technicians can focus on optimization and performance analysis

Art people can focus on “creation”

Page 7: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Advantages of Modeling approachA rigorous modeling approach: Can reduce development efforts (cost and time) Allows a more structured development process Produces more usable and coherent final results Design models are self-documenting and always up-to-date

projectsImmediate prototyping can be achieved

Page 8: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Requirements for Web modeling Expressiveness

• Real-life cases should be expressible• Frequently used design patterns should be captured

Ease of use• Intuitive notation• Clear semantics• Consistency checks

Implementability• Efficient mapping to physical data structures• Flexible code generation from behavioral specifications

Page 9: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

WebML purpose WebML aims at providing a structured approach to the design

of Data-intensive Web sites A set of integrated Models should help designers in high-

quality Web sites production All the facets of Web design should be addressed Use of old or uncoherent methodologies becomes deprecated

Page 10: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Target of WebML Target: data intensive Web sites

• large amount of data• interfaces directed to general public

exploratory browsing-oriented personalized (1 to 1)

• volatile content, structure, navigation, presentation WebML is not the right approach for:

• Small Web sites (Homepages, …)• Static Web sites

Page 11: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

The WebML models WebML: a conceptual language for high-level design of data-

intensive web sites Models:

• Content: data organization• Derivation: redundant data definition• Composition: definition of site pages as set of subpages and

elementary publishing units • Navigation: definition of links between pages and between units• Presentation: positioning of the units in the page and definition of

graphical appearance

Page 12: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Preview of WebML concepts Site = Content + Composition + Navigation + Presentation

contentnavigation +composition

presentationuser models

entities,relationships

units, pages,links

site views styles

Page 13: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Structure Model (1) Q: what are the objects published in the site and how they

are related?

A: • Entity: an object type in the application domain• Attribute: scalar property of an entity• Relationship: A connection between entities• IS-A hierarchy: classification and grouping

Compatible with Entity-Relationship and UML class diagrams

Page 14: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Structure Model (2) Simplified Entity-Relationship model

• Binary relationships between entities• IS-A hierarchies• Simple typed

attributes in entities• Derivation model

can be applied forredundant data

Book

Author Genre

BestSeller

Page 15: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Relationship cardinality Relationship Book_Review

– book2review minCard: 0 maxCard: N– review2book minCard: 1 maxCard: 1

ReviewBook 0..N

1..1

It reads: a book may have zero or more reviews, a review deals with one and only one book

Page 16: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Cardinality: comment Cardinality constraints of relationships are important,

because• They make the structure schema more readable and expressive• They can influence the design of the phisical structure of the content

repository (e.g., the schema of the online database of the site)

Page 17: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Multi-valued attribute A multi-value attribute is an attribute for which an object may

have a set of values (e.g., a person may have set of addresses) Multi-valued attributes are represented by means of an entity

plus a relationship Example: a person has a set of addresses

AddressValue:string

Person 1..N

1..1

NOTE: the “address” entity is a “weak” entity, it cannot exist independently of the associated “person” object

Page 18: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Structured attributes A structured attribute is an attribute with an internal structure (e.g., an

address may consist of several fields, like civic number, street, city, province, state, etc..)

Structured attributes are represented by means of an entity plus a relationship

Example: a person has one or more addresses, each address consisting of number, street, city, province, state

Address

NumberStreetCityProvinceState

Person 1..N

1..1

NOTE: the “address” entity is a “weak” entity, it cannot exist independently of the associated “person” object

MODEL

Page 19: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Relationship with attributes A relationship with attributes is a description of a property

that refers to a pairs (more generallly to sets) of objects (e.g., the grade taken by a student in a course)

Relationship with attributes are represented by an entity and two (more generally, several) relationships

GradeValue:integer

Student 0..N

1..1

Course1..1

0..N

NOTE: the “grade” entity is a “weak” entity, it cannot exist independently of the associate objects

MODEL

Page 20: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

N-ary Relationship A N-ary relationship is a relationship involving more than two

entities (N>2) N-ary relationships are represented by an entity plus N binary

relationships Example: a supplier supplies a part to a department

Supplier 0..N

1..1

Department1..1

0..N

Part

1..10..N

Supply

MODEL

Page 21: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Structure patterns Structure pattern: typical structure design solution, found

very frequently in real Web sites

Patterns can be combined and used together to achieve complete information access

TECHNIQUES

Page 22: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Structure Patterns Network skeleton:

Star skeleton:

Entity2Entity1

Entity3

Entity2

Entity1

Entity3

Entity2Entity5

Entity4 Entity3

Entity1

• Hierarchy skeleton:

Page 23: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1. Hierarchy Pattern

A categorization hierarchy User can browse the hierarchy from top to bottom (and back) Often used in e-commerce applications

Entity2

Entity1

Entity3

SubCat

Category

ProductE

-cat

alog

Page 24: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

2. Star Pattern

A main object can be recognized A set of informative elements are related to the object User can jump from main object to information pages and

back

Entity2Entity5

Entity4 Entity3

Entity1

StyleWarranty

BigImg TechData

Item

Acm

e ca

se

Page 25: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

3. Network Pattern

A set of elements to be published All at the same level of importance Every object has detailed description User can browse from an object to the related ones

Entity2Entity1

Entity3

TechSolution

ProductTe

ch-s

uppo

rt

site

Page 26: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Pattern combination Real web sites are much more complex Many problems

can be solvedusing patternscombinedtogether

TechSolution

SubCat

Category

Product

Brand

Country

SolCat TechCat

Object3Object2

SubCatA1

CatA1

Object1

SubCatB1

CatB1

Category2 Category3

Network pattern

Hierarchy pattern1

Hierarchy pattern2

Hierarchy pattern

Hierarchy pattern

Page 27: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Derivation Objectives Derivation is a modelling phase that makes it possible:

• To augment the content of an entity by adding attributes, either imported or calculated from related objects.

• To define the population of entities or of relationships, based on some property of the involved objects.

Page 28: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

WebML OCL Derivation consist of writing expressions called “derivation

queries” Queries can be expressed using WebML OCL Derivable concepts:

• Entities, relationships, attributes Derivation queries can be automatically transformed into SQl

views installed in the database

Page 29: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Derived entities Sub-Entities population in ISA hierarchies can be specified by

means of OQL queries “A free slot is a slot having 0 reservations” WebML OQL: “SuperEntity where count(reservation)=0”

freeSlot

slotISA

Page 30: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Derived attributes Attributes of an entity can be derived by associating to them a

query. Four types of derived attributes:

• Constant attribute: affiliation: “Politecnico di Milano”• Imported attributes: maritalName: Self.husband.lastname• Aggregate attributes: reservation#: count(Self.reservation)• Calculated attributes: lastPrice: Self.price*discount

The Self keyword identifies the current entity in which the attribute is defined

Page 31: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Imported attribute Import a piece of external information into an entity

femalemalehusband

lastname maritalName

Page 32: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Calculated attributes Total price of order as sum of price of order lines

Derivation rules:OL.TotalPrice = Self.Price * Self.QuantityOrder.TotalPrice = Sum (Self.Order2OL.TotalPrice)Order.NumLines = Count (Self.Order2OL)

OrderOLOL2Order

price, qty

Page 33: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Derived relationships Relationships can be derived by a WebOQL query in two

ways: • by subsetting and/or concatenating existing relationships• by matching pairs of objects by means of a condition

Variable Self denotes the instance of the source entity of the relationship

Page 34: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Derived relationships: subsetting Subsetting existing relationships:

AlbumArtist

Artist2Album

Artist2RecentAlbum

Page 35: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Derived relationships: concatenation Concatenating existing relationship:

ArtistAlbum

CompilationArtistSongAlbum

Song SongArtist

Page 36: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Derived relationships: matching pairs User2Favorites relates User to all the Articles whose category

appears in the set of the preferred categories in the user profile.

User2Favorites

Category

User2Preference

ArticleUser

User2Article

Page 37: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Hypertext Model

• Q1: what information is published in the hypertext nodes? • Q2: how are the hypertext nodes connected?• Q3: how is the hypertext divided into pages served to the user?

• A1: content units (Composition)• A2: links (Navigation)• A3: pages (Composition)

Page 38: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Composition: examples of Content UnitsDATAUNIT

INDEXUNIT

content

content

To publish information about A SINGLE object(e.g. AuthorDetail)

To publish a list of objects (e.g. IndexOfAuthors)

Page 39: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Composition: examples of Unit rendering

DATAUNIT

INDEXUNIT

Author first name:XXX last name:YYY photo:

Index of Authors

• S. Ceri• P. Fraternali• O.Versand

Author

Author

Page 40: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

• Q1: what is the experience of the site that the user can achieve?

• Q2: how is the hypertext divided into pages served to users?• Q3: what information is published in the hypertext nodes? • Q4: how are the hypertext nodes connected?

• A1: siteviews • A2: pages • A3: content units • A4: links

Hypertext Model: questions

Page 41: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

DATAUNIT INDEXUNIT MULTIDATAUNIT

ENTRYUNIT SCROLLERUNIT

entity[Selector]

Content:• instances of

an entity

Basic Content Units

entity[Selector]

entity[Selector]

entity[Selector]

MULTICHOICE

entity[Selector]

Selector:• set of

conditions

HIERARCHICAL

entity[Selector]

Page 42: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

DATAUNIT INDEXUNIT MULTIDATAUNIT

ENTRYUNIT SCROLLERUNIT

Meaning of Content Units

Author first name:XXX last name:YYY photo:

Index of Authors

• S. Ceri• P. Fraternali• O.Versand

All Authors

Browse Authors

5/12: go to

1/12

Insert Your Data

• Fname• Lname

MULTICHOICE

Choose Authors

Ceri Fraternali Versand

HIERARCHICAL

Books&Authors

1. Web Applicat. Ceri Fraternali2. Systems Tannenbaum

Page 43: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Content Units A WebML unit is the atomic information publishing element

It is a “view” defined upon a container of objects:• All the instances of an entity• Instances of an Entity that meet a selection condition called selector

unitX

container

Page 44: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Unit input and output

A unit may need some “context” to be computed Each unit exposes input and output parameters Input is required to compute the unit itself

• Parameters pre-defined for the unit +• Other parameters required by the selector of the unit

Output can be used to compute other unit(s) depending on the current unit

unitX

entity[selector (par 1, .., parN)]

IN OUT

Page 45: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Navigation: contextual links

• A contextual link is an oriented connection between two units (source unit and target unit), normally rendered by means of anchors or submit buttons

• Purpose of a contextual link: • Allowing the user to move from one place to

another• Transporting information from one place to another• Activating a computation (side effect)

AuthorAuthor

source unit target unit

Page 46: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Author first name:James last name:Joyce photo:

Author[OID=p1]

Book[author2book(p2)]

Book[OID=p3]

Book Title:Ulysses Price:23$ Cover:

Which author’s books? Which book?

Books of YYY

• Ulysses• The Dubliners• Portrait...

Example of links

p1 p2 p3

Page 47: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Link Parameters

Book[Author2Book(param)]

• Context is transported through links using link parameters• A link parameter is defined by:

• Name• Source: one of the output parameters of the source unit• Target: one of the input parameters of the target unit

Author

param

Page 48: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Default Link Parameters

AuthorBook[Author2Book]

• Whenever possible, link parameters are inferred from the diagram and need not be explicitly specified

• Diagrams become simpler and more readable• Example:

Page 49: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Defaults for selectors

• Whenever possible, selectors and their parameters are inferred from the diagram and need not be explicitly specified

• Example:

Author Book[author2book]

Book

Page 50: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Automatic Links

• An automatic link passes some default context to the destination unit immediately after the display of the source unit, without the user intervention

• Subsequently, the user can change the passed context by choosing a different object, using the anchor(s) representing the link

AuthorAuthor

source unit target unitA

Page 51: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Transport Links

AuthorBook[Author2Book]

• A transport link has a default context that is passed to the target unit immediately after the display of the source unit, without the user intervention

• The user cannot change the default context and therefore the link is not rendered with an anchor

source unit target unit

Page 52: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Examples No input links and no

selector: wrong unit!

Input parameter: OID of a connected object: the related object is shown

EntityB[Relationship(A2B)]

A.oid B.oid

EntityB

EntityB[B.attr = param1]

param1 B.oidInput parameter: value to be used in the selector: the matching object is shown

p1

Page 53: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Examples No input links: all objects

shown

Input parameter: OID of the source object of the relationship role, all related object are shownEntityB

[Relationship(A2B)]

sourceOID (A)

selOID (B)

EntityB

selOID(B)

EntityB[B.attr = Param1]

Param1 selOID (B)

Input parameter: value to be compared with the attribute, matching objects shown

Page 54: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

MultiDataUnit

• Multidata units• Present multiple instances of an entity (SET OF OBJECTS)

• The container is an entity with (optional) selector• Input parameters requested for the computation of the selector:

• Values for attribute comparisons• OID of participants to relationships

• Output parameter:• The set of OIDs of the published objects

Entity[Selector(params)]

params {OIDs}

Page 55: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

MultiData vs. Index MultiData or Indexes?

• Indexes can be used as access mechanism to shown detailed information about one object

• Multidata Units publish information about many objects at time The difference is in the output parameter:

• Indexes output the OID of one selected object• Multidata units output the OIDs of all the displayed objects

Page 56: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Entry Unit Unit for describing input forms that allow information

submission by the user Content is shipped to other units via outgoing links (normally

one), using link parameters Typically translated into HTML using the <form> tag and the

associated submit button

params

Page 57: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Entry Fields and Selection Fields Entry units contains two types of widgets for data entry:

• Fields to insert new value• Selection fields to select a value from a list

Fields have properties: • Preloading (of an existing value in the field)• Modifiability (Y/N)• Visibility (hidden/shown)• Data type (string, integer, text, etc..)• Input validation rules

Page 58: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Preloaded Fields A field can be preloaded with value(s)

• Field slots allow the concatenation of multiple values in the same field• Slots can contain dynamic values taken from the database or static values

defined in the model

Selection fields need to be preloaded with a set of instances (possibly with multiple slots per instance)

The user chooses an instance among them

EntryUnitS1 S2 S3PersonField

AddrFieldArtist

FirstName PF.S1 LastName PF.S2 NickName PF.S3

Resulting field Bruce Springsteen “the boss”PersonField

Page 59: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Multichoice Unit Multichoice units:

• Publish indexes of elements (SET OF OBJECTS) among which the user to select one or more elements (with checkboxes)

The container is an Entity (with optional selector & pre-selector)• Input parameters:

Those requested for the computation of the selectors (values for attribute comparisons and OID of participants to relationships)

• Output parameters: OIDs of the objects checked by the user

Preselector: allows one to define a sub-set of elements as pre-checked (before any user interaction)

Entity[Selector(params)][Preselector(params)]

params {selOIDs}

Page 60: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Examples No input links: all objects shown, no pre-checked elements

Pre-selector: all objects shown, pre-checked elements related to A

EntityB[PRE:Relationship(A2B)]

sourceOID (A)

{selOIDs} (B)

EntityB

{selOIDs}(B)

EntityB[Relationship(A2B)]

sourceOID (A) {selOIDs} (B)

Selector: only elements related to A shown, no pre-checked elements

Atzeni Ceri Fraternali Versand

Ceri Fraternali

Atzeni Ceri Fraternali Versand

Page 61: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Hierarchical Unit Hierarchical units:

• Publish an index of elements, with entries organized hierarchically using entities connected by relationships

• Allow the user to select one element from any level of the hierarchy The container is a set of entities and connecting relationships (with

optianl selectors at all levels)• Input param: requested for the computation of the selectors :

Values for attribute comparisons OID of partecipants to relationships

• Output parameter: OID of the object selected by the user

{ Entity (Relationship)

[Selector]}

params {selOIDs}

Page 62: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Hierarchical Unit outgoing links

Each link is rendered as an anchor at the proper level of the hierarchy

The level where the link is placed depends on the type of the link parameter(s)

EntityA[selector1]EntityB (A2B)[selector2]EntityC (B2C)[selector3]

Param

AParamBParB,ParC

• Tables link a• Kitchen link b

• Korla KJD54 link c• Chairs link a

• Stools link b• Roy LKR34 link c• OddVar JSQ87 link c

• Office link b• Jess RLT45 link c

link a

link b

link c

CategorySubCategory(Cat2SubCat)Product(SubCat2Prod)

EntityA

EntityB

EntityC

Page 63: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

ScrollerUnitScroller units: Add browsing capabilities to a set of objects

• Publish links to the first, previous, next, last object of the set• Used in conjunction with data, index and multidata units• Number of scrolled objects = block factor• Input: values for attribute comparisons, OID of participants to a

relationship• Output: the set of OIDs (possibly 1) of the current block of objects

Always placed in the same page as another content unit that publish the current (block of) object(s)

Entity[Selector(params)]

params {selOIDs}

Page 64: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Scroller + data unit The entity is the same for the scroller and the data unit It is possible to access the data unit also from another page

and the scroller is automatically syncronized

ArtistArtist

Page 65: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Scroller + index Paging the result of a search

AlbumAlbum [Title contains t]

[Year > y]

t,y

Page 66: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Pages A page is a container of one or more pieces of information

shown to the user at the same time Nesting of pages is allowed: a page can have sub-pages The user navigates a site made of pages

LoginBook Index Catalog

Page 67: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Non contextual links A non contextual link is a link between pages No context (information) is transported

The user can browse from a page to another one via an anchor (e.g., >>Books)

HomePage Book Index

Page 68: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Home Page The Home Page is the main page of a site It is the first page of the site that the user should see Each siteview must contain a page marked as “Home”

HomePage H Book Index

Page 69: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Landmark pages Landmark pages: globally visible pages. The user can jump to them from

everywhere in the site view It is equivalent to a non contextual link implicitly defined from every other

page in the site view to the landmark page

Authors

Books

L

Book Details

Store Page

Authors

Books

Book Details

Store Page

Page 70: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Areas An area is a set of logically homogeneous pages Examples of areas:

• Sections of a portal: Sport, Music, Technology, …• Elements of a data-management system: Products management, News

management, …

Areas can be nested, so that sub-areas can be defined inside areas

Each area should have a DEFAULT PAGE or a DEFAULT SUB-AREA, to give a meaning to landmark areas and non-contextual links pointing to areas

Area

Page 71: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Site Views A siteview is a set of pages and/or areas forming a coherent

view of the site Multiple site views can be defined on the same data model Different site views can be published for different types of

users and for different types of output devices Site views can be

• Public: everyone can enter• Private: access control with password protection is enforced

Page 72: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Acme site view modeling Two site views on the same data model

• Customer: public, for customers• Admin: private, for the administrators and content managers

Page 73: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Acme customer site view Purpose: define the customer experience of the site Structure:

• Two main areas: products and combinations• Other landmark pages: home, stores

Customer

Product area

Store Page

Combination area

Home Page

L L

H,L L

Page 74: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Combination areaProduct area

ACME page modeling Q: what “main” pages do I need in the site?

Home, Products, Combinations, Stores

AcmeHome

L

HProducts

LCombinations

L

Stores

L

Q: what other pages do I need?Product detail, Combination detail, ByPrice, BigImages,..

BigImages

Product Page

CombinationDetailBy price

Page 78: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Navigation Model: Links

entity:author

Book[ author2book ]

• Semantics of a link: 1. Moving from one place to another2. Transporting information from one place to another

(navigation context)3. Activating a computation (side effect)

AuthorID is transported

Page 79: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Composition: PagesA Page is a structured container of units and links

• Possibly structured in and/or sub-pages• Abstraction of screen, frame, card, deck...• Permits one to cluster related information for more efficient

communication

E.g.:

AuthorAuthor

The index of authors and the selected author are shown together in the same page

Page 80: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Types of links Contextual links

• Between units• Context transported

Non-contextual links• Between pages• No context transported

Voyages Books

Page 81: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Integrating backend business logic Example of web sites using back-end/remote services:

• Reservation Web site: create a reservation, undo a reservation, overwrite a reservation..

• Other examples: content management, e-commerce trolley management, update of personal profile ..

How can we model the invocation of back end operations, e.g., the update of content by the user?

Response:• Embedding operation calls into the hypertext

Page 82: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Operation Unit Models a generic external operation, or a built-in content

manipulation operation Input from one or more incoming links (at least one is

declared as normal link, the others as transport links) Two kinds of output links

• OK link if the operation completes correctly• KO link if the operation fails

The predefined WebML units can be enriched by adding custom external operations (e.g. SendMail, …)

Page 83: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Built-in Operations WebML predefines a set of frequently used built-in

operations to manage a site’s content They are the traditional database operations: create, delete,

modify, create relationship, delete relationship Users do not need to define the behaviour and the

implementation; they are provided off-the-shelf in the model

Page 84: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Built-in Operations

Delete Unit

Entity

Create Unit

Entity

Modify Unit

Entity

CREATE DELETE MODIFY

Disconnect Unit

relationship

Connect Unit

relationship

CONNECT DISCONNECT

Page 85: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

In/out flows

Create Unit

Entity

value1 attribute1

value2 attribute2

OID of the new object

KO

OK

Nothing

Value2 attribute1 value1 attribute2

Identifier(s) of the modified object(s)

Modify Unit

Entity

KO

OK

Identifier(s) of the object(s) to modify

OIDs of objects to modify

Page 86: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

In/out flow: delete

NothingOIDs of the object(s) to delete

Delete Unit

Entity

KO

OK

OIDs of the object(s) to delete

Albums

DeleteAlbum

Album

DeletionError

OK

KO

NotDeleted

Album

DeletionError

NOT DELETED

All the way1999

Let's talk...1997

Sing-a-long

1998

Albums

DELETE ALBUMS

OK

KO

All the way

Born in the USA

ImagineLet's talk ...Sing-a-long

Anthology

Bridges to Babylon

Del

AlbumIndex

Album

Albums

DELETE ALBUMS

Imagine

AnthologyBridges to Babylon

Del

Example:

Page 87: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

In/out flow: connect Note: if the any of the input parameters is a set of OIDs, the operation is

applied to each element of the set The disconnect operation is similar

Identifiers of theconnected objects

OIDs of source object(s)to connect

OIDs of destination object(s)to connect

KO

OK

Identifiers of theobjects to connect

Connect Unit

relationship role

Page 88: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Example

Rev iewPage

° Beatles

* Dion

° Prince

One of the mostromantic andexpressive artistsof the nineties.

Result

First name:CelineLast name:Dion

OK

KO

ARTISTSNEW REVIEW ARTIST

ReviewPage

Rev iew

NewReview

AllArtists

Artist

AssignReview

ArtistToRev iew[Artist.OID = Art ]

[Rev iew.OID = Rev ]

Rev : OID

Art:OID

Result

Artist[OID = Art]

ArtistDetails

Art: Artist.OID

OK

Rev : Rev iew.OIDKO

Rev iew[OID=Rev ]

ReviewDetails

Rev : Rev iew.OID

Select an artist toassign the review: Review :

One of the mostromantic andexpressive artistsof the nineties.

REVIEW

Page 89: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Example/2Artist&AlbumsPage

Artist

ArtistDetails

PublishedAlbums

Album[ArtistToAlbum]

Album

AlbumDetails

AlbumDisconnect

AlbumToArtist

OK

KO

Artist&Albums

Celine Dion

° All the way

° Let's talk...

° Sing-a-long

° These are...

ALBUMS

Artist&Albums

Celine Dion

° All the way

° Let's talk...

* Sing-a-long

° These are...

ALBUMS DETAILS

Sing-a-long

1999

Press OK

to removeOK

Artist&Albums

Celine Dion

° All the way

° Let's talk...

° These are...

ALBUMS

OK

KO

Page 90: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Siteviews A Siteview is a set of pages that the user can experience as a

whole Web site Different site views can be defined for different devices and

different groups of users Thus, access control and multi-devices delivery is achieved

Page 91: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Using global information It is often necessary to:

• Set a parameter value (e.g. the country or language preferred by a user)

• Use this value globally in all the pages the site view, without carrying it explicitly along links

Solution• Use global parameters stored in the session• Provide means for setting/getting their value

Page 92: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Context Parameters WebML Context Parameters allow to achieve this goal in a

simple way Designer defines one or more Context parameters. A context parameter is defined by:

• Name• ID • Duration (User session or Application)• Value type: can be either:

A Printable value (integer, string, …) An Entity (thus, the parameter can assume an OID value of that entity)

• Starting value [optional]

Page 93: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Set unit Unit that allows to SET the value of a parameter

It is always placed outside a Page It has only an incoming link (carrying the value to be assigned

to the parameter) It has not outgoing links

Value/OID

ParamName

Page 94: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Get unit Unit that allows to RETRIEVE the value of a parameter

It is always placed inside a Page It has only an outgoing link (carrying the value retrieved from

the parameter) It has not incoming links The retrieved value can be used in any compatible unit

Value/OID

ParamName

Page 95: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Example

NewsPage[L]

CountrySelectionPage [L]

CountryIndex

Country Country

CountryData

LocalNews

News[Country2News]

SetCountry

CurrCountry

Country

CountryData

GetCountry

CurrCountry

ProductPage [L]

Country

CountryData

LocalProducts

Product[Country2Product]

Page 96: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Personalization and access control In reserved Web sites commitment wants:

• One or more public pages readable from anyone• A set of private page accessed only after login, which contains personal

content and personal services• Personalization in terms of delivered pages (which pages user can

access) and delivered content (which content user needs/can see)

Page 97: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Personalization Personalization has three facets:

• Access control: login/logout operations for user recognition

• Site view assignement: based on the group a user belong, some site views are accessible (1 or more site view per Group)

• Page personalization: user or group dependent content

Page 98: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

User / Group metaphor Each User can belong to one or more Groups (predefined

entities in the structural model) Each user has one default Group Each Group can contain one or more User and can be the

default Group for many Users

User Group1:N 1:N

1:1 1:N

user2group

user2defaultGroup

Page 99: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

User / Group model Each User can belong to one or more Groups (predefined

entities in the structural model) Each user has one default Group Each group has one associated Siteview

User Group1:N 1:N

1:1 1:N

Module1:N1:1

user2group

user2defaultGroup

Page 100: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Anonymous access One group is predefined (everyone) Users belonging to this group need not login, but access only

unprotected site views, which has unprotected content (the “everyone” site views)

Other site views can be accessed only after login (secured site views)

Page 101: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Login/ Logout A site-view may contain a page allowing users to login

Each secured site-view should allow users to logout

Dynamic Role Changing (i.e. group) allowed

Entry Unit Login

Logout

ChangeGroup

Page 102: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Login for multi-role users If a user belongs to more than one group, at login time he is

considered as member of his defaultGroup

Thus, once the user is logged, the current values of User and Group are always identified

UsernamePassword

Login

johnlee

*********** User: johnleeGroup: johnleeDefaultGroup

Login

Page 103: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

CurrentUser and CurrentGroup Each WebML project has two predefined

global parameters:• CurrentUser: the OID of the currently logged User• CurrentGroup: the OID of the Group of the

currently logged user Login and Logout operations automatically set

/ unset these two parameters

Page 104: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Page personalization (user-level)Personalization can be achieved with appropriate data design

preferenceuserarticles

After login CurrentUser is identified, thus the index shows user’s preferred articles

• Hypertext can reflect structure, and thus provide personalization

user article[preference]

Recommendations

CurrentUser

Page 105: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Trolley management

TrolleyPage

User

CurrentUser

Trolley[UserToTrolley]

TrolleyData

DeleteOrderLine

OrderLine

L

OrderLines

GetUser

CurrentUserOK

Album:Album.OID

Artist:Artist.OID

to Artist Page

to Album Page

OrderLine[TrolleyToOrderLine]

NEST Support[OrderLineToSupport]

NEST Album[SupportToAlbum]

NESTArtist[AlbumToArtist]

KO

Page 106: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Page personalization (User) Personalization can be achieved as a result of appropriate

structure design

reservationuserslot

• Hypertext can reflect structure, and thus provide personalization

After login UserCtxParam is bound to “my” identity, thus the index shows “my” reservationsentity:user rel:reservation

Personal Reservations

UserCtxParam

Page 107: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Page personalization (Group) Personalization can be achieved also at group level (because a

siteview can serve more groups)

User Group

interesting

AuthorBook

Category

Category relation:c2aGroup relation:g2c

Preferred categories Authors

GroupCtxPar

Page 108: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Presentation Presentation dealt with along two lines:

• Gallery of default presentation styles applicable to site views or single

pages (with elementary unit positioning on a grid) each presentation style is an XSL stylesheet

• Compatibility with best selling tools for presentation editing, for advanced page design

Page 109: WebML and WebRatio - Business process modeling (BPM) and web application modeling

WebML

WebML development process

Marco Brambilla

Politecnico di Milano and Web Models Srl

Page 110: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Development process

Business Requirements

HYPERTEXT DESIGN

DATA DESIGN

ARCHITECTURE DESIGN

REQUIREMENTS SPECIFICATION

IMPLEMENTATIONTESTING & EVALUATION

MAINTAINANCE & EVOLUTION

Page 111: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1. Requirements specifications IN: business requirements OUT: user-oriented, easy-to-understand, precise specification Two main sucb-activities:

• 1. Requirements collection: general picture of the application domain and of the solution, by interviewing players and reviewing existing documentation

• 2. Requirements analysis: revision and formalization of the collected requirements

Output is useful for• Designers: understand what the application must do• Stakeholders: validate the adherence of the specifications to the

business requirements

Page 112: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1.1. Requirements collectionUnstructured activity of information gathering: Users identification: clustering of users in groups Functional requirements: identification of the processes that are

supported by the application (through use-cases or scenarios) Data req.: identification of the data that should be managed by the

application (core concepts) Personalization req.: formalization of need of different content and

services to different individuals, based on preferences and access rights Device-specific req.: for multi-device applications Non-functional req.: usability, performance, availability, scalability,

security, mantainability

Page 113: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1.1. Non-functional requirements Usability: ease of use of the application Performance: efficiency with which the application exploits

the available resources, in terms of throughput (the number of requests that can be served per unit of time) and response time

Availability: tolerated frequency of errors and failures Scalability: ability of increasing the performance of the

application in response to the increase of the volume of requests

Security: protection of integrity, confidentiality and privacy of information, authentication of the users, protection of the information flowing between the users and the application

Mantainability: ease of repairing application errors and adapting the Web application to changed or new requirements

Page 114: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1.2 Requirement analysis Revision and formalization of the collected requirements,

producing in output a set of semi-formal specifications, typically in terms of:

a. Group specificationb. Use-case specificationc. Data dictionary specificationd. Site view specificatione. Style guidelines specificationf. Acceptance tests specification

Page 115: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1.2.a Group specificationClustering of users into groups (formally described)

Corporate

SupervisorMar-Commanager

Admin

GroupsHierarchy:

Product News.Objects - content mgmt mode:

Product and Product News.Objects - read mode:

“Login”, “Add a news item”, “Modify a news item”, “Delete a news item”, “Add a news category”, “Modify a news category”, “Delete a news category”, "Modify profile data".

Relevant use cases:

None.Sub-groups:

Corporate.Super-group:

First name, last name, email, office address.Profile data are provided explicitly by the user.

Profile data:

marketing and communication personnel inserting, modifying, and deleting mkt materials.

Description:

Mar-Com ManagerGroup name:GroupDescription:

Page 116: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1.2.b Use-case specificationFormal description of units of interaction with the application by

users of a given group (e.g., thru tables or UML diagrams)

1. Use cases list for a user (use case diagram)

Mar-Com Manager

Add a newscategory

LoginAdd a newsitem

Modify a newsitem

Remove anews item

Remove anews category

Modify a newscategory

Page 117: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

2. Single use case specification (table or activity diagram)

1.2.b Use-case specification

Initial Request Send Form

User Application Server Database

Input Credentials Accept Credentials Verify Credentials

Select Home Page Elaborate Page

Default Home Page ListIndex of Home Pages

Serve Request

Receive Home Page

The following steps must be performed:1. The user receives an input form asking for

username and password;2. The user inputs his credentials;3. If the credentials are correct, the user is

authenticated, the list of groups the user belongs to is determined, and the list of names and URLs of the home pages of the site view of such groups is displayed to user;

4. The user chooses one entry from the list, and enters into the selected site view.

Workflow

The user successfully logs into the application and accesses the site view corresponding to one of his groups.

Post-condition

A user that belongs to multiple groups is registered. For each group, the site view serving the requirements of the group members is defined.

Pre-condition

To express how users with more than one role access the functions of the applications.

Purpose

Login of user belonging to multiple groupsTitle

Page 118: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1.2.c Data dictionary specification List of the main information objects identified during data

requirements collection Each entry can be specified by:

• Name• Synonyms• Description• Sample instances• Properties• Relationships• Components• Super-concept• Sub-concepts

NewsItem

Piece of news

A corporate or product piece of news

TravelMate 610 launched, 20th June 01

Title, Body, Image, Date, …

NewsToProduct

None

None

Highlighted news

Page 119: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1.2.d Site view specification (site map) IN: list of user groups, list of use cases, data dictionary OUT: list of needed site views, specified by:

• Name• Description• Target User Groups• Implemented use cases• Site view map: a table illustrating the different areas that compose the

site view. Each area is specified by: Area Name Area Description Accessed/Managed Objects Priority level

Page 120: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1.2.d Site view specification example

HighNewsCategory NewsItem

In the default page, the user accesses the list of countries for which he is content manager and selects a country to administer. In the News Category page, the user accesses the list of news categories for the selected country. Here, the user can perform content management functions over news categories, according to the use cases “Add a news category”, “Edit a news category”, “Remove a news category”. Otherwise, he can select one category, and access the list of the available news items in the selected category. In the News page, the user can perform content management functions over a selected news item according to the use cases “Add a news item”, “Edit a news item”, “Remove a news item”.

News Content Management

PriorityObjectsArea DescriptionArea Name

Site View Map

“Login”, “Add a news category”, “Edit a news category”, “Remove a news category”, “Add a news item”, “Edit a news item”, “Remove a news item”.

Use Cases

Mar-Com ManagersUser Groups

Includes the pages through which the Mar-Com Managers will access content management functions, for inserting or updating content about news categories and news items.

Description

News Content ManagementSite View

Page 121: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1.2.e Style guidelines specificationRules for the presentation of pages: Specification of standard page grids: rows, columns and cells

arrangement Content positioning specification: banners, logo, menus

positioning Graphical guidelines: rules for graphic items like fonts, colors,

borders and margins Device-specific and browser-specific guidelines

Example: Mock-ups: sample representations of a few typical application pages (for a specific device and rendition language)

Page 122: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1.2.e Style guidelines specificationPage grid:

Content positioning:Content positioning:Graphical guidelines:

Page 123: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

1.2.e Acceptance tests specificationFormalization into a plan of acceptance tests of non-functional requirements about:

performanceavailabilityscalabilitysecuritymaintainability

Page 124: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

2. Data design 2.1. Core subschema 2.2. Access subschema 2.3. Interconnection subschema 2.4. Personalization subschema

Page 125: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

2. Data Design IN: data dictionary, site map, functional requirements, user requirements OUT: formal Data model (E-R schema) Data design:

• clarifies application requirements • feedbacks hypertext design• can be influenced by pre-existing data schemas (possibly not designed

for hypertextual applications) Two different situations can be faced:

• data store does not exist and must be designed together with the Web application

• content managed by the Web application already exists (totally or in part) and is managed by some data repository

Page 126: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

2. Data Design: entities classification (1)

Core objects: • the essential assets managed by the application• form the backbone of the Entity-Relationships schema• may require more than a single entity to be represented (due to

complex properties and components) • core sub-schemas are sets of entities correlated by relationships,

collectively representing one core concept Interconnection objects:

• the semantic associations between core concepts • are used to construct links and indexes for navigation• consist of E-R relationships

Page 127: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

2. Data Design: entities classification (2)

Access objects: • are auxiliary objects used to classify or specialize the core objects, with

the purpose of facilitating access by means of: categorization over the core objects more precise keyword-based search mechanisms collections of most representative objects

• are mapped into entities, connected to the core entities. • access sub-schemas: the same core object may be categorized or

specialized in different ways Personalization objects:

• the properties of the user, needed for personalization • entities may be used to model user profile data and the

groups in which users are clustered• relationships (ownership, preference,…) may connect

user and group to the applicative entities

Page 128: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

2. Data Design: entities classification (3)

CoreEntity1 CoreEntity2

User

Group

Accesssub-schema

Personalization sub-schema

Connection sub-schema

Coresub-schema

Page 129: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

2.1. Core subschema Core entity identification: from data dictionary and the other

requirements

Detailed design of core subschema: attributes, components and relationships

NewsItem Product

NewsItem

HeadlineSubHeadlineDateTextDatePlaceOnlineDateCutoffDatePDFPDFNameBodyImageHighlightedSummary

Product

NameDescriptionShortDescriptionLongImageSmallImageNormalImageLargePDFBrochureFlashPresentationPDFCertificateNotesGIFTechSpecsBrochureThumbnailAvailability

Logo

NameImage

Award

NameDateLogo

Benefit

DescriptionDescriptionLong

TechSpecItem

DescriptionHighlighted

ProductConfiguration

ModelNamePartNumberDescriptionPrice

0:N

1:1

0:N

1:1

0:N

0:N

1:1 0:N

1:1

0:N

Page 130: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

2.2. Access subschema From use cases and usability issues, different access mechanisms can be

designed

NewsCategory

Name

NewsItem

HighlightedNewsItem

0:N

1:1

ProductGroup

NamePriceList

ProductBrand

NameDescription

Product

0:N

1:1

0:N

1:1

Country

NameEnglishNameIsocodeCharset

1:10:N

1:1

0:N

Page 131: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

2.3. Interconnection subschema Semantic connections between core subschema objects are defined

NewsItem

HeadlineSubHeadlineDateTextDatePlaceOnlineDateCutoffDatePDFPDFNameBodyImageHighlightedSummary

Product

NameDescriptionShortDescriptionLongImageSmallImageNormalImageLargePDFBrochureFlashPresentationPDFCertificateNotesGIFTechSpecsBrochureThumbnailAvailability

Logo

NameImage

Award

NameDateLogo

Benefit

DescriptionDescriptionLong

TechSpecItem

DescriptionHighlighted

ProductConfiguration

ModelNamePartNumberDescriptionPrice

0:N

1:1

0:N

1:1

0:N

0:N

1:1 0:N

1:1

0:N

0:N

0:N

0:N

0:N

HighlightedNewsItem

Page 132: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

2.4. Personalization subschema Registered users profile and access management information

Country

NameEnglishNameIsocodeCharsetAbsoluteURLKeywords

ProductGroup

NamePriceList

NewsCategory

Name

0:N

1:1

0:N

1:1

User

UsernamePasswordEmailFirstNameLastNamePhoneAddress

Group

GroupName

SiteView

SiteViewName

DefaultGroup

1:1 1:N

1:N 1:N 1:1

1:N

0:N 0:N

Groups

Page 133: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

3. Hypertext design 3.1. Coarse design 3.2. Detailed design

Page 134: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

3. Hypertext Design IN: data schema, site map, functional requirements, user

requirements OUT: WebML hypertext schema

Two design steps:1. Coarse design 2. Detailed design

Page 135: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

3.1. Coarse Design (1)a) Identification of areas,

by re-examining the functional requirements and the site map (division of the application into modules)

b) Area visibility definition:• default area, if it is accessed by default when its enclosing

site view is accessed. • landmark area, when it is globally accessible from any

other area within the Web site. • internal area, when it is visible only by means of explicit

links

Page 136: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

3.1. Coarse Design (2)c) Specification of content:

• Core hypertextsCore(CoreEntity,Component1,…,ComponentN)

• Access hypertextsAccess(CoreEntity,AccessEntity1,…,AccessEntityN)

• Interconnection hypertextsInterconnection(Role1,…,RoleN)

• Personalization hypertexts• Content management hypertexts

Create&Connect(Entity1,Role1, .., RoleN) Modify(Entity1) Delete(Entity1) Connect(Role1), Disconnect(Role1) Set(ContextInformation)

Page 137: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

3.1. Coarse Design (3)

• Site view definition example:

Create&Connect (News,NewsToNewsCategory)

Set (NewsCategory)

News_ContentManagement Area

Delete (News)

Modify (News)

Access (News, NewsCategory)

L

Page 138: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

3.2. Detailed Design (1)a) Page identification:

• Division of an area into pages• Each page is assigned a portion of the content and

functions of the enclosing areab) Page visibility:

• Home page: presented by default when the user accesses the site view

• Default page: presented by default when the area is accessed

• Landmark page: globally reachable from all the other pages in the same enclosing module (site view or area)

• Internal page: implement subordinate content

Page 139: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

3.2. Detailed Design (2) Example: News_ContentManagement Area

News_Modification Page

Modify (News)

News_Create Page

Create&Connect (News, NewsToNewsCategory)

NewsAccess&DeletionPage

Access (News, NewsCategory)Set (NewsCategory)Delete (News)

D

L

Page 140: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

3.2. Detailed Design (3)c) Page specification:

• Detailed specification of units and links necessary to deliver the content and services established in the coarse hypertext design

• Exploit some typical hypertext sub-schemas, which are hypertext design patterns

A core sub-schema An interconnection sub-schema An access sub-schema The personalization sub-schema

Page 141: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

access sub-schemaexample

BrandsPage

GetCountry

CountryParamCountry

CurrentCountry

ChangeCountry

Country

to Home Page

ProductGroups

ProductGroup[CountryToProductGroup]

ProductGroup

ProductGroup

to ProductPage to ProductPage

from GroupsPage

SetGroup

GroupParam

ProductsFull

ProductBrand[ProductGroupToProductBrand]

NEST Product[ProductBrandToProduct]

ProductsShort

ProductBrand[ProductGroupToProductBrand]

NEST Product[ProductBrandToProduct]

Product.OIDProduct.OID

Page 142: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

coresub-schemaexample

ProductPage

GetCountry

CountryParam

Country

CurrentCountry

ProductGroups

ProductGroup[CountryToProductGroup]

Product[ProductBrandToProduct]

Product

GetGroup

GroupParam

to BrandsPage

fromProductsFull

index inBrandsPage

fromProductsShort

index inBrandsPage

ChangeCountry

Country

to Home Page

Products

ProductBrand[ProductGroupToProductBrand]

NEST Product[ProductBrandToProduct]

Product.OID

to TechSpecs Page

Logos

Logo[ProductToLogo]

Benefits

Benefit[ProductToBenefit]

Configurations

ProductConfiguration[ProductToProductConfiguration]

Awards

Award[ProductToAward]

Page 143: WebML and WebRatio - Business process modeling (BPM) and web application modeling

WebML

Advanced topics: Web Services

Marco Brambilla

Politecnico di Milano and Web Models Srl

Page 144: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Web services architecture

Service Integration

Service Discovery

Service Publication

Service Description

XML - based Messaging

Transport

BPEL4WS IBM, Microsoft & BEAWCSI SunBPML BPMI.org WSFL IBMXLANG Microsoft

UDDI UDDI.org

UDDI UDDI.org

WSDL W3C

SOAP W3CXML W3C

HTTP W3C

Page 145: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Service integration layer Choreography or collaboration layer Describes the interaction of services within a process Business processes are essential to build complex applications

over the message-based paradigm.

Example: BPEL4WS An implementation language: it allows to define new Web

services as composition of existing ones The composed service is described by means of WSDL, just as

any other Web service The process specification describes how the composed

service plugs into the global process

Page 146: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Application scenario Ski Portal stores touristic info on resorts and slopes plus

name/address of hotels• Reservations are done through the HMS web services• Payment is done through the PS web services• The HMS also delivers auxiliary services usable by the Ski Portal (e.g.,

hotel news, event notifications, user comment management)

Hotel management system (HMS)

Web serviceoperations

HTTP

HTTP

• Resorts• Ski slopes • Hotels• Clients • Reservations

Web appl.

Ski portal

Payment system (PS)

Page 147: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Types of interactions (as from WSDL) Central component of a web service: operation = 1 or 2 msg

Ski portal Web application HMS

Get room offers requestRoom offer response

One-way subscription to hotel news

Concert tickets solicit

Hotel news notification

Concert tickets response

• Request-response• Solicit-response• Notification• One-way

Page 148: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Synchronous vs. asynchronous Two-message operations may be used

• Synchronously: no action is taken between 1st and 2nd messg and the sender waits

• Asynchronously: action is performed between the messages, the sender does not wait

Ski portal

Get room offer requestRoom offer response

Make comment requestComment response

Concert tickets solicit

Concert tickets response

Solicit number of users connectedNumber of users. response

HMS

Page 149: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Conversations A Web service conversation is a set of correlated messages

involving one or more Web services (and Web applications) Conversations entail additional semantics

• Messages belonging to the same conversation must be recognized and traced

• Timeouts or error conditions can be specified for the messages of a conversation

• Exceptions should be handled

Page 150: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

WebML support for web services Goal: modeling the interaction between the Web application,

the human users, and the remote systems New modeling primitives are required:

• Data model: specific entities modeling the interaction history with Web services

• Hypertext model: primitives for handling the various classes of service operations

Run-time support for Web services• Ability of exchanging messages• Integration of application data and Web services XML messages • Support for conversations

Page 151: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Meta-data model for Web services

Out

InConversation

InstanceTimeStampStatus

1:N

PartOf

1:1

OperationInstance

TimeStamp

1:1

1:1

0:1

1:1

MessageType

NameOut

In

OperationType

OpNamePortNameBindingServiceNameNetworkAddressTimeout

1:1

1:1

0:1

0:1

1:1 1:1

0:N

0:N

ConvType

1:N

PartOf

1:1

0:N

0:1

NameTimeout

Format

MessageInstance

Content

Page 152: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

WebML for supporting Web services One WebML operation for each class of Web service

operations

ReqRsp

ConvName

SolRsp

ConvName

OneW

ConvName

Notif

ConvName

AsSolRsp

ConvName

AsReqRsp

ConvName

ReqRsp

ConvName

ReqRsp

ConvName

• Marks for operations that start, resp. end conversations

Page 153: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

WebML service operations are macros1. Create a new Conversation Instance2. Create a new Operation Instance

• Name=“getOffer", …3. Connect the Operation Instance to the

Conversation Instance4. Compose parameters of the incoming links into an XML

message5. Send XML message; block waiting for answer6. Decompose XML answer

• may involve populating the entities of the underlying data schema7. Export selected element from the answer as parameters of

the outgoing links

getOffer

ReservConv

Page 154: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Hypertext with service calls

User data

User[OID=CurrentUser]

Reservation

Book

ReservConv

New

Reservation

Pay

ReservConv

RoomCritFromTo

Room search

Offers

RoomOffer

CreditInfoCCNoExp.

Confirmation

getOffer

ReservConv

Confirm

ReservConv

Confirmed

Reservation

Page 155: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Hypertext with async messagingAdded new entity Comment(OID,subject, text, answer) + Relationship Comment_User

User data

User[OID=currentUser]

Send comment

CommentSubjText

Answers to my comments

Comment

CommConv

MyComm

Comment[Comment2User]

[answer!=null]

A: textC:Comment.OID

Update

Comment<answer:=A>

Answered

Comment

User data

User[OID=currentUser]

Create

Comment

Connect

Comment2User

Page 156: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

WebML data transformation Web services communicate through XML messages (SOAP) Marshalling and transformation between messages and

from/into structured data is required XML-in & XML-out:

marshalling XML documents ER instance

Adapter unit:transformations from XMLdocument to another XML document(through user-defined XSL stylesheet)

XML XML

Adapter

Page 157: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Examples

Book

ReservConv

New

Reservation

Book

ReservConv

New

Reservation

Adapt StoreXML

Pay

ReservConv

Confirm

ReservConv

Pay

ReservConv

Confirm

ReservConv

Adapt

Page 158: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Actual implementation within the tool

Web Service invocations

Web service publishing

Page 159: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

DEMO: the mediator at work Receive PO

Obtain CustomerId

Create Order

Send Lines

Close Order

Page 160: WebML and WebRatio - Business process modeling (BPM) and web application modeling

WebML

Advanced topics: BPM

Marco Brambilla

Politecnico di Milano and Web Models Srl

Page 161: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Introduction Web services and BPM are the de facto standard of modern

enterprise integration• Web services enable system-to-system interaction;• business process specification languages ease the definition of

the business constraints, by orchestrating service execution Enterprise workflows are rarely constituted only by

orchestrations of Web Services • Human interaction is often involved• (e.g., BPEL4People initiative)

We propose MDE approach for multiparty business processes, based on Web Service orchestration and Web user interface design. • BPMN• WebML

161

Page 162: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Model-driven Development Process Manual specification of (extended) BPMN process model Automatic transformation of BPMN to WebML Possible manual refinement of WebML models Automatic running code generation on J2EE platform

162

Page 163: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

What is BPM? Business Process Modeling aims at defining enterprise

businesses in a (semi)formal way• More to come in future courses

BPMN is flow-chart based notation for defining Business Processes

The current version is 1.2, with a major revision process for 2.0 in progress

Covers three different levels of process modeling: • Process Maps – simple flow charts of the activities• Process Descriptions – flow charts extended with additional

information, but not enough to fully define actual performance• Process Models – flow charts extended with enough information so

that the process can be analyzed, simulated, and/or executed

Page 164: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Basic concepts Small set of graphical elements to make it easy for business

users as well as developers to understand the flow and the process.

Four basic categories of elements compose a business process diagram (BPD):• Flow Objects

Events, Activities, Gateways• Connecting Objects

Sequence Flow, Message Flow, Association• Swimlanes

Pool, Lane• Artifacts (Artefacts)

Data Object, Group, Annotation• It is also allowed to make a custom type of a Flow Object or an Artifact

to make the diagram more understandable.

Page 165: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Pool and lanes A Pool:

• represents a Participant in the Process. A Participant can be a specific business entity (e.g., a company) or can be a more general business role (e.g., a buyer, seller, or manufacturer)

A Lane:• Is a sub-partition within a Pool• Is used to organize and categorize activities within a

Pool. • Is often used for such things as internal roles (e.g.,

Manager, Associate), systems (e.g., an enterprise application), an internal department (e.g., shipping, finance)

Pool

Lane

1La

ne 2

Page 166: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Sequence flow A Sequence Flow is used to show the order that activities will

be performed in a Process The source and target must be one of the following objects:

• Events

• Activities

• Gateways

A Sequence Flow cannot cross a Sub-Process boundary or a Pool boundary

Task 1

Task 2Task 1

Page 167: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

How to read diagrams A useful concept that helps the action of reading of a diagram

is the Token• The start of a process generates a Token that must eventually be

consumed at the conclusion of the process• A Token will traverse the Sequence Flow and pass through the Flow

Objects in the Process• The behavior of the Process can be described by tracking the path(s) of

the Token through the Process• Multiple Tokens may exist because of concurrent Process instances or

the dividing of the Token for parallel processing within a single Process instance

Page 168: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Activities An activity:

• is work that is performed within a business process• Can be a:

Task Sub-Process

• Can be performed once or can have internally defined loops

Page 169: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Task Is an atomic activity that is included within a process Can be executed:

• Manual: outside the process (i.e. the customer accepts an offer)• Service: automatically as some sort of service, which could be a Web

service or an automated application• User: by a human performer with the assistance of a software

application and is scheduled through a task list manager of some sort Has its own state:

• Ready: waiting to be worked• Active: someone is working on it• Completed: someone has finished working on it• Aborted: someone has cancelled it

Defines the parameters to show and to edit

Page 170: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Parameters A parameter is:

• A simple property that stores an information managed by the process• Used when there is the need to take a decision, sending a message and

so on• Defined by:

Name Type: simple (string, integer, etc.) or complex (Business object) Available values Selection policy (single or multiple)

• Defined at pool level• Replied for each process instance

Page 171: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Business objects A business object is:

• A complex object that stores an entity managed by the process (i.e. an order, an invoice etc.)

• Useful when: the information is a structured object you have to use two or more properties to define an object

• Defined by properties• A property is a simple object defined by:

Name Type (string, integer, etc.) Available values Selection policy (single or multiple)

• Defined at project level

Page 172: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Gateways A gateway:

• Is used to control how sequence flows interact as they converge and diverge within a process

• Can be executed: User: manually by a user choosing the gate using a set of

parameters to show or edit like an activity Service: automatically as a service with a set of condition

parameters to test• Is divided into types:

Exclusive

Inclusive

Parallel

Page 173: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Exclusive Data-based gateway

Task 2

Task 1

Task 3

Alternative 1 evaluated to true

Alternative 2 evaluated to true

Path 1

Path 2

Page 174: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Inclusive Gateway

Task 2

Task 1

Task 4

Path 1 and 3 evaluated to true

Path 1 and 3 evaluated to false. Default path is taken

Task 3

Path 1

Path 3

Path 2

Page 175: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Parallel Gateway

Task 2

Task 1

Task 3

Path 1 and 2 are both taken Path 1

Path 2

The gateway waits for ALL tokens

Page 176: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Events An event:

• Is something that happens during the course of a business process. • Affects the flow of the process and often have a cause (trigger) or an

impact (result). • Can:

start a flow. Is drawn as a circle with a single thin line interrupt/resume a flow. Is drawn as a circle with a double thin

black line end a flow. Is drawn as a circle with a single thick black line

• Can be one of these types: None, Message, Timer, Signal, Conditional, Link, Error, Cancel,

Terminate, Compensation• Can be used to catch or throw the event• Can be defined as standalone or on the boundary of an activity as

intermediate event

Page 177: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Message Start and Intermediate Event

Task 2Task 1 ,5

Message Throwing Intermediate Event: A message is sent

A new message arrives and the process restarts

Message Catching Intermediate Event:The process stops and waits for the message

Page 178: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Signal Event A Signal is for general communication within and across

Process Levels, across Pools, and between Business Process Diagrams

A signal is not a message, which has a specific target, but is a broadcast

A signal is defined by:• Name• A set of parameters to show or edit

Multiple processes can have events that are triggered from the same broadcasted signal

Page 179: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Signal Start and End Event

Task 2Task 1

Signal 1

Task 1

Signal 1

Task 1

Signal 2

Task 1

Signal 3

Task 1

Signal 1

Signal Start Event:The process starts catching the signal (only Signal 1)

Signal End Event:The process ends throwing the signal (Signal 1)

Page 180: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Link Event A Link is a mechanism for connecting two sections of a

Process. Link Events can be used to create looping situations or to

avoid long Sequence Flow lines. Link Event uses are limited to a single Process level Paired Intermediate Events can also be used as “Off-Page

Connectors” for printing a Process across multiple pages. Can also be used as generic “Go To” objects within the

Process level. There can be multiple Source Link Events, but there can only be one Target Link Event.

Catching Thowing

Page 181: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Compensation Compensation is concerned with undoing steps that were

already successfully completed, because their results and possibly side effects are no longer desired and need to be reversed.

If an Activity is still active, it cannot be compensated, but rather needs to be canceled.

Compensation is triggered using a compensation throw Event, which can either be an Intermediate or an End Event.

The Activity which needs to be compensated is referenced. If the Activity is clear from the context, it doesn’t have to be specified and defaults to the current Activity.

If no Activity is specified in a “global” context, all completed Activities in the Process are compensated.

Page 182: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Sub-Process Is a compound activity in that it has detail that is defined as a

flow of other activities Enables hierarchical process development Points directly to a separately defined process Defines its own input/output parameters and exposes them

when called/executed Is started from a None Start Event, if more than once one will

be chosen Can be multi instanced in:

• Loop: defined by a while condition• Parallel: defined by a count parameter passed as input• Serial: defined by a count parameter passed as input

Page 183: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Sub-Process

Task 1 Sub-Process 1

Task 1

Page 184: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

BPMN* WebML transformation

Transformation rules• finer-grained Application Model, needing few refinements by the designer

typed activities enables reusable application models data dependencies are specified at a higher level

• less errors in Application Model design• Faster development

184

(1) One control siteview per pool: Human interaction(2) One control serviceview per pool: WS Choreography(3) One site view per lane: user navigation(4) One site view per lane: business logics of activities and gateways(4) One site view per lane: business logics of activities and gateways(5) Orchestration view: a controller component invokes the activities

Page 185: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

ProcessMetadata

Run-Time

Log

Actors

Data Model

Page 186: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

The NEXT unit• The Next unit encapsulates the process control logic• It exploits the information stored in the Process Metadata • It calculates the current process status and the enabled state

transitions • It needs the following input parameters:

– caseID (the currently executed process instance ID)– activityInstanceID (the current activity instance ID)– conditionParameters (the values to evaluate the

conditions)

186

NEXT

Page 187: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

The NEXT unit (cont.d)4 execution modes:• Process start. Instantiates and starts a case for the given

ProcessID.• Process end. Given the activityInstanceID of the last activity,

sets the Case to “Ended”.• Calculate and execute. Given the actInstID of the last

concluded activity, enables the execution of the subsequent activities.

• Execute. Given an actInstID, sets its status to “Active” and launches its execution.

187

NEXT

Page 188: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Orchestration

Modules

Next Unit

Page 191: WebML and WebRatio - Business process modeling (BPM) and web application modeling

WebML

Advanced topics:AJAX

Marco Brambilla

Politecnico di Milano and Web Models Srl

Page 192: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Conceptual modeling of AJAX features WebML currently covers a limited set of AJAX features

• Major revision foreseen Partial page refresh Popup windows

Page 193: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Conceptual modeling of AJAX features Dynamic tooltips

Drag and drop

Page 194: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

AJAX event management onChange event: the typical application is the refresh of the

contents of a drop down list depending on the changed value of another field

onFocus event: this may be useful for showing some instructions or hints when the user enters a field

onBlur event: allowing one to execute some action when the cursor leaves a field

Page 195: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Other AJAX features Content

autocompletion for fields

Background file uploads

Page 196: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Generated code and descriptorsFor each page: 1 main JSP page 1 backoffice page for the chunks used by AJAX A set of unit descriptors

Runtime descriptor DataUnit1

...Index Unit

component (java)

data access layer

Data unit component (java)

Runtime descriptor DataUnit2

Runtime descriptor DataUnit3

Runtime descriptor IndexUnit1

Runtime descriptor IndexUnit2

Runtime descriptor IndexUnit3

Page1 (jsp) ...

Page1 Chunks for AJAX (jsp)

Page2 (jsp)

Page2 Chunks for AJAX (jsp)

PageN (jsp)

PageN Chunks for AJAX (jsp)

Page 197: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

AJAX pages behaviour

User Front-end JSP Back-end JSP chunks

Page request

AJAX request in the page

Page request

Selection of the proper backend chunks

Chunks rendering in the page

...

Page 198: WebML and WebRatio - Business process modeling (BPM) and web application modeling

WebML

WebRatio 6 BPM

Marco Brambilla

Politecnico di Milano and Web Models Srl

Page 199: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

WebRatio 6 BPM WebRatio 6 BPM permits you to:

• Model and Document your processes• Execute and Validate your processes by instantly prototyping• Developing, Improving and Refining your processes and create a

complete Web application

Page 200: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

WebRatio functionalities Content model design Business proces model design Data derivation (Derivation Wizard) Hypertext model design (siteviews) Consistency checks (warnings) Mapping onto a datasource Units positioning in the pages Automatic web site generation Integration of advanced features (BPM, Web services, AJAX)

Page 203: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

References and useful links WebRatio Official Wiki (http://wiki.webratio.com)

- “WebRatio 6 - Getting started”

- “WebRatio 6 - Tutorial - Vacation Request”

• BPMN Official Site (http://www.bpmn.org/) Bruce Silver - “BPMN Method & Style” (http://www.bpmnstyle.com/)

Bruce Silver is a well-known BPM industry analyst and consultant, the founder and principal at BPMessentials, the leading provider of BPMN training, and a participant in the BPMN 2.0 development team in OMG.

Page 204: WebML and WebRatio - Business process modeling (BPM) and web application modeling

WebML

Industrial cases

Marco Brambilla

Politecnico di Milano and Web Models Srl

Page 205: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Context and motivations Acer Inc:

• the 3rd* branded PC vendor worldwide• US$11.32 B consolidated revenues in 2006, operations in more than

100 countries, 5300 employees Situation in year 2000

• A manufacturing-oriented company, with increasing market shares and brand value, but:

• Regionalized structure with continental HQs and highly independent national subsidiaries

• Countries with very variable market approach, customer service levels, and even visual identity and local branding

• Low perceived value by customers as a knowledge and business partner

* Source Gartner

Page 206: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Technical Goals Launched in EMEA in Dec 2000 as a worldwide pilot Business Goals:

• Supporting the new corporate strategy: “from manufacturing to Total Brand Company”, the so called “New Acer”

• Improving the customer-perceived value by: Centralizing the conception and realization of eBusiness solutions for the

(initially 14, now 34) EMEA & PA countries Deploying innovative B2C & B2B services effectively on the Web Homogenizing marketing and communication, technical support, and

customer service across national subsidiaries Building an added-value online community, serving channel operators

(dealers, VARs, distributors) and end-users in a one-to-one, yet resource-effective, way

Page 207: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Technical Goals Division of competences between IT & MarCom in the

development of customer solutions• The MarCom business unit is responsible of the project, from business

requirement analysis, to early prototyping, development, and verification

• The IT unit sets technical standards, manages infrastructure and runs the developed solutions

Methodology for “lossless” transition from business requirements to technical requirements

Inject Customers’ and MarCom managers’ feedback into the projects as early as possible

Time to market of services and solutions & effort consumption

Long-term sustainability w.r.t. business strategy and ICT infrastructure evolution

Page 208: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Methodology Integrated approach to Business Process Reengineering,

through Model Driven Development• Visual Language: WebML

Extensive use of automatic code generation from application models• IDE and Code Generator: WebRatio

Page 209: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

7 years experience: B2C+B2B porfolio

Page 210: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Case History 1: Acer Euro CMS B2C + CMS Web applications initially for 14 EU countries

(year 2000) Corporate news, Product technical & commercial data,

Service & Partner area, Where to Buy… Multilingual, multi-actor, distributed workflows for local and

central PMs, local and central MarCom managers ... and a: very limited Time to Market (7 weeks!!)

Page 211: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Size & effort

Class Dimension Value Number of localized B2C web sites 14 Number of main CMS applications 4 (Admin, News, Product, Other

content) Number of supported languages 12 for B2C Web sites, 1 for

CMS Number of data entry masks 39 Number of automatically generated database tables 46 Number of automatically generated database views 82 Number of automatically generated database queries

279 for data extraction, 89 for data update

Number of automatically generated JSP page templates

48

Number of automatically generated or reused Java classes

250

Size

Number of automatically generated Java lines of code

12500 Non commented lines of code

Number of elapsed workdays 49 Number of development staff-months (analysts and developers)

6 staff-months (6 weeks x 4 persons)

Total number of prototypes 9 Average elapsed man days between consecutive prototypes

5,4

Time & effort

Average number of development man days per prototype

15,5

Page 212: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Size & effort

DEGREE OF AUTOMATION Number of manually written SQL statements 17(SQL constraints) Percentage of automatically generated SQL code 96% Number of manually written/adapted Java classes /JSP templates 10% JSP templates

manually adapted Percentage of automatically generated Java and JSP code 90% JSP templates,

100% Java classes COST AND ROI

Total cost of software development of first version 75.000 € HW, SW licenses, and connectivity cost of first version 70.000 € (db server

license) Return on investment of first version 12-15 months Average effort of extension to one additional country 0,5 staff-months Average cost of extension to one additional country 7.500 € Average ROI of extension to one additional country 2 months

PRODUCTIVITY Number of function points 177 (B2C web site)

+ 612 (CMS) = 789 Average number of function points delivered per staff-month 131,5

Page 213: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Critical Considerations On the positive side:

• Almost 80% of the delivery effort concentrates in the phases of data design, hypertext design and prototyping:

more development time is spent with the application stakeholders MDD allows a more flexible distribution of responsibilities

between the IT department and the business units The peak productivity rates has reached five times the

number of delivered function points per staff-month of a traditional programming language like Java

Page 214: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Critical Considerations (continued) On the negative side..

• Acer estimates that it took from 4 to 6 months to have fully productive developers with MDD, WebML, and WebRatio.

..but..• The initial investment in human capital required by MDD pays off in

the mid term MDD benefits testing, maintenance, and evolution (which account for

over 60% of the total lifecycle cost) reasoning on the system is far more effective at the conceptual level

Served Contries and Applications

4 4 4 5 5

1724

32

41

56

1721 24

28 31

0

10

20

30

40

50

60

2001 2002 2003 2004 2005

Year

Un

its

Number of developers

Number ofmaintainedapplications

Number of servedcountries

Page 215: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Major European bank – large BPM case The pilot application for the first country (planned to be

extended to 10 more) covers • 52 business processes• 1,100 activities• 30 user roles.• Application load of 300 registered users, with 100,000 cases / 2 MLN

activities per month The development team comprised

• 14 staff members from three organizations• total effort amounting to 2551 man days, spent in 375 elapsed days

Page 216: WebML and WebRatio - Business process modeling (BPM) and web application modeling

[email protected]://home.dei.polimi.it/mbrambil

WebML

Major European bank – large BPM case Distribution of effort:

• 12% for business process analysis and re-engineering, • 6% for BP modeling according to BPMN, • 12% for wrapping existing legacy procedures as services accessible

through SOA and BP orchestration, • 5% for designing the support interfaces for the BPM • 55% for the design and refinement of the application models that

implement the logic of the activities• 10% for the design of collateral application for increasing usability and

employee productivity (data look-ups, etc). Central role played by the detailed application design Main benefits were

• Rapid prototyping, thanks to which 4 major prototypes and 35 minor releases • Support of teamwork, which allowed 14 contributors from 3 different

organization to work together