87
BPEL vs. BPMN 2.0: Should You Care? Should You Care? (2 nd I tl W kh BPMN 2010 P t d G Otb 13 2010) (2 nd Intl. Workshop BPMN 2010, Potsdam, Germany; October 13, 2010) Prof. Dr. Frank Leymann Institute of Architecture of Application Systems University of Stuttgart Phone +497117816 470 Universitätsstr. 38 70569 Stuttgart Germany Fax +497117816 472 email Leymann@iaas. unistuttgart.de

Frank Leymann @ BPMN 2010

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Frank Leymann @ BPMN 2010

BPEL vs. BPMN 2.0:Should You Care?Should You Care?

(2nd I tl W k h BPMN 2010 P t d G O t b 13 2010)(2nd Intl. Workshop BPMN 2010, Potsdam, Germany; October 13, 2010)

Prof. Dr. Frank LeymannInstitute of Architecture of Application Systems

University of Stuttgart Phone +49‐711‐7816 470Universitätsstr. 3870569 StuttgartGermany

Fax +49‐711‐7816 472 e‐mail Leymann@iaas.

uni‐stuttgart.de

Page 2: Frank Leymann @ BPMN 2010

AgendaAgendaHistorical RemarksHistorical RemarksBPMN Origin and PositioningThe Notion of “Native Metamodel”View on Process EnginesView on Process EnginesSelective BPMN 2.0 Features

Executable BPMN ‐ BPEL Mapping

SummarySummary

© Frank Leymann 2

Page 3: Frank Leymann @ BPMN 2010

Brief History of Workflow Technology (no scientific rigor intended)

2010Modeling/Execution Convergence

Composites as a Service (CaaS)

2005Graphical Modeling

g/ g

2000WF A i

Web Service Composition

Graphical Modeling

WF in eScience

1995 Production WF

WF Automation

WF St d di ti B i

WF use in EAI

1990 BPRWF‐based Apps

WF Standardization Begins

D R i /C P i

People Facing

1985

1990Transactional WF

Mega Programming

© Frank Leymann 3

Document Routing/Case Processing1985

Office Automation, Forms Processing,…

g g g

Page 4: Frank Leymann @ BPMN 2010

Workflow Language Genealogy

BPELJ ?…?BPEL4People BPEL-SPE BPMN 2.0(OMG)

BPELWS-CDL

(W3C)

BPMN 1.x(OMG)

Petri-NetsBPEL

(IBM, Microsoft, BEAOASIS)

GSFLGPEL

BPEL4Chor

WSFLXLANG(IBM)(Microsoft)

YAWLGSFL …

(Research Groups)

