Transformation of BPMN Diagrams to YAWL Nets

9
Transformation of BPMN Diagrams to YAWL Nets JianHong YE School of Computer Science and Technology Huaqiao University, Quanzhou Fujian 362021, China Email: [email protected] Wen SONG School of Mathematics and Computer Engineering Xihua University, Chengdu Sichuan 610039, China Email: [email protected] Abstract— Business Process Modeling Notation (BPMN) is the de facto standard for modeling business processes on a conceptual level. However, BPMN lacks a formal semantics and many of its features need to be further interpret, Consequently that hinders BPMN as a standard to statically check the semantic correctness of models. YAWL (Yet Another Workflow Language) allows the specification of executable workflow models. A transformation between these two languages enables the integration of different levels of abstraction in process modeling. This paper discusses how to transform BPMN diagrams to YAWL nets. The benefits of the transformation are threefold. Firstly, it clarifies the semantics of BPMN via a mapping to YAWL. Secondly, the deployment of BPMN business process models is simplified. Thirdly, BPMN models can be analyzed with YAWL verification tools. Index Terms—BPMN, YAWL, Transformation, Algorithm I. I NTRODUCTION Process modeling is used at different levels of ab- straction. First, models serve to communicate as-is busi- ness processes, pinpoint improvement options, conduct resource and cost analysis and capture to-be processes. The Business Process Modeling Notation (BPMN [1]) is the de facto standard for process modeling at this level. On the other hand languages targeting at technically realizing business processes is used as input for process execution engines. The YAWL [2] is a standard for implementing process-oriented composition of web services, with a strictly defined execution semantics, a first-class concept of “task”, and sophisticated support for data mappings and task-to-resource allocation. BPMN is a graph-oriented language in which con- trolling nodes can be connected in arbitrary way. It primarily targets at domain analysts and is supported by many modeling tools. The notation inherits and combines elements from a number of previously proposed notations for business process modeling, including the XML Pro- cess Definition Language (XPDL) [3] and the Activity Manuscript received Jun 11, 2009; revised Oct 13, 2009; accepted Oct 19, 2009 This work was supported in part by the Science Foundation of Huaqiao University grants 09BS514 and the Special Foundation for Young Scientists of Fujian Province. Diagrams component of the Unified Modeling Notation (UML) [4]. BPMN provides a number of advantages to modeling business processes, it offers a process flow modeling technique that is more conducive to the way of business analysts model and its solid mathematical foundation is expressly designed to map to business execution lan- guages. BPMN is already supported by more than 54 tools (see www.bpmn.org), but in its current form, BPMN lacks the semantic precision which is required to capture fully executable business processes. Consistent with the level of abstraction targeted by BPMN, none of these tools support the execution of BPMN models directly. Close inspection of existing translation from BPMN to BPEL standard, the one sketched in [1], [5]–[7], shows these translations fail to fulfill the key requirements, such as completeness, automation, readability, etc. The translation patterns and algorithms in these papers address issues that arise generally when translating from graph-oriented pro- cess languages to block-structured ones. However, map- ping between graph-oriented and block-structured process definition languages is notoriously challenging, it is likely to require refinement as well as testing and debugging, which defeat the purpose of BPEL as a domain-specific language. Another attempt at defining a formal semantics for a subset of BPMN did so using Petri nets [8]–[11]. The proposed mapping serves not only the purpose of disambiguating the core constructs of BPMN, it also provides a foundation to statically check the semantic correctness of BPMN models. However, their semantics does not properly model multiple instances, exception handling, message flows and OR-join. YAWL is a workflow language specially designed to support the 20 workflow patterns [12] that proposed by Van der Aalst, ter Hofstede, Kiepuszewski and Barros in an intuitive manner. YAWL can be used as a lingua franca to express the behavior of Web services (for example, described using BPEL or OWL-S [13]). YAWL has a well defined formal semantics. Furthermore, the basis on Petri nets provides a firm tool for the formal analysis of real- world services. In order to benefit from the expressive power of YAWL, a large amount of business process 396 JOURNAL OF SOFTWARE, VOL. 5, NO. 4, APRIL 2010 © 2010 ACADEMY PUBLISHER doi:10.4304/jsw.5.4.396-404

Transcript of Transformation of BPMN Diagrams to YAWL Nets

Page 1: Transformation of BPMN Diagrams to YAWL Nets

Transformation of BPMN Diagrams to YAWLNetsJianHong YE

School of Computer Science and TechnologyHuaqiao University, Quanzhou Fujian 362021, China

Email: [email protected] SONG

School of Mathematics and Computer EngineeringXihua University, Chengdu Sichuan 610039, China

Email: [email protected]

Abstract— Business Process Modeling Notation (BPMN) isthe de facto standard for modeling business processeson a conceptual level. However, BPMN lacks a formalsemantics and many of its features need to be furtherinterpret, Consequently that hinders BPMN as a standard tostatically check the semantic correctness of models. YAWL(Yet Another Workflow Language) allows the specificationof executable workflow models. A transformation betweenthese two languages enables the integration of different levelsof abstraction in process modeling. This paper discusseshow to transform BPMN diagrams to YAWL nets. Thebenefits of the transformation are threefold. Firstly, itclarifies the semantics of BPMN via a mapping to YAWL.Secondly, the deployment of BPMN business process modelsis simplified. Thirdly, BPMN models can be analyzed withYAWL verification tools.

Index Terms— BPMN, YAWL, Transformation, Algorithm

I. INTRODUCTION