FDML W/XPDL BPML WSCI BPSS(IBM) (WfMC) (bpmi org) (SUN, SAP, (OASIS

Pi-Calculus++(Microsoft) (IBM) (WfMC) (bpmi.org) (SUN, SAP,

Oracle)(OASISebXML)

(Microsoft)

-Calculus

© Frank Leymann 4

FDL(IBM)PM-Graphs

Page 5: Frank Leymann @ BPMN 2010

Process Modeling is (has been?) Layered

Conceptual Process ModelBPMN

TransformProcess Model

Logical Process ModelBPEL

Deploy

Process Engine

© Frank Leymann 5

Page 6: Frank Leymann @ BPMN 2010

Process Modeling is (has been?) Layered

Conceptual Process ModelBPMN

Transform

Logical Process ModelBPEL

Deploy

Process Engine

© Frank Leymann 6

Page 7: Frank Leymann @ BPMN 2010

BPM Lifecycle: Where BPMN Fits

ModelingKPIs g

IT RefinementAnalysis

DeploymentMonitoring

New in 2.0!(but this is optional)

© Frank Leymann 7

ExecutionExecution

Page 8: Frank Leymann @ BPMN 2010

BPMN 2.0 vs. BPMN 1.1

BPMN 2.0 is based on BPMN 1.1 but additionally contains:contains: 

An XML‐based interchange format for BPMN models

Clean operational semantics and metamodelClean operational semantics and metamodel (connecting BPMN to OMGs MDA efforts)

The metamodel is one of the most important changes, hence theThe metamodel is one of the most important changes, hence the new name (see below)

The graphical notation is mostly unchangedsome new event types, choreography, collaboration,…

New BPMN “Level”: executable BPMNNew BPMN  Level : executable BPMN

BPMN in 1.1: “Business Process Modeling Notation”

© Frank Leymann 8

BPMN in 2.0: “Business Process Model and Notation”

Page 9: Frank Leymann @ BPMN 2010

Overview On All Graphical Artifacts

© Frank Leymann 9

Page 10: Frank Leymann @ BPMN 2010

AgendaAgendaHistorical RemarksHistorical RemarksBPMN Origin and PositioningThe Notion of “Native Metamodel”View on Process EnginesView on Process EnginesSelective BPMN 2.0 Features

Executable BPMN ‐ BPEL Mapping

SummarySummary

© Frank Leymann 10

Page 11: Frank Leymann @ BPMN 2010

The Key Aspect of BPEL

BPEL exists and is supported by most middleware vendors!

Combination of two modeling paradigmsAvoided split of WF product market/industriesAvoided split of WF product market/industriesThe runtime standardWell defined syntax & operational semanticsWell defined syntax & operational semantics(Certain degree of) portability across vendors(Hi h d f) t l t bilit(High degree of) tool portabilityPortability of skills

And, yes, even original authors think it’s a chimera, 

© Frank Leymann

i.e. they don’t think it’s a beautiful language11

Page 12: Frank Leymann @ BPMN 2010

BPMN 1.x Filled a Gap

BPEL focused on language syntax and operational semanticsIt sacrificed time‐to‐market and ignored visual representations by willp yWhen looking back this was a BIG mistake!BPEL turned out to be too difficult for mere mortalsBPEL turned out to be too difficult for mere mortals

BPMN 1 x filled this gapBPMN 1.x filled this gapNon‐IT experts could communicate about business processesprocesses

h l© Frank Leymann

Big progress in BPM technology12

Page 13: Frank Leymann @ BPMN 2010

Chasm between BPMN 1.x and BPEL

BPEL processes are modeled with their future execution in mindexecution in mind

This has not been often the case in the past for BPMN

But more and more, BPMN users wanted their processes to be executed

Wide‐spread support of BPEL in workflow engines required to map BPMN to BPEL

But BPMN and BPEL metamodels are quite different

Thus mapping is not straightforward even complexThus, mapping is not straightforward, even complex

Many of you understand this much better than me

bl b d h h ?© Frank Leymann

Problem: How to bridge this chasm?13

Page 14: Frank Leymann @ BPMN 2010

Options to Bridge the Chasm

Standardize a visual representation for BPELCan be done as proven by the many graphical tools forCan be done as proven by the many graphical tools for BPEL

But BPMN contains a bunch of constructs withoutBut BPMN contains a bunch of constructs without BPEL counterparts

Corresponding BPEL extensions are requiredCorresponding BPEL extensions are required

Very time consuming!  (see BPEL4People…)

B t k f l ti !But users ask for a solution asap!

This was not practical

Thus, way chosen is to make (significant subset of) 

© Frank Leymann

, y ( g )BPMN 2.0 more compatible with BPEL

14

Page 15: Frank Leymann @ BPMN 2010

Most Important Additions of BPMN 2.0

Clear operational semantics

“Nati e” XML e change format“Native” XML exchange format

Event & exception handlers (BPEL compliant)

Choreography extensions 

… and:

Pattern‐based mapping to BPEL (subset of BPMN)

Effectively, BPMN 2.0 contains a significant subset h l d fisomorphic to BPEL l Visual rendering of BPEL!

© Frank Leymann 15

Page 16: Frank Leymann @ BPMN 2010

The Price to Pay

Complexity of BPMN 2.0 has increased significantly!Well ensuring executability is always complex!Well, ensuring executability is always complex!

Only a subset of BPMN 2.0 can be mapped to BPEL in a straightforward manner

It is still possible to model BPMN processes that have no canonical representation in BPEL

Some features have no runtime environment yetE.g. corresponding domain is out of scope of BPEL at all

See BPEL4Chor

New middleware has to be developed

© Frank Leymann 16

Page 17: Frank Leymann @ BPMN 2010

Resulting Viewpoints

Viewpoint 1:

S bset of BPMN 2 0 is isomorphic to BPELSubset of BPMN 2.0 is isomorphic to BPELThis subset is canonically transformed to BPEL and can be executed in BPEL enginesexecuted in BPEL engines

Corresponding subset is a visual layer on top of BPEL

Viewpoint 2:

BPMN 2.0 is a process language with well‐defined operational semantics imprinted by BPELoperational semantics imprinted by BPEL

It is possible to build a BPMN 2.0 engine without the need to use a separate BPEL engine

© Frank Leymann

need to use a separate BPEL engine

17

Page 18: Frank Leymann @ BPMN 2010

Confusion Ahead!

Now we have two process languages in the market supported by major vendorssupported by major vendors

Very likely, we will be faced with the situation that we will have both, BPEL engines and BPMN engines in the market

But what does it mean: BPEL engine? BPMN engine?

© Frank Leymann 18

Page 19: Frank Leymann @ BPMN 2010

Major Building Blocks of a Process Engine

Buildtime

Modeling Tool

Process Model

Process Engine(aka Workflow System)

Workflow/ProcessDatabase

Runtime

(aka Workflow System)

Runtime

© Frank Leymann 19

Applications,…

Page 20: Frank Leymann @ BPMN 2010

More Detailed View: The WfMC Reference Model

Business Modeling

Workflow Enactment Engine

Administration,Auditing

Workflow Enactment Engine

Worklist ApplicationWorklistProcessor

ApplicationInvocation

WorklistApplication

Application

© Frank Leymann

Page 21: Frank Leymann @ BPMN 2010

Modern Terminology

Process ModelingTool

Process(Execution) Engine

ManagementTool

ProcessEngine 2

Workitem ApplicationWorkitemManagement

ApplicationInvocation

WorklistApplication

ApplicationFunction

© Frank Leymann

Page 22: Frank Leymann @ BPMN 2010

Yet More Modern Terminology

Process ModelingTool

OrchestratorManagement

ToolOrchestrator 2

WorkitemWorkitemManagement

Service Bus

WorklistApplication

Service

© Frank Leymann

Page 23: Frank Leymann @ BPMN 2010

Architectural Impact of BPEL4People

WFMS WFMS Task Manager

Navigator(aka Task Processor 

aka Human TaskNavigator

Workitem

Human Task Infrastructure)

Navigator

Manager

Past Architecture Today’s Architecture

© Frank Leymann

Page 24: Frank Leymann @ BPMN 2010

Architectural Impact: Refined View

WFMS WFMS

Navigator Navigator WIStatus

WorkitemProtocolHandler

WIStatus

Manager

Task

ProtocolHandler

Task‐Type‐Specific Interface

Workitem Interface TaskManager

TaskStatus

WorklistClient

k

Task Client Interface

© Frank Leymann 24

Task ListClient

Page 25: Frank Leymann @ BPMN 2010

Resulting SOA‐View on WfMC Reference Model

Process Modeling Tool

Conceptual Process Model

Logical Process Model

ProcessEngine

ManagementTool

ProcessEngine 2

T k M S i BTask Manager Service Bus

© Frank Leymann 25

Task ListClient

Service

Page 26: Frank Leymann @ BPMN 2010

Process Modeling is Layered

Process Management Stack Data Management Stack

Conceptual Process Model(BPMN)

Conceptual Data Model(Entity-Relationship)(BPMN)

Transform

(Entity-Relationship)

Transform

Logical Process Model(BPEL)

Logical Data Model(SQL)( )

Deploy

( )

Deploy

Process Engine(Internal Metamodel)

DBMS(Relational Datamodel)

© Frank Leymann 26

Page 27: Frank Leymann @ BPMN 2010

DBMS: What Happened in the Past

Conceptual Data Model(Object Model)

Data Model

Logical Data Model(SQL)

Data Model(Object Model)

DBMS(Relational Datamodel)

OODBMS(Object Model)

Data Model(Object/XSD Model)(Relational Datamodel)

Conceptual Data Model

(Object/XSD Model)

E t d d RDBMS

Logical Data Model

p(XSD)

Data Model(XSD)

Extended RDBMS(OR-XML Model)

Logical Data Model(SQL)

XML-DBMS(XSD)

© Frank Leymann 27

DBMS(Relational Datamodel)

(XSD)

Page 28: Frank Leymann @ BPMN 2010

The Open Question

Will history repeat in the “Process World”?Will history repeat in the  Process World ?

© Frank Leymann 28

Page 29: Frank Leymann @ BPMN 2010

AgendaAgendaHistorical RemarksHistorical RemarksBPMN Origin and PositioningThe Notion of “Native Metamodel”View on Process EnginesView on Process EnginesSelective BPMN 2.0 Features

Executable BPMN ‐ BPEL Mapping

SummarySummary

© Frank Leymann 29

Page 30: Frank Leymann @ BPMN 2010

The Notion of a Native Metamodel

What does it mean to be a BPEL (BPMN) engine?Well, the engine can import process models specified inWell, the engine can import process models specified in BPEL (BPMN), instantiate, run, monitor,… them according to the operational semantics of BPEL (BPMN)Most often, during import BPEL (BPMN) artifacts will be mapped onto internal artifacts of the engine anyway: 

Most engines implement their owni t t d lproprietary process metamodel

(Native Metamodel)

“Native” BPEL (BPMN) engines are rare exceptions!N i BPEL (BPMN) BPEL (BPMN) i h i l d l

© Frank Leymann

Native BPEL (BPMN):= BPEL (BPMN) is the internal metamodel

30

Page 31: Frank Leymann @ BPMN 2010

What Determines an Engine’s Native Metamodel?

What the engineers building the engine chose to ensure efficiency, scalability etc of the execution!y, yModeling language(s) to be supported at time of creation of first release of process engine has deep p g pimpact on its native metamodel Good engine engineers take care about generality g g g yand extensibility of native metamodel striving towards “straightforward” support of extensions of original modeling language(s) and even new modeling languagesTypically, users of a BPEL engine are not aware of the engine’s native metamodel and how different it is f BPEL t d l it lf

© Frank Leymann

from BPEL as a metamodel itself

31

Page 32: Frank Leymann @ BPMN 2010

The Role of Deployment

Logical Process Model

Conceptual Process Model

Model Import

Logical Process Model

WFMSDeployment

Transformation

Engine

© Frank Leymann 32

Page 33: Frank Leymann @ BPMN 2010

Deployment

Deployment = Putting process model into productionI k it d f tiI.e. make it ready for execution

Deployment typically translates the corresponding 

model data into a different format e gmodel data into a different format, e.g.

Imported model might be specified in a metamodel 

d ff f h h d ldifferent from what the WFMS supports directlySee next!

…plus many other things happen

© Frank Leymann

p y g pp

33

Page 34: Frank Leymann @ BPMN 2010

Deployment: Key Aspect

<process …><sequence>

Navigator…

<flow>…

</flow>

Model Cache Instance Cache

NavigationLogic

</sequence></process>

Logic ...

Deployment

Activity Control Link Activity Instance

Process Engine Database

Activity Control Link Activity Instance

Name AID JCond … Source Target TCond … PIID AIID AID …...

© Frank Leymann 34

Page 35: Frank Leymann @ BPMN 2010

Native Support of a Metamodel

Each workflow engine supports a particular metamodel nativelyyTypically, the native metamodel supported is…

reflected in the database of the WFMSdatabase schema holds instances of metamodel constructs immediatelydatabase schema is tuned towards supporting the navigator optimallypp g g p y

reflected in the state model of the WFMSall metamodel constructs have a set of states and transitions between themthemstate model is reflected in monitoring model and audit trail

directly implemented in the navigator of the WFMSnavigator understands each metamodel construct directly, their states and valid transitions, the relation between the states of different artifacts

© Frank Leymann

this implementation is “optimal”

35

Page 36: Frank Leymann @ BPMN 2010

Transformation During Deployment: Example

BPEL Tool

BPEL

Parse file and store artifactsinto internal optimized tables

FDLTables

into internal optimized tables

Workflow Enactment ServiceWorkflow Enactment Service

© Frank Leymann 36

Page 37: Frank Leymann @ BPMN 2010

Transformation During Deployment: Example

BPEL Tool

BPEL

Transform to proprietary metamodelWPDL

Workflow Enactment Service

Store artifacts into internal tables

WPDLTables

Workflow Enactment Service

© Frank Leymann 37

Page 38: Frank Leymann @ BPMN 2010

Transformation During Deployment: Example

BPMN Tool

BPMN

BPEL BPEL

Workflow Enactment Service

Tables

Workflow Enactment Service

© Frank Leymann 38

Page 39: Frank Leymann @ BPMN 2010

Model Transformations

Process models specified in a different metamodel than the engine’s native metamodel may bethan the engine s native metamodel may be transformed into this native metamodel supported by a particular WFMSa particular WFMS

This way, a WFMS supporting WPDL natively may execute a BPEL model after corresponding 

f f ltransformation, for example

This way, a WFMS supporting BPEL natively may execute a BPMN model after corresponding 

© Frank Leymann

p gtransformation, for example

39

Page 40: Frank Leymann @ BPMN 2010

Problems of Model Transformations

Such transformations are not always faithful, i.e. the transformed model has different…

semantic behavior than the original model…semantic behavior than the original modelE.g. behavior of the source model has to be “emulated” in the target model – if possible at allg p

E.g. BPEL exception behavior is hard to emulate

…operational behavior than the original modelE.g. the navigator performs the transformed model less efficient than a WFMS supporting the metamodel of the original model

E g supporting FDL data flow in BPEL is cumbersome

© Frank Leymann

E.g. supporting FDL data flow in BPEL is cumbersome

40

Page 41: Frank Leymann @ BPMN 2010

Supporting One Metamodel Within Another

Metamodel M1

(BPEL)Metamodel M1++

(BPEL++)

MetamodelM2

(BPEL)

Activities

(BPEL )

ActivitiesMetamodel M(BPMN 2.0)

ActivitiesLinkFlow

ct t esLinkFlow

ActivitiesControl FlowData Flow

AssignLink

dataLink

Choreos

??? T l

BPEL‐DInefficient!

??? Topology

BPEL4ChorImpossible!

© Frank Leymann 41

Page 42: Frank Leymann @ BPMN 2010

Extending a Given Metamodel

Assume that models specified in a particular metamodel M2

must be “best” supported in an engine with a different M1metamodel M1

Th t t fM2 th t h d t l t i M1 tThen, constructs of M2 that are hard to emulate in M1 must be identified and corresponding constructs must be added to M1

This is why BPEL is designed to be extensible, to allow new constructs to be added to BPEL to facilitate optimal mappings from different metamodels

That way, an extended variant of a given engine (an M1++

engine) may actually support process models specified in

© Frank Leymann

engine) may actually support process models specified in different metamodels M2,M3,…, Mn

42

Page 43: Frank Leymann @ BPMN 2010

The Dawn of BPMN Engines

BPMN Tool

BPMN2.0

BPMN BPMN

Workflow Enactment Service

2.0 Tables

Workflow Enactment Service

© Frank Leymann 43

Page 44: Frank Leymann @ BPMN 2010

…and it Might Get Surprising ☺

BPEL Tool

BPEL

BPMN BPMN

Workflow Enactment Service

2.0 Tables

Workflow Enactment Service

© Frank Leymann 44

Page 45: Frank Leymann @ BPMN 2010

AgendaAgendaHistorical RemarksHistorical RemarksBPMN Origin and PositioningThe Notion of “Native Metamodel”View on Process EnginesView on Process EnginesSelective BPMN 2.0 Features

Executable BPMN ‐ BPEL Mapping

SummarySummary

© Frank Leymann 45

Page 46: Frank Leymann @ BPMN 2010

Consequence For BPMN 2.0 Engines

Whether the BPMN 2.0 process model is executed by a BPEL engine or by a new BPMN 2.0 engine is not iimportantNative metamodel of a BPMN 2.0 engine is likely to be different from BPMN 2 0 as a metamodel anyhowdifferent from BPMN 2.0 as a metamodel anyhowNative metamodel of a BPMN 2.0 engine might be one that supports also BPEL todayI.e. vendor of a BPEL engine that provides import capabilities for BPMN 2.0 process models might become a vendor of a BPMN 2 0 engine based on the very samevendor of a BPMN 2.0 engine based on the very same execution engineIt is absolutely valid that an intermediate BPEL process model from the BPMN 2.0 process model is generated before the actual import takes place

users might not even be aware of this intermediate BPEL

© Frank Leymann

…users might not even be aware of this intermediate BPEL format at all

46

Page 47: Frank Leymann @ BPMN 2010

What is Important About a Process Engine?

Far more important than the native metamodel of a process engine (BPMN 2 0 engine too) is itsprocess engine (BPMN 2.0 engine too) is its robustness, efficiency, scalability etc

Providers of today’s BPEL engines typically have invested a lot into these non‐functional properties of their engines

Thus, such vendors have the capabilities to also offer , pBPMN 2.0 engines with the very same non‐functional properties

© Frank Leymann

p p

47

Page 48: Frank Leymann @ BPMN 2010

A DBMS Analogy

In the past, new upcoming vendors implemented dedicated object oriented database systems OODBMSj y

The object model was natively supported by these DBMS

But robustness, efficiency, scale,… was often lacking by such systemsby such systems

Over time established RDBMS vendors supported keyOver time established RDBMS vendors supported key constructs of the object paradigm while providing robustness, efficiency, scale,…robustness, efficiency, scale,…

OODBMS are no mainstream anymore

© Frank Leymann

OODBMS are no mainstream anymore

48

Page 49: Frank Leymann @ BPMN 2010

Extrapolation to Process Engines

BPMN 2.0 is significantly more complex than BPELThus vendors will subset BPMN 2 0 based on theirThus, vendors will subset BPMN 2.0 based on their customers’ requirementsIt is likely that no vendor will support all of BPMN 2 0It is likely that no vendor will support all of BPMN 2.0 

in its productBPEL engines will get extended over the time toBPEL engines will get extended over the time to support key features of BPMN 2.0 that are missing in BPEL and BPEL engines todayg yBPEL engines will evolve to support relevant BPMN 2.0 features (those missing in BPEL today)( g y)So, relax and wait until today’s process engines support missing BPMN features (but robust, efficient, 

© Frank Leymann

pp g ( , ,scaling,…)

49

Page 50: Frank Leymann @ BPMN 2010

AgendaAgendaHistorical RemarksHistorical RemarksBPMN Origin and PositioningThe Notion of “Native Metamodel”View on Process EnginesView on Process EnginesSelective BPMN 2.0 Features

Executable BPMN ‐ BPEL Mapping

SummarySummary

© Frank Leymann 50

Page 51: Frank Leymann @ BPMN 2010

How Execution is Enabled

Many execution relevant information is only available via the BPMN 2 0 schemavia the BPMN 2.0 schema

I.e. the graphical notation by far does not contain the information required to instantiate a BPMN process model and execute it

The corresponding syntactical details are given in the BPMN 2.0 spec as UML Class Diagrams and XML p gSchema Definitions

But the given operational semantics

© Frank Leymann

But the given operational semanticsdoes not match this level of detail

51

Page 52: Frank Leymann @ BPMN 2010

Data Context In Processes

<import importType="http://www.w3c.com/XMLschema" location="CustomerInfo.xsd" namespace="http://example.omg.org/Sample"/>

<itemDefinition id="customerStructure" structureRef="sd:customer"/>

<dataObject id="CustomerDataObject"<dataObject id= CustomerDataObject name="Data Object to store Customer Information" itemSubjectRef="tns:customerStructure"/>

© Frank Leymann 52

Page 53: Frank Leymann @ BPMN 2010

Messages In Processes

<itemDefinition id="tasksvcCustomerMessageStructure"gstructureRef="tasksvc:MyFirstTaskServiceRequestMessage"/>

<message id="myServiceCustomerMessage" name="MyFirstTaskService Request Message"name= MyFirstTaskService Request MessagestructureRef="tns:tasksvcCustomerMessageStructure"/>

© Frank Leymann 53

Page 54: Frank Leymann @ BPMN 2010

Mental Model About Task Input/Output

<serviceTask name="Task" id="Task" ... >...<ioSpecification>

<dataInput id="dataInput" .../><dataOutput id="dataOutput" .../>

</ioSpecification>

<dataInputAssociation><sourceRef>InputDataObject</sourceRef><sourceRef>InputDataObject</sourceRef><targetRef>dataInput</targetRef>

</dataInputAssociation>

<dataOutputAssociation>< R f>d t O t t</ R f><sourceRef>dataOutput</sourceRef><targetRef>OutputDataObject</targetRef>

</dataOutputAssociation>

...

© Frank Leymann 54

</serviceTask>

Page 55: Frank Leymann @ BPMN 2010

Transforming Data Objects to Task Data

<serviceTask name="myTask" id="myTask" ... >...<ioSpecification>

<dataInput id="myTaskInput" .../>/<dataOutput id="myTaskOutput" .../>

</ioSpecification>

<dataInputAssociation><assignment>

<from>bpmn:getDataObject('InputDataObject')/XPath</from><assignment>*| <t f >?

<assignment>*| <t f >?<from>bpmn:getDataObject('InputDataObject')/XPath</from>

<to>bpmn:getDataInput('myTaskInput')/XPath</to></assignment><sourceRef>InputDataObject</sourceRef><targetRef>myTaskInput</targetRef>

</dataInputAssociation>

| <transform>? | <transform>?

</dataInputAssociation>

<dataOutputAssociation><transformation> expression </transformation><sourceRef>myTaskOutput</sourceRef><targetRef>OutputDataObject</targetRef><targetRef>OutputDataObject</targetRef>

</dataOutputAssociation>...

</serviceTask>

© Frank Leymann 55

Page 56: Frank Leymann @ BPMN 2010

Summary: Important Relations For Input/Output

.wsdl/msg via  itemDefinition

<serviceTask name="Task" id="Task" ... >...<ioSpecification>

<dataInput /><dataInput .../><dataOutput .../>

</ioSpecification>

<dataInputAssociation>< R f> </ R f><sourceRef>...</sourceRef><targetRef>...</targetRef>

</dataInputAssociation>...

</serviceTask>

© Frank Leymann 56

Page 57: Frank Leymann @ BPMN 2010

Defining Interfaces

<itemDefinition id="ServiceInputMessageStructure"structureRef="fl:MyFirstTaskServiceRequestMessage"/>

Imported .wsdl (or .xsd or…)

3. structureRef fl:MyFirstTaskServiceRequestMessage /><itemDefinition id="tasksvcResultMessageStructure"

structureRef="fl:MyFirstTaskServiceResponseMessage"/>

<message id="myServiceInputMessage" name="My Request Message"structureRef="tns:ServiceInputMessageStructure"/>

<message id="myServiceResultMessage".../>

2.

<interface id="MyInterface" name="MyInterface">

<operation id="MyOperation" name="MyOperation">

<i M R f>t S i I tM </i M R f>

1.

<inMessageRef>tns:myServiceInputMessage</inMessageRef><outMessageRef>tns:myServiceResultMessage</outMessageRef>

</operation></interface>

© Frank Leymann 57

Page 58: Frank Leymann @ BPMN 2010

Service Tasks

<interface id="MyInterface" name="MyInterface">

<operation id="MyOperation" name="MyOperation">

<inMessageRef>tns:myServiceInputMessage</inMessageRef><outMessageRef>tns:myServiceResultMessage</outMessageRef>

</operation></interface></interface>

<serviceTask id="MyTask" name="MyTask" operationRef="tns:MyOperation">

<ioSpecification><d t I t id "D t I t" "D t t b d t i " /><dataInput id="DataInput" name="Data to be send to service" .../><dataOutput id="DataOutput" name="Result Output" .../>...

</ioSpecification> ...

</serviceTask>

© Frank Leymann 58

Page 59: Frank Leymann @ BPMN 2010

Early Binding of Interfaces

<process id="ServiceTaskProecss" name="My Process">

<partnerRole id="SvcProviderRole" name="Provider of Service Implementation"/>...

<collaboration id="MyCollab" name="Service Task Collaboration"><participant id="ServiceProvidingPartner"

name="Partner Providing Service Implementations"><partnerRolRef>tns:SvcProviderRole</partnerRoleRef><interfaceRef>tns:BillingInterface</interfaceRef><interfaceRef>tns:PaymentInterface</interfaceRef><endPointRef>tns:MyBillingEndpoint</endPointRef><endPointRef>tns:MyPaymentEndpoint</endPointRef>

</participant><participant id="OrderProcess"

name="Process using services"><processRef>ServiceTaskProcess</processRef>...

</participant>...

</ ll b ti ></collaboration><endPoint id="MyBillingEndpoint"> e.g. an EPR </endPoint><endPoint id="MyPaymentEndpoint"> e.g. an EPR </endPoint>

Endpoint of the implementation of the interface

© Frank Leymann 59

Page 60: Frank Leymann @ BPMN 2010

Multi‐Instance Task

<dataObject isCollection="true" ... id="DataObject1"/><dataObject isCollection="true" ... id="DataObject2"/>

<serviceTask name="MyMIService" id="MyMIService">An “internal” multi‐instancedata object for each element

1.<serviceTask name MyMIService id MyMIService >

<multiInstanceLoopCharacteristics isSequential="false"><loopDataInput>MultInstServiceInput</loopDataInput><loopDataOutput>MultInstServiceOutput</loopDataOutput><inputDataItem id="singleMemberInput"/>

data object for each elementof which a separateinstance of the task

is created

<inputDataItem id="singleMemberInput"/><outputDataItem id="singleMemberOutput"/>

</multiInstanceLoopCharacteristics>

<ioSpecification>

An element (i.e. “item”) of themulti‐instance loop data input/output

2.

<dataInput id="MultInstServiceInput" ... isCollection="true"/><dataOutput id="MultInstServiceOuput" ... isCollection="true"/>

</ioSpecification>

<dataInputAssociation ...>p<sourceRef>DataObject1</sourceRef><targetRef>MultInstServiceInput</targetRef>

</dataInputAssociation><dataOutputAssociation ...>

<sourceRef>MultInstServiceOutput</sourceRef><sourceRef>MultInstServiceOutput</sourceRef><targetRef>DataObject2</targetRef>

</dataOutputAssociation>

</serviceTask>

© Frank Leymann 60

Page 61: Frank Leymann @ BPMN 2010

AgendaAgendaHistorical RemarksHistorical RemarksBPMN Origin and PositioningThe Notion of “Native Metamodel”View on Process EnginesView on Process EnginesSelective BPMN 2.0 Features

Executable BPMN ‐ BPEL Mapping

SummarySummary

© Frank Leymann 61

Page 62: Frank Leymann @ BPMN 2010

Basic Principle

A (recursive) function [..] is specified that allows to map a subset of BPMN to BPELmap a subset of BPMN to BPEL 

This map is specified by describing:1 [ ] f ll l BPMN k h b d1. [t] for all elementary BPMN tasks t that can be mapped to 

BPEL

2 [e] for all elementary BPMN events e that can be mapped2. [e] for all elementary BPMN events e that can be mapped to BPEL

3 [s] for all BPMN structures s that have a straight‐forward3. [s] for all BPMN structures s that have a straight‐forward mapping to BPEL

This constructively defines the BPMN subset that canThis constructively defines the BPMN subset that can be mapped, as well as the associated map [..] itself

© Frank Leymann 62

Page 63: Frank Leymann @ BPMN 2010

Mapping a Process

© Frank Leymann 63

Page 64: Frank Leymann @ BPMN 2010

Mapping Data

© Frank Leymann 64

Page 65: Frank Leymann @ BPMN 2010

Mapping Messages and Interfaces

© Frank Leymann 65

Page 66: Frank Leymann @ BPMN 2010

Mapping Correlations

© Frank Leymann 66

Page 67: Frank Leymann @ BPMN 2010

Mapping Tasks

<invoke name="[Task-name]"partnerLink="[Task-serviceRef]"portType="[Task-operation-interface]"operation="[Task-operation]">

=SendTask

=NoneTask

<empty name="[Task-name]"></empty>

operation [Task operation] ></invoke>

© Frank Leymann 67

Page 68: Frank Leymann @ BPMN 2010

Mapping Task Input/Output

© Frank Leymann 68

Page 69: Frank Leymann @ BPMN 2010

Mapping Events (1/2)

© Frank Leymann 69

Page 70: Frank Leymann @ BPMN 2010

Mapping Events (2/2)

© Frank Leymann 70

Page 71: Frank Leymann @ BPMN 2010

Mapping Sequences

© Frank Leymann 71

Page 72: Frank Leymann @ BPMN 2010

Mapping If‐Then‐Else

© Frank Leymann 72

Page 73: Frank Leymann @ BPMN 2010

Mapping Pick

© Frank Leymann 73

Page 74: Frank Leymann @ BPMN 2010

Mapping Flow

© Frank Leymann 74

Page 75: Frank Leymann @ BPMN 2010

Mapping Parallel

© Frank Leymann 75

Page 76: Frank Leymann @ BPMN 2010

Mapping While‐Loops

© Frank Leymann 76

Page 77: Frank Leymann @ BPMN 2010

Mapping Until‐Loops

© Frank Leymann 77

Page 78: Frank Leymann @ BPMN 2010

Mapping Multi‐Instance‐Loop‐Characteristics

© Frank Leymann 78

Page 79: Frank Leymann @ BPMN 2010

Mapping Subprocesses

© Frank Leymann 79

Page 80: Frank Leymann @ BPMN 2010

Mapping Handlers

© Frank Leymann 80

Page 81: Frank Leymann @ BPMN 2010

Mapping Boundary Events (1/4)

© Frank Leymann 81

Page 82: Frank Leymann @ BPMN 2010

Mapping Boundary Events (2/4)

© Frank Leymann 82

Page 83: Frank Leymann @ BPMN 2010

Mapping Boundary Events (3/4)

© Frank Leymann 83

Page 84: Frank Leymann @ BPMN 2010

Mapping Boundary Events (1/4)

© Frank Leymann 84

Page 85: Frank Leymann @ BPMN 2010

AgendaAgendaHistorical RemarksHistorical RemarksBPMN Origin and PositioningThe Notion of “Native Metamodel”View on Process EnginesView on Process EnginesSelective BPMN 2.0 Features

Executable BPMN ‐ BPEL Mapping

SummarySummary

© Frank Leymann 85

Page 86: Frank Leymann @ BPMN 2010

Takeaways

BPMN 2.0……is a significant extension of BPMN 1.x

Ch hi C ll b i C iChoreographies, Collaborations, Conversations,New event types and modes,Event subprocesses,…

allows to specify executable process models…allows to specify executable process models…contains a subset nearly isomorphic to BPEL

Especially, “BPMN 2.0 engines” can be buildProcess engines implement their own internal metamodel

Native BPEL engines are very rare!So will be native BPMN engines!So will be native BPMN engines!

Based on BPMN 2.0 complexity, 100% compliant implementations will take far more than a decade (if they will hit the market at all)hit the market at all)

Do you know a 100% BPEL compliant engine?In practice, most process engines will support both, BPEL and ( b f)

© Frank Leymann

(a subset of) BPMN 2.0

86

Page 87: Frank Leymann @ BPMN 2010

End of DocumentEnd of Document

© Frank Leymann 87