Process modeling is used at different levels of ab-straction. First, models serve to communicate as-is busi-ness processes, pinpoint improvement options, conductresource and cost analysis and capture to-be processes.The Business Process Modeling Notation (BPMN [1]) isthe de facto standard for process modeling at this level. Onthe other hand languages targeting at technically realizingbusiness processes is used as input for process executionengines. The YAWL [2] is a standard for implementingprocess-oriented composition of web services, with astrictly defined execution semantics, a first-class conceptof “task”, and sophisticated support for data mappingsand task-to-resource allocation.

BPMN is a graph-oriented language in which con-trolling nodes can be connected in arbitrary way. Itprimarily targets at domain analysts and is supported bymany modeling tools. The notation inherits and combineselements from a number of previously proposed notationsfor business process modeling, including the XML Pro-cess Definition Language (XPDL) [3] and the Activity

Manuscript received Jun 11, 2009; revised Oct 13, 2009; acceptedOct 19, 2009

This work was supported in part by the Science Foundation ofHuaqiao University grants 09BS514 and the Special Foundation forYoung Scientists of Fujian Province.

Diagrams component of the Unified Modeling Notation(UML) [4].

BPMN provides a number of advantages to modelingbusiness processes, it offers a process flow modelingtechnique that is more conducive to the way of businessanalysts model and its solid mathematical foundation isexpressly designed to map to business execution lan-guages. BPMN is already supported by more than 54 tools(see www.bpmn.org), but in its current form, BPMN lacksthe semantic precision which is required to capture fullyexecutable business processes. Consistent with the levelof abstraction targeted by BPMN, none of these toolssupport the execution of BPMN models directly. Closeinspection of existing translation from BPMN to BPELstandard, the one sketched in [1], [5]–[7], shows thesetranslations fail to fulfill the key requirements, such ascompleteness, automation, readability, etc. The translationpatterns and algorithms in these papers address issues thatarise generally when translating from graph-oriented pro-cess languages to block-structured ones. However, map-ping between graph-oriented and block-structured processdefinition languages is notoriously challenging, it is likelyto require refinement as well as testing and debugging,which defeat the purpose of BPEL as a domain-specificlanguage. Another attempt at defining a formal semanticsfor a subset of BPMN did so using Petri nets [8]–[11].The proposed mapping serves not only the purpose ofdisambiguating the core constructs of BPMN, it alsoprovides a foundation to statically check the semanticcorrectness of BPMN models. However, their semanticsdoes not properly model multiple instances, exceptionhandling, message flows and OR-join.

YAWL is a workflow language specially designed tosupport the 20 workflow patterns [12] that proposed byVan der Aalst, ter Hofstede, Kiepuszewski and Barros inan intuitive manner. YAWL can be used as a lingua francato express the behavior of Web services (for example,described using BPEL or OWL-S [13]). YAWL has a welldefined formal semantics. Furthermore, the basis on Petrinets provides a firm tool for the formal analysis of real-world services. In order to benefit from the expressivepower of YAWL, a large amount of business process

396 JOURNAL OF SOFTWARE, VOL. 5, NO. 4, APRIL 2010

© 2010 ACADEMY PUBLISHERdoi:10.4304/jsw.5.4.396-404

Page 2: Transformation of BPMN Diagrams to YAWL Nets

models are mapping to YAWL, such as the Event-drivenProcess Chain (EPC) to YAWL [14] and BPEL to YAWL[15].

The transformation from BPMN to YAWL can beused as an instrument to implement process-orientedapplications. It also opens the possibility of reusing staticanalysis techniques available for YAWL. Like Petri nets,YAWL has a formally defined semantics that enables theanalysis of YAWL nets to detect semantic errors suchas deadlocks. Close inspection of existing translationsfrom BPMN to YAWL, e.g. sketched in [16], however,serveral properties and assignments are missing in themapping, the translations fail to fulfill the following keyrequirements: (i) message flows are lost; (ii) transactionsand compensation handlers are not covered; (iii) complexgateways are neglected. At first glance, this mapping mayseem straightforward. Indeed, the conceptual mismatchbetween BPMN and YAWL is not as significant as theone between BPMN and BPEL, especially with regardsto control-flow structures. However, mapping BPMN toYAWL turns out to be tricky in the details, revealingsubtle differences between the two languages.

Our goal is to provide a methodology for transforminga model from BPMN to YAWL. The mapping is in thefollowing five ways:

– Although BPMN and YAWL share most of theirconcepts, there is a fundamental difference in theway of joins and splits are treated in each lan-guage. While BPMN inherits the connector typesfrom EPCs which define them as first class objectsindependent of functions, YAWL includes joins andsplits in task objects. Accordingly, there is no directequivalent in YAWL elements for BPMN connectorchains, i.e. multiple consecutive connectors.

– YAWL requires processes to have only one start andone end condition. In BPMN, multiple start and endevents are allowed.

– BPMN task or subprocess has a lot of attributes,which attributes can be applied in YAWL and whichones should be extended.

– A message flow is used to show the transmissionof messages between two participants via commu-nication actions such as send task, receive task, ormessage event in different pools in BPMN, althoughthe information of pool or lane will be lost inconversion. How to map these messages to flowmessages and not affect the YAWL initial markingis a challenge.

– BPMN exception handling is captured by exceptionflow. The conversion should be clear regarding thesemantics of an exception handler attached on a taskor subprocess.

The rest of the paper is organized as follows. SectionII provides the mathematical notations. Our contributionstarts in Section III, which illustrates the solutions ofthe transformation from BPMN to YAWL. Section IVpresents the structure of the tool implementation and itsapplication to static analysis of BPMN models. Finally,

Section V concludes and outlines future work.

II. BASIC DEFINITIONS

A BPMN process, which uses the core subset of BPMNelements as shown in Figure 1, is referred to as a coreBPMN process. We define the syntax of the core BPD.

Definition 1 (Core BPMN Process): [17]A core BPMN process is a tuple: M =(O, A, ε, g, P, L, T, S, TR,εS , εI , εE , εIφ , εIM , εIT , εIE ,εIC , gAs, gAj , gXs, gXj , geXs, gOs, gOj , F, Cond, Exc,Mes)

– O is a set of objects which can be partitioned intodisjoint sets of activities A, events ε, gateways g.

– A can be partitioned into disjoint sets of tasks Tand subprocesses invocation activities S.

– P/L is a set of pools/lanes. For any node o ∈ O,P (o)/L(o) is a function showing which pool/lanethe object o belongs to.

– TR ⊆ T is a set of receiving tasks.– ε can be partitioned into disjoint sets of start events

εS , intermediate events εI and events εE .– εI can be further partitioned into disjoint sets of

intermediate events without any trigger εIφ , inter-mediate message events εIM , intermediate timerevents εIT , intermediate exception events εIE , andintermediate cancel events εIC .

– g can be partitioned into disjoint sets of parallelfork gateways gAs, parallel join gateways gAj , data-based XOR decision gateways gXs, XOR mergegateways gXj , event-based XOR decision gatewaygeXs, inclusive decision gateways gOs and inclusivemerge gateway gOj .

– F ⊆ O × O is the control flow relation, i.e. a setof sequence flows connecting objects.

– Cond : F ∩ (gXs × O) → C is a function whichmaps sequence flows emanating from data-basedXOR gateways to conditions.1

– Exc : εI → A is a function assigning an intermedi-ate event to an activity such that the occurrence ofthe event signals an exception and thus interruptsthe performance of the activity.

– Mes ⊆ Oi × Oj , P (o′) 6= P (o′′), o′ ∈ Oi ∧ o′′ ∈Oj , i.e. objects belong to different pools.

Definition 1 allows for graphs which are unconnected,not have start or end events, contain objects without anyinput and output, etc. Therefore we need to restrict thedefinition to well-formed core BPMN. Before this, wefirst define the predecessor and successor nodes.

Definition 2 (Predecessor and Successor Nodes): LetO be a set of objects and Edge be a binary relationover O, Edge = F ∪ Cond ∪ Exc. For each node o,we define the set of predecessor nodes •o = {x ∈ O |(x, o) ∈ Edge ∧ o ∈ O \ dom(Exc)}, and the set ofsuccessor nodes o• = {x ∈ O | (o, x) ∈ Edge ∧ o ∈ O}.

1A condition is a Boolean function operating over a set of proposi-tional variables that can be abstracted out of the control flow definition.The condition may evaluate to true or false, which determines whether ornot the associated sequence flow is taken during the process execution.

JOURNAL OF SOFTWARE, VOL. 5, NO. 4, APRIL 2010 397

© 2010 ACADEMY PUBLISHER

Page 3: Transformation of BPMN Diagrams to YAWL Nets

Event

Start Event Intermediate Event End Event

~Activity

Task Multiple Instance Loop SubprocessSubprocess-

Multiple InstanceSubprocess-Loop

Subprocess-

Ad-hoc

receive

GatewayParallel Fork

Gateway

Parallel Join

GatewayData-based XOR

Decision GatewayXOR Merge

Gateway

Event-based XOR

Decision Gateway

Inclusive Decision

Gateway

Inclusive Merge

Gateway

Sequence Flow

Normal Flow Condition Flow Default Flow

Exception Flow

Message Flow

Message Flow

(or)

Lan

e

Pool L

1L

2

SwimLane SwimPool

Figure 1. A core subset of BPMN elements

YAWL Object

(or

Message E,

Timer T,

Exception Ex,

Cancel C)

T

BPMN Object

T

TimT

MesE

default

T

[N,Ninf,Ninf,{dynamic, static}]

[N,Ninf,Ninf,{dynamic, static}]

YAWL ObjectBPMN Object

Figure 2. Activities, Events, Gateways and Sequence flow mapped toYAWL

Definition 3 (Well-formed core BPMN): [17] A coreBPMN process P in Definition 1 is well formed if andonly if relation F satisfies the following requirements:

– ∀s ∈ εS ∪ dom(Exc),•s = φ ∧ |s•| = 1, i.e. startevents and exception events have an in-degree ofzero and an out-degree of one,

– ∀e ∈ εE ,e• = φ ∧ |•e| = 1, i.e. end events have anout-degree of zero and an in-degree of one,

– ∀x ∈ A ∪ (εI\dom(Exc)), |•x| = 1 and |x•| = 1,i.e. activities and non-exception intermediate eventshave an in-degree of one and an out-degree of one,

– ∀g ∈ gAs ∪ gXs ∪ geXs ∪ gOs : |•g| = 1∧ |g•| > 1,i.e. fork or decision gateways have an in-degree ofone and an out-degree of more than one,

– ∀g ∈ gAj ∪ gXj ∪ gOj : |•g| > 1 ∧ |g•| = 1, i.e.join or merge gateways have an out-degree of oneand an in-degree of more than one,

– ∀g ∈ geXs, g• ⊆ εIM ∪ εIT ∪ TR, i.e. event-based XOR decision gateways must be followedby intermediate message or timer events or receivetasks.

– ∀g ∈ gXs,∃x ∈ g•,Cond((g, x)) = ¬∧y∈g•\{x} =Cond((g, y)), i.e. (g, x) is the default flow amongall the outgoing flows from g,

– ∀x ∈ O,∃s ∈ εS ∪ dom(Exc),∃e ∈ εE ,sF ∗x ∧xF ∗e, i.e. every object is on the path from a startevent or an exception event to an end event.

Definition 4 (YAWL-Net): [2] A YAWL-net N is de-fined as a tuple (C, i, o, T, F low, split, join, rem, nofi)such that:

– C is a set of conditions.– i ∈ C is the unique input condition.– o ∈ C is the unique output condition.– T is a set of tasks.– Flow ⊆ (C \ {o} × T )∪ (T ×C \ {i})∪ T × T is

the flow relation.

– split : T → {AND, XOR, OR} specifies the splitbehavior of each task.

– join : T → {AND, XOR, OR} specifies the joinbehavior of each task.

– rem : T → ρ(T ∪C \ {i, o}) specifies the token tobe removed from the tasks and conditions given inthe mapping.

– nofi: T → N ×N inf ×N inf ×{dynamic, static}specifies the multiplicity of each task (minimum,maximum, threshold for continuation, and dy-namic/static creation of instances).

III. FROM BPMN TO YAWLWe only consider map well-formed core BPMN di-

agrams to YAWL nets in this paper, using simplifiednotation M = (O, P,L, F,Exc, Mes) for their represen-tation. The study is focused on control-flow constructs.

A. Activities, Events, Gateways, Sequence flow and Mes-sage Flow

Figure 2 gives the transformation from a set of BPMNactivities, events, gateways and sequence flows. An inter-mediate event or task is mapped to an atomic task withone input and output. The other activities except for Ad-hoc subprocess are mapped onto corresponding compositetask or multiple instance tasks with one predecessor andone successor. BPMN start and end events are easy totransform if there is only one. In this case, the BPMNstart event maps to YAWL input condition and the endevent to a output condition. Multiple start and end eventswill be discussed in the Section III-B.

As gateways are independent elements in BPMN,which is allowed to build so-called gateway chains, i.e.paths of two or more consecutive gateways. Splits andjoins in YAWL are only allowed as part of tasks. Asa consequence, there may be need to introduce empty

398 JOURNAL OF SOFTWARE, VOL. 5, NO. 4, APRIL 2010

© 2010 ACADEMY PUBLISHER

Page 4: Transformation of BPMN Diagrams to YAWL Nets

s2s1

e1 e2

s1 s2

e1 e2

Figure 3. Transformation of multiple start and end events

tasks only to map a gateway. Figure 2 illustrates howa gateway is transformed, an additional empty task isrequired to include the join rule or split rule exceptevent-based decision gateways. Especially, an event-basedgateway is captured in a way that the gateway mapped toan empty task with split rule and all the elements of thegateway output corresponding atomic task compete forthe determines which path is taken. Generally, sequenceflow or message flow is transformed to a YAWL flow edgein straight-forward manner. More details are depicted inFigure 2.

B. Transformating Start and End Events

If there are multiple start events, they have to bebundled: the one YAWL input condition is followed byan empty task with an OR-split rule. Each BPMN startevent is then mapped to a YAWL condition that is linkedas a successor. Analogously, each of multiple BPMNend events is mapped to YAWL conditions which are allconnected with an OR-join of an empty task that leadsto the one YAWL output condition. This transformationrule makes these models difficult to analyze, because 2|n|

states have to be considered with n being the amount ofBPNN start or end events. In this case, graph reductionrules could be applied in order to get compacter models.Yet, this issue is beyond the scope of this paper. Theexample is shown in Figure 3.

C. Activities Macro and Ad-hoc construct

An activity in a BPD can have attributes specifyingits additional behavior, these attributes can be set todetermine the values of nofi in the corresponding taskin YAWL. Table I demonstrated how to map the BPMNattributes to the values of nofi.

There is another special attribute for Ad-hoc subprocessactivity. This attribute defines if the activities within theprocess can be performed in parallel or must be performedsequentially. Without lose the generality, the multipleinstance attributes for activities in Ad-hoc subprocess canreferred from Table I. The example in Figure 4 consideredeach activity will be performed one at a time.

Algorithm 1: B Mes2Y Flow(Mes m)Input: εS ;εE ;m ∈ Mes,m = (x, y)|P (x) 6= P (y) . Suppose there

exists an input task tinT ask and output tasktoutT ask ,split(tinT ask) = OR, join(toutT ask) = OR;

Output: yawl flow;if ∀s ∈ εS , ∃x ∈ εE ∪ T ∪ S, s.t.(x, s) ∈ Mes then1

add empty task t′ with join(t′) = XOR to yawl;2add f ∈ Flow ∧ f = (tinT ask, t′) to yawl;3add f ∈ Flow ∧ f = (t′, s•) to yawl;4if x ∈ S ∪ T ∧ |x•| = 1 then5

add f ∈ Flow ∧ f = (x, t′) ∧ split(x) = AND to yawl;6end7else if x ∈ S ∪ T ∧ |x•| = 0 then8

add f ∈ Flow ∧ f = (x, t′) to yawl;9end10else if x ∈ εE then11

add f ∈ Flow ∧ f = (•x, t′) to yawl, delete x;12end13delete s;14

end15if ∀e ∈ εS , ∃y ∈ εS ∪ T ∪ S, s.t.(e, y) ∈ Mes then16

add empty task t′′ with split(t′′) = AND to yawl;17add f ∈ Flow ∧ f = (t′′, toutT ask) to yawl;18add f ∈ Flow ∧ f = (•e, t′′) to yawl;19if x ∈ S ∪ T ∧ |•y| = 1 then20

add f ∈ Flow ∧ f = (t′′, y) ∧ join(y) = AND to yawl;21end22else if x ∈ S ∪ T ∧ |y•| = 0 then23

add f ∈ Flow ∧ f = (t′′, y) to yawl;24end25else if y ∈ εS then26

add f ∈ Flow ∧ f = (t′′, y•) to yawl, delete y;27end28delete e;29

end30while |Mes| 6= φ do31

if x ∈ (T ∪ S) ∧ y ∈ (T ∪ S) then32if |x•| = 0 ∧ |•y| = 0 then33

add f ∈ Flow ∧ f = (x, y) to yawl;34end35else if |x•| = 1 ∧ |•y| = 0 then36

add f ∈ Flow ∧ f = (x, y) ∧ split(x) = AND to37yawl;

end38else if |x•| = 0 ∧ |•y| = 1 then39

add f ∈ Flow ∧ f = (x, y) ∧ join(y) = AND to40yawl;

end41else if |x•| = 1 ∧ |•y| = 1 then42

add f ∈ Flow ∧ f = (x, y) ∧ split(x) =43AND ∧ join(y) = AND to yawl;

end44end45else if x ∈ (T ∪ S) ∧ y ∈ εS then46

if |x•| = 0 then47add f ∈ Flow ∧ f = (x, y•) to yawl;48

end49else if |x•| = 1 then50

add f ∈ Flow ∧ f = (x, y•) ∧ split(x) = AND to51yawl;

end52delete εS ;53

end54else if x ∈ εE ∧ y ∈ (T ∪ S) then55

if |•y| = 0 then56add f ∈ Flow ∧ f = (•x, y) to yawl;57

end58else if |•y| = 1 then59

add f ∈ Flow ∧ f = (•x, y) ∧ join(y) = AND to60yawl;

end61delete εE ;62

end63else if x ∈ εE ∧ y ∈∈ εS then64

add f ∈ Flow ∧ f = (•x, y•) to yawl, delete εE and εS ;65end66

end67

JOURNAL OF SOFTWARE, VOL. 5, NO. 4, APRIL 2010 399

© 2010 ACADEMY PUBLISHER

Page 5: Transformation of BPMN Diagrams to YAWL Nets

TABLE I.HOW TO MAP THE BPMN ATTRIBUTES TO THE VALUES OF nofi

BPMN activity attributes YAWL task nofi

LoopType LoopMax LoopCondition TestTime nofi

standard m The expression xq3 should determine how many instances of activities are to be created before [0, m, xq3, static]standard m The expression xq3 should determine how many instances of activities are to be created after [1, m, xq3, static]

BPMN activity attributes YAWL task nofi

LoopType LoopMax MICondition MIOrdering MIFlow Condition nofi

multiInstance m All activity instances should generate a tokenwhen the instance is completed

parallel none [n, m, m, static]

multiInstance m The token should continue past the activity afterall of the activity instances have completed

parallel all [m, m, m, static]

multiInstance m Only one token can passed from the activity parallel one [1, m, 1, static]

multiInstance dynamic The Expression should determine when and howmany tokens will continue past the activity

parallel complex [xq1, xq2, xq3, dynamic]

Note that the n, m is integer and the expression xqi(i = 1, 2, 3) is evaluated at run time to help determine how many instances of activitiesare to be created. The LoopCondition and MICondition will be replaced in a mathematical expression to be either tested as True or False or tobe evaluated to update the value of Properties in actual use

~

A

B input

inTask

output

outTask

B

A

~

A

B

AdhocOrdering attribute set

to Sequential

AdhocCompletionCondition

set to include the completion

of Task A and B

input

inTask

output

outTask

B

A

AdhocOrdering attribute set

to Parallel

AdhocCompletionCondition

set to include the completion

of Task A and B

Figure 4. Transformation of Ad-hoc subprocess with different attributeof AdhocOrdering

D. Message Flow

The information of pools and lanes will be lost inthe conversion. However, some related information suchas message flow should be inherited. Message flows areused to model message passing between organizationsor applications. It can be mapped to a flow message inYAWL and modify some objects’ join or split attribute.Some special cases for the mapping involves the startevent and end event. Mapping rules are established fordistinguish these cases. Algorithm 1 gives the methodfor mapping the message flow. Figure 5 shows someexamples with special rules. Note that in Definition 2, thepredecessor or successor of nodes and the binary relationbetween them do not include message flow. On the otherhand, some detail discussions involving activity attributessuch as receive task, user task, service task etc. refer to[17].

E. Exception Handling

While the intermediate event is attached to the bound-ary of an activity, either a task or a subprocess, they createan exception flow. The event will respond to specifictriggers to interrupt the activity and redirect the flowthrough the intermediate event. The source of the triggermay from external or caused by a “throw” intermediateevent from any other active in the process. YAWL presentsa direct and intuitive support of the remove tokens, soundslike “vacuum cleaner” removing tokens from selectedparts of a net. At the same time, we have to imposeone restriction that a subprocess associated with exceptionhanding is not allowed to be interrupted by the occurrenceof the exception event in itself, which will violate the sealprinciple in a subprocess. This is ambiguous in the BPMNspecification states. We will describe two different sourceof the trigger circumstances in the following:

Firstly, assuming the Timer, Message, Exception andError trigger will be invoked from the external of theprocess execution, Figure 6(1) shows the mapping of anexception associated with a task or subprocess via anexception task and cancel arc in YAWL.

Secondly, except the Timer trigger, an intermediateevent attached on a task or subprocess will be invokedby an event occurs, and location in the process withthe name exact consistency. Assuming there are twointermediate events with the same name, if ambiguity ispossible, we use throw or catch as subscript convenientfor marking their positions in the process. For example,ithrow is an intermediate exception event in the process,and icatch refer to an intermediate event associated witha task invoking exception handing activities by ithrow.Figure 6(2) depicts the mapping, Algorithm 2 shows theexception flow conversion algorithm.

400 JOURNAL OF SOFTWARE, VOL. 5, NO. 4, APRIL 2010

© 2010 ACADEMY PUBLISHER

Page 6: Transformation of BPMN Diagrams to YAWL Nets

Pro

cess

P1

Pro

cess

P2

Pro

cess

P1

Pro

cess

P2

t’1 t”1

t’2 t”2

Pro

cess

P1

Pro

cess

P2

Pro

ces

s P

1P

roce

ss P

2

Pro

ces

s P

1P

roce

ss P

2

inTask outTask

(1) multual process instantiaton

dependency

(2) task(subprocess) to task(subprocess) (3) task(subprocess) to start event

(4) end event to task(subprocess) (5) end event to start event

Figure 5. Examples of BPMN message flow to YAWL flow

icatch

g1

outTask

(2) Trigger is caused by a “throw”

intermediate event in the process

ithrow

t1

t2

t3

g2

t2

t1g1

g2

t3

ithrow

icatch

(1) Trigger is external of the process

t1

s1

t2

t2

t1

s1

t2

Timer T

t2

Exception Ex

Figure 6. Mapping of exception flow

(1)

t t t

(2)

s s

(3)

s

Figure 7. Reduction of connector chains events

Algorithm 2: B Exc2Y Flow(Exc e)Input: e ∈ Exc,e = (x, y)|x ∈ εI , y ∈ O, r is the Task(Subprocess)

associated with x on the boundary;Output: yawl flow;if Name(x) is not exclusive, i.e.1∃z ∈ εI ∧ |•z| 6= φ ∧Name(x) ≡ Name(z) then

map x to a task;2add cancel edge(r, x) to yawl;3map z to a task and Split(z) = AND;4add f ∈ Flow ∧ f = (z, x) to yawl;5

end6else7

map x to a task;8add cancel edge (r, x) to yawl;9

end10

F. Transformating gateway chains

As joins and splits are first class elements of BPMNwhile in YAWL they are part of tasks. As a consequence,there may be need to introduce empty tasks only to mapa connector. This is in particular the case with connectorchains. Figure 7(1) illustrates how a connector chain istransformed. If a join connector is followed by a split, theycan be combined into one empty task. Otherwise, splitsand joins can be combined with the pre-event predecessorfunction or the post-event successor function, respectively.

In addition, if there have a split connector as the suc-cessor of one task (subprocess), which can be embeddedinto the task(subprocess). It is similar with a task (sub-process)’s predecessor. Figure 7(2) and (3) respectivelyshow these possible.

G. Tranformation Algorithm and ExampleWe traverse the BPMN process graph and take ad-

vantage of the fact that YAWL does not enforce analternation of tasks and conditions. Basically, we ignoreevents except start or end events. Therefore, most states ofthe generated YAWL process model are associated withimplicit conditions.

Based on the mapping of each of the componentsaforementioned, we now define an algorithm to translatea well-formed core BPD into YAWL. The algorithmis arranged in two stages, the first stage is dependingon the type of the current node, its predecessor nodesand successor nodes, respective elements of the YAWLtarget model are generated. The second stage is reducinggateway chains if necessary. These steps repeated until noelements can be folded.

Now, we can analyze the complexity of the algorithm 3.Given a well-formed BPD M = (O, P,L, F,Exc, Mes),

JOURNAL OF SOFTWARE, VOL. 5, NO. 4, APRIL 2010 401

© 2010 ACADEMY PUBLISHER

Page 7: Transformation of BPMN Diagrams to YAWL Nets

Algorithm 3: WF BPMN2YAWL (BPD M )Input: a well-formed BPD M = (O, P, L, F, Exc, Mes);Output: a yawl model

Y = (C, i, o, T, F low, split, join, rem, nofi);Add YAWL input and output condition:i ∈ C and o ∈ C;1if |εS | > 1 then2

add OR split task tinT ask ;3end4if |εE | > 1 then5

add OR join task toutT ask ;6end7while |M | 6= φ do8

for ∀node ∈ Mes; if node is not be mapped; M = M \node do9B Mes2Y Flow(node);10

end11M = M \ (P ∪ L);12for ∀node ∈ Exc; if node is not be mapped; M = M \ node do13

B Exc2Y Flow(node);14end15for ∀node ∈ O; ; M = M \ node do16

if node ∈ εS (or node ∈ εE ) then17add c ∈ C and •node = tinT ask (or18node• = toutT ask);

end19if node ∈ g then20

add empty task with corresponding split or join type;21end22if node ∈ T then23

add task to YAWL with corresponding attributes;24end25if node ∈ S then26

add composite task to YAWL, all elements in this27subprocess is represented bynode = (O′, P ′, L′, F ′, Exc′, Mes′), and DoWF BPMN2YAWL( node);

end28if node ∈ F then29

add an flow edge to YAWL;30end31

end32if tx, ty is close relations in YAWL ∧ there are two empty task or33one is task (composite task) and the other is empty task∧t•x = ty ∧• ty = tx then

tx and ty can be fold to a new task(composite task)t,34•t =• tx ∧ t• = t•y ;

end35end36

For each transformation of BPMN node, the conversionoperation is performed in linear time and the algorithmwill be completed. The completeness is granted becauseBPMN are coherent; every node will be ultimately pro-cessed when navigation begins from the start events. Inthe extreme case, the algorithm will terminate when eachnode is processed exactly once (no influence by the ex-ception handling event). Assuming that converse a BPMNobject onto a YAWL element is trivial, the complexity ofthe algorithm is O(|O|+ |P |+ |L|+ |F |+ |Exc|+ |Mes|).

We present the complaint handling process modelshown in Figure 8. This example has been taken from[5]. We use this example to illustrate how a BPD canbe translated into a YAWL net. First the complaint isregistered (task register) then in parallel a questionnaireis sent to the complainant (task send questionnaire)and the complaint is evaluated (task evaluate). If thecomplainant returns the questionnaire within two weeks(event returned-questionnaire), task process questionnaireis executed. Otherwise (event timeout), the result of thequestionnaire is discarded. After either the questionnaireis processed or a time-out has occurred, the result needs tobe archived (task archive), and in parallel, if the complaintevaluation has been completed, the actual processing of

Figure 9. Structure of the BPMN to YAWL transformation

the complaint (task process complaint) can start. Next,the processing of the complaint is checked via task checkprocessing. If the check result is not ok, the complaintrequires re-processing. Otherwise, if the check resultis ok and also the questionnaire has been archived, anotice will be sent to inform the complainant about thecompletion of the complaint handling (task send notice).Figure 8 sketches the translation procedure following thetranslation algorithm as mentioned above.

IV. EMPIRICAL EVALUATION

As a proof of concept we have implemented the al-gorithm, an open-source plug-in called BPMN2YAWLis available in ProM 5.0. Each reader interested in thisfield can use the http://www.processmining.org web pagefor a more complete overview and download the latestversion. Figure 9 shows the structure of the tool that weimplemented.

We use the ILog BPMN Modeler2as a graphical editorto create BPMN models. To the author’s knowledge, noexisting tool for modeling BPMN can perform propertieschecks. We can analyst the BPMN model after themmapped to a YAWL net. The plugin in ProM subsequentlytransforms the BPMN models into a YAWL net and exportthe YAWL net as a XML file. This XML file can serveas input to a YAWL-based verification tool [11], [18]. Alot of properties such as the deaklock free, no dead task,proper completion, no OR-join and soundness [19]–[21]etc, can be checked via these tools.

We tested BPMN2YAWL on a set of models3, somecollected from the BPMN Web log2, and the others aredesigned by the authors. Table II shows the size ofeach tested BPMN models in terms of number of tasks,events, gateways, subprocesses and message flows. It alsoshows the size of the resulting YAWL-nets in terms ofnumber of conditions, atomic tasks and composite tasks.BPMN2YAWL was able to deal with all the models,although preprocessing was needed to transform some ofthem into well-formed BPMN models, how to generate awell BPD refer to [9], [17], [22], [23].

2http://www.ilog.com/products/jviews/diagrammer/bpmnmodeler/3This set of test models are included in the distribution of the

BPMN2YAWL tool, http://is.tm.tue.nl/trac/prom/wiki/TestBPMN

402 JOURNAL OF SOFTWARE, VOL. 5, NO. 4, APRIL 2010

© 2010 ACADEMY PUBLISHER

Page 8: Transformation of BPMN Diagrams to YAWL Nets

register

send

questionnaire

evaluate

process

questionnaire

process

complaint

check

processing

archive

ok

Nok

Send

notice

Returned questionnaire

Time out

register

send

questionnaire

evaluate

Returned

questionnaire

Time out

process

questionnaire

archive

process

complaint

check

processing

Send

notice

register

send

questionnaire

evaluate

Returned

questionnaire

Time out

process

questionnaire

archive

process

complaint

check

processing

Send

notice

ok

Nok

Nok

ok

Figure 8. Translating the complaint handling process model into YAWL

TABLE II.RESULTS OF IMPLEMENTING THE MAPPING TOOL TO EXISTING MODELS

Model No. BPMN Model YAWL nettasks events gateways subprocesses sequence flows message flows composite tasks atomic tasks conditions flows

0 5 4 9 7 6 151 6 5 2 3 8 2 3 16 12 302 20 10 5 6 30 9 6 47 20 813 20 4 28 22 6 344 2 2 2 6 6 4 105 2 4 3 1 6 4 10

Fig 10 shows a screenshot of ProM, generating theYAWL net from the No.1 BPMN model, which violate thedeaklock free and soundness properties via the analysis ofYAWL editor4. Moreover, We detected model 2 containedincomplete process executions. Models 0, 3, 4 and 5 didnot contain any errors.

V. CONCLUSION AND FUTURE WORK

Ongoing work aims at extending the BPMN2YAWLplugin in order to make the transformation reversible.After generating a model, the plugin will be able to prop-agate changes in the YAWL net into the BPMN diagram(and vice-versa) in order to maintain the models syn-chronized. We aim to analyze the whole BPMN processmodels with YAWL verification tools such as WofYAWL[11]. This will provide insight into the correctness oflarge enterprise models described in BPMN. We alsoplan to investigate process mining using BPMN processesand focusing on the OR-join semantic particularities ofBPMN.

4http://www.yawl-system.com/

Figure 10. Screenshot of BPMN model to YAWL net in ProM and theanalysis resulting by YAWL editor

JOURNAL OF SOFTWARE, VOL. 5, NO. 4, APRIL 2010 403

© 2010 ACADEMY PUBLISHER

Page 9: Transformation of BPMN Diagrams to YAWL Nets

ACKNOWLEDGMENT

The authors wish to thank W.M.P. van der Aalst, RemcoM.Dijkman and Xun PU for their careful reading of anearlier version of this paper.

REFERENCES

[1] O. M. Group, Business Process Modeling Notation(BPMN) Version 1.0. OMG Final Adopted Specification,Object Management Group, 2006.

[2] W. Aalst and A. Hofstede, “YAWL: Yet Another WorkflowLanguage,” Information Systems, vol. 30, pp. 245–275,2005.

[3] WFMC, “Workflow Management Coalition WorkflowStandard: Workflow Process Definition Interface-XMLProcess Definition Language (XPDL) (WFMC-TC-1025),”Workflow Management Coalition, Tech. Rep., 2002.

[4] O. M. Group, Unified Modeling Language: Superstructure.UML Superstructure Specification v2.0, formal, ObjectManagement Group, 2005.

[5] C. Ouyang, M. Dumas, A. Hofstede, and W. Aalst, “FromBPMN process models to BPEL Web Services,” in On the4th International Conference on Web Services (ICWS’06).IEEE, Chicago, Illinois, USA, 2006.

[6] C. Ouyang, M. Dumas, and A. Hofstede, “Pattern-basedTranslation of BPMN Process Models to BPEL Web Ser-vices,” in International Journal of Web Service Research,vol. 5, 2007, pp. 42–62.

[7] C. Ouyang, M. Dumas, S. Breutel, and A. Hofstede,“Translating standard process models to BPEL,” BPMcen-ter.org, Tech. Rep., 2005.

[8] M. Remco and C. Ouyang, “Formal Semantics and au-tomated analysis of BPMN process models,” QueenslandUniversity of Technology, Tech. Rep., 2007.

[9] Y. Peter and J. Gibbons, “A Process Semantics for BPMN,”Oxford University Computing Laboratory, Tech. Rep.,2007.

[10] M. Dumas, A. Grosskopf, T. Hettel, and M. Wynn,“Semantics of Standard Process Models with OR-Joins,”Queensland University of Technology, Tech. Rep., 2007.

[11] H. Verbeek and W. Aalst, “Woflan 2.0: A Petri-net-basedWorkflow Diagnosis Tool,” in Application and Theory ofPetri Nets 2000, ser. Lecture Notes in Computer Science,M. Nielsen and D. Simpson, Eds., vol. 1825. Springer-Verlag, Berlin, 2000, pp. 475–484.

[12] W. Aalst, A. Hofstede, B. Kiepuszewski, and A. Barros,“ Workflow Patterns,” Distributed and Parallel Databases,vol. 14, pp. 5–51, 2003.

[13] O.-S. Coalition, OWL-S: Semantic Markup for Web Ser-vices Version 1.1, Web-Ontology Working Group, 2004.

[14] M. Jan, M. Michael, and N. Gustaf, “Transformation ofyEPC business process models to YAWL,” in Proceedingsof the 2006 ACM symposium on Applied computing (SAC’06), vol. 2. ACM, 2006, pp. 1262–1267.

[15] B. Anotnio and P. Razvan, “From BPEL Processes toYAWL Workflows,” in Proceedings of the 3 rd Interna-tional Workshop on Web Services and Formal Methods(WS-FM 2006), ser. Lecture Notes in Computer Science,vol. 4184. Springer Berlin / Heidelberg, 2006, pp. 107–122.

[16] G. Decker, R. Dijkman, M. Dumas, and L. Garcia-Banuelos, “Transforming BPMN diagrams into YAWLnets,” in Business Process Management 6th InternationalConference, BPM 2008, ser. Lecture Notes in ComputerScience, M. R. M. Dumas and M.-C. Shan, Eds., vol. 5240.Springer-Verlag, Berlin, 2008, pp. 386–389.

[17] M. Remco, M. Dumas, and C. Ouyang, “Formal Semanticsand Analysis of BPMN Process Models using Petri Nets,”Queensland University of Technology, Tech. Rep., 2007.

[18] M. Wynn, D. Edmond, W. Aalst, and A. Hofstede,“Achieving a General, Formal and Deciable Approach tothe OR-join in Workflow using Reset nets,” in Applicationsand Theory of Petri Nets 2005, ser. Lecture Notes inComputer Science, vol. 3536. Springer-Verlag, 2005, pp.423–443.

[19] W. Reisig, Petri Nets: an Introduction, 1st ed. Berlin:Springer-Verlag, 1985.

[20] W. Aalst and K. Hee, Workflow Management: Models,Methods, and systems, 1st ed. Cambridge, MA: MIT,2002.

[21] T. Murata, “Petri nets: Properties, analysis, and applica-tions,” in Proceedings of the IEEE, vol. 77, no. 4. IEEE,1989, pp. 541–580.

[22] J. Camara, C. Canal, J. Cubo, and A. Vallecillo, “Formaliz-ing WSBPEL Business Process using Process Algebra,” inCONCUR’2005 Workshop on the Foundations of Coordi-nation Languages and Software Architectures, vol. ENTCS154. Elsevier, 2005, pp. 159–173.

[23] N. Kavantzas, D. Burdett, G. Ritzinger, T. Fletcher, andY. Lafon, “Web Services Choreography Description Lan-guage 1.0,” W3C Candidate Recommendation, Tech. Rep.,2005.

JianHong YE was born in Xiamen, China. Hereceived his PhD degree in computer softwareand theory from University of Electronic Sci-ence and Technology of China in 2009, hisMS degree in computer software and theoryfrom the Xihua University in 2006, and his BSdegree in computer science from the FuzhouUniversity in 2002.

He is currently a lecturer of computer sci-ence at Huaqiao University, China. He was amember of BETA laboratories from 2007 to

2008. His current research interests include application and theory ofPetri nets, distributed and parallel computing.

JianHong YE is a member of China Computer Federation. He is arecipient of the Fujian Province National Science Foundation CAREERaward.

Wen SONG was born in Chengdu, China. Hereceived his MS degree in computer softwareand theory from the Guizhou University in1991.

He is currently professor of computer sci-ence at Xihua University, China. His currentresearch interests include theory of Petri netsand mathematical logic.

Prof. Wen SONG is a senior member ofChina Computer Federation and a member ofPetri net Special Commission. He is a recipient

of the China National Science Foundation CAREER award.

404 JOURNAL OF SOFTWARE, VOL. 5, NO. 4, APRIL 2010

© 2010 ACADEMY PUBLISHER