<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Generating Preliminary Edit Lenses from Automatic Pattern Discovery in Business Process Modeling</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Moises Castelo Branco</string-name>
          <email>mcbranco@gsd.uwaterloo.ca</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Arif Wider</string-name>
          <email>wider@informatik.hu-berlin.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Generative Software Development Laboratory, University of Waterloo, Canada WWW home page:</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Humboldt-Universitat zu Berlin Department of Computer Science Unter den Linden 6</institution>
          ,
          <addr-line>D-10099 Berlin</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Business process models are often used to describe a single system at di erent levels of abstractions|for instance, a business work ow speci cation and its corresponding IT implementation|and have to be synchronized. Describing such model synchronizations with approaches to bidirectional model transformations (e.g., lenses) has several advantages from maintainability to veri cation. However, describing a synchronization from scratch by manually writing update operations can be tedious and error-prone. We show how to automatically generate such synchronizations by identifying re nement patterns in the relation between di erent models and by representing those patterns as edit lenses. Although these generated synchronization operations may not completely re ect all the re nement patterns that correlate the models in practice, a considerable part of manual work can be saved by generating them automatically rst, and then only check and optimize them manually.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Business Process Modeling (BPM) involves the participation and collaboration
of many stakeholders (e.g. Business Analysts, Systems Analysts, IT Architects
and Developers). The distribution of responsibilities and roles results in the
creation of di erent models of the same business process. Specialized modeling
languages have been developed to represent such models, for example the
Business Process Modeling and Notation (BPMN). Business- and IT-level models
evolve concurrently and periodically need to be synchronized [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Synchronizing
the models means propagating changes in both directions, i.e., from business
to IT and vice versa. Writing such synchronizations usually requires uncovering
tacit knowledge, which may be lost entirely. IT personnel at the Bank of
Northeast of Brazil (BNB), our industry partner, has faced this challenge as part of
a regulatory compliance project. Without appropriate tool support, this task is
very time-consuming and error-prone.
      </p>
      <p>Aiming at mitigating this problem, there is a multitude of frameworks for
bidirectional model transformations (BXs) [3{6,8,9]. Although these approaches
provide the foundations of BXs in terms of properties and operations, few
concrete implementations of such frameworks are available. It remains unclear how
to generate such transformations in many problem domains. In particular, there
is a lack of practical BX frameworks tailored to deal with consistency of business
process models that target di erent levels of abstraction.</p>
      <p>
        In this paper, we leverage previous work on process model matching [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]
and present a practical approach for generating preliminary bidirectional model
transformations in BPM based on edit lenses [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. The implemented framework
is tailored to process modeling at di erent abstraction levels. First, we start by
providing some background in BPM and important concepts used throughout
the paper (x 2). Following, we discuss some background and rationale behind
using edit lenses to deal with process models (x 3). Then, we present technical
details of the approach (x 4) and show some evaluation based on industrial case
studies (x 5). Finally, we discuss related work (x 6), conclusions, and future work
(x 7).
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Business Process Models at Di erent Levels of</title>
    </sec>
    <sec id="sec-3">
      <title>Abstraction</title>
      <p>2.1</p>
      <sec id="sec-3-1">
        <title>Background</title>
        <p>A business process is a collection of structured or ad hoc activities that produce
a speci c output, such as service or product. The activities of a process interact
with IT assets to capture, transform, or report business data. In practice, a range
of business to IT-oriented stakeholders create and use business process models for
speci c purposes, including requirements elicitation, documentation, simulation,
and execution. Figure 1 shows two models in BPMN 2.0, each representing the
process of using an Automated Teller Machine (ATM) system at di erent level
of abstraction. We added shorter names in parentheses (e.g., (AC), (GB)) to
avoid clutter when referring to the models. The rst model (Fig. 1.a) represents
a business-level process speci cation. The second one (Fig. 1.b) is an IT-level
speci cation.
2.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Process Structure Tree (PST)</title>
        <p>
          Any BPMN model can be uniquely decomposed into single-entry single-exit
(SESE) regions [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]. Let G = (N; E) be a work ow graph, where N is the
set of nodes and E the set of edges. A SESE region R = (N 0; E0) is a nonempty
subgraph of G, i.e., N 0 N and E0 = E \ (N 0 N 0) such that there exist edges
e; e0 2 E with E \ ((N nN 0) N 0) = feg and E \ (N 0 (N nN 0)) = fe0g; e and e0
are called the entry and the exit edge of R, respectively. The Process Structure
Start
        </p>
        <p>Approve Card</p>
        <p>(AC)
Customer Inserts
Card into ATM
(Trigger)</p>
        <p>Approve &amp; Get
Transaction
(AGT)</p>
        <p>Timeout
Cancel
Transaction</p>
        <p>(CT)
PSTa
R0</p>
        <p>R2
R3
GB</p>
        <p>R4
DA</p>
        <p>X1
X1</p>
        <p>Get Balance</p>
        <p>(GB)
Debit(DAAcc)ount
Get Balance</p>
        <p>
          (GB)
Tree (PST) for a BPMN process model is a tree representing the decomposition
of the model into SESE regions [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]. Figure 2 shows the PSTs corresponding to
the BPMN process models. There is a unique PST for each BPMN model. The
root represents the whole process model. Leaves represent model elements, i.e.,
tasks, gateways and events. Inner nodes represent SESE regions.
        </p>
        <p>
          Di erences between Business and IT process models
We have compiled a catalog of 11 recurrent patterns used to re ne business-level
models into IT-level models [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. These patterns include (i) adding or modifying
properties of model elements, such as changing the name or type of an activity,
and (ii) changing the ow structure. An example from category (i) is the
renaming and retyping of the empty start event Start (Fig. 1.a) into the message-driven
event Customer inserts card into ATM (Fig. 1.b). An example from category (ii)
is the re nement of the task Debit Account (Fig. 1.a) into the block consisting of
the gateways X5 and X6 and two other tasks Debit Checkings and Debit Savings
(Fig. 1.b).
3
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Edit Lenses</title>
      <p>
        A lens is a bidirectional transformation between a pair of connected data
structures, X and Y, capable of translating an edit on one structure into an
appropriate edit on the other. Each lens is a pair of functions|to and from|one
mapping X updates to Y updates and the other mapping Y updates to X
updates. Although many varieties of lenses exist in the literature, only edit lenses [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
o er a satisfactory treatment of how editing operations are represented.
      </p>
      <p>
        Our approach employs edit lenses because of two reasons. First, in business
process modeling, changes (including re nement patterns [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]) can be distilled
into atomic editing operations, such as inserting, deleting or moving an activity
and updating its attributes. Second, edit lenses are intuitive. Human users can
inspect them easily to review, add, discard or select speci c operations before
synchronizing the models.
4
      </p>
    </sec>
    <sec id="sec-5">
      <title>Generating Edit Lenses from Correspondences between</title>
    </sec>
    <sec id="sec-6">
      <title>Process Models</title>
      <p>
        In previous work [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], we presented an algorithm to automatically detect
nontrivial correspondence patterns [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] between BMPN process models across levels
of abstraction. The algorithm identi es attribute and structural correspondences
over the PSTs of the input models. Table 1 shows the correspondences identi ed
by the matching algorithm on the PSTs shown in the Fig. 2.
      </p>
      <p>For each correspondence, the lenses generator produces a pair of functions, to
and from, composed of edit operations for bidirectional transformations in both
directions: business ,! IT (to) and business - IT (from). Regions and model
elements without correspondences, such as P STa.DA and P STb.GS, are treated
as individual inserts or deletes. The edit operations are generated according to
the following heuristic:
{ insert(l,y,k); insert a new PST node l as the k th child of node y. For
example, in Fig. 2, the region P STb.R6 is inserted as the 3rd child of P STb.R4:
insert (P STb.R6,P STb.R4,3).
{ delete(x); delete PST node x from its parent. In the example, P STa.DA is
deleted from P STa.R4: delete(P STa.DA).
{ move(x,y,k); node x becomes the k th child of y. In the example, the task</p>
      <p>P STa.GB is moved from P STa.R3 to P STb.R5: move(P STa.GB,P STb.R5,1)
{ update(x,v); update value of x with v. For example, the value of the node</p>
      <p>P STa.PR was updated to P STb.CR: update(P STa.PR,P STb.CR)
{ re ne(r,s); the region r is re ned into the region s: the atomic changes are
also presented by inserts and deletes. In the example, the region P STa.R4
is re ned into the region P STb.R7. The corresponding inserts and deletes are
presented hierarchically, such as delete(P STa.DA), insert(P STb.R8,P STb.R7,
2), and so on.</p>
      <p>Node positions are shown as parameters using absolute paths. A path like
\/0/4/3/0" means: the unique child of the 3rd child of the 4th child of the root
node. The output of the lenses generator for the correspondences vii and viii
previously shown are as follows:
vii P STa.GB =P STb.GB
to (business ,! IT )
move PSTNode="GB" destination="/0/4/2/2" origin="/0/3/2"
from (business - IT )
move PSTNode="GB" destination="/0/3/2" origin="/0/4/2/2"
viii P STa.R4 =P STb.R7
to (business ,! IT )
refine PSTNode="R4(DA..DA) to R7(X5..X6)" composed of:
delete PSTNode="DA" source="/0/3/3/0"
insert PSTNode="X5" destination="/0/4/3/0"
insert PSTNode="X6" destination="/0/4/3/1"
insert PSTNode="R8(DC..DC)" destination="/0/4/3/2"
insert PSTNode="R9(DS..DS)" destination="/0/4/3/3"
insert PSTNode="DC" destination="/0/4/3/2/0"
insert PSTNode="DS" destination="/0/4/3/3/0"
from (business - IT )
refine PSTNode="R7(X5..X6) to R4(DA..DA)" composed of:
delete PSTNode="X5" source="/0/4/3/0"
delete PSTNode="X6" source="/0/4/3/1"
delete PSTBranch="R8(DC..DC)" source="/0/4/3/2"
delete PSTBranch="R9(DS..DS)" source="/0/4/3/3"
insert PSTNode="DA" destination="/0/3/3/0"</p>
      <p>
        Users can review this preliminary set of edit operations to add, remove, group
and discard speci c ones. The nal lens (revised by the user) is executed when
something is changed in either of the two models to generate a consistent version
of the other model. The synchronization is fully automatic: our implementation
provides a module on top of VIATRA2 to synchronize any number of individual
operations selected by the user. Transformations are rst performed on the PSTs,
and afterwards they are transformed back into BPMN. Occasional malformed
BPMN models after the transformations (e.g., an added task without incoming or
outgoing ows) need to be xed manually by the user. To deal with this issue we
are currently working on integrating the approach with a quick x generator [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
that guides the user in xing post-synchronized models, when needed.
5
      </p>
    </sec>
    <sec id="sec-7">
      <title>Evaluation</title>
      <p>Implementation. We have implemented the lenses generator framework in
Java as an Eclipse feature (Fig. 3), on top of the SOA Tools Platform BPMN
Modeler.</p>
      <p>
        Evaluation. The quality of generated lenses directly depends on the quality of
the matching algorithm, whose recall varies between 40-70% [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Thus, the users
always need to review the initial lenses to capture the correct re nement patterns
and create a baseline of operations that ensure proper business-IT
synchronization. We wanted to know how much manual work is needed to update baselines
of lenses over time, in the presence of typical model changes. We inspected 48
real changes made in three BPM projects over a period of one year, and counted
how many individual operations would need to be manually changed in each
baseline to meet those changes. The results are shown in the Table 2.
      </p>
      <p>A large number of operations needs to be manually revised to cope with
changes. Nevertheless, we believe that keeping baselines of lenses is useful,
instead of the burden of periodically rebuilding all synchronizations from scratch.
Approximately 50% of the work over the analysed period would be saved by
basically maintaining the lenses incrementally, in pace with the changes.</p>
      <p>
        Fig. 3: Edit Lenses Generator Tool
Project
Customer Registration
Credit Backo ce
Procurement
Bidirectional transformation frameworks originate from the lenses framework
proposed by Foster et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] which assumes one model being an abstract view
of the other. Inspired by the lenses framework, researchers proposed state-based
framework for symmetric synchronization [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. As a more general case, symmetric
synchronization allows neither of the model to be a view of the other. However,
as Diskin et al. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] point out, state-based bidirectional transformations actually
mix two di erent operations|delta discovery and delta propagation|leading
to several semantic problems. To x these problems, several approaches [
        <xref ref-type="bibr" rid="ref3 ref5 ref9">3, 5, 9</xref>
        ]
propose delta-based frameworks, where deltas are taken as input and output.
Typical delta-based frameworks include delta lenses [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] for the asymmetric cases,
and symmetric delta lenses [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and edit lenses [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] for the symmetric cases.
7
      </p>
    </sec>
    <sec id="sec-8">
      <title>Conclusions</title>
      <p>We have presented a practical approach that generates preliminary edit lenses in
BPM, tailored to maintaining consistency of process models at di erent
abstraction levels. A prototype tool is implemented on top of Eclipse and SOA Tools
Platform. We performed a preliminary evaluation of the tool based on real-world
models. As for future work, we aim to perform a qualitative assessment of the
approach, obtaining feedback from BPM practitioners in industry. We also hope
that this work may encourage developers to evolve the approach and provide
tool support to more elaborated BX scenarios in BPM.</p>
    </sec>
    <sec id="sec-9">
      <title>Acknowledgment</title>
      <p>We would like to thank the Bank of the Northeast of Brazil (Banco do Nordeste {
BNB) for providing the case study as well as valuable requirements and feedback
on the design of the tool.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Branco</surname>
            ,
            <given-names>M.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Troya</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Czarnecki</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          , Kuster, J., Volzer, H.:
          <article-title>Matching Business Process Work ows Across Abstraction Levels</article-title>
          .
          <source>In: Proceedings of 15th ACM/IEEE International Conference on Model Driven Engineering Languages and Systems. MODELS</source>
          <year>2012</year>
          , ACM/IEEE (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Branco</surname>
            ,
            <given-names>M.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiong</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Czarnecki</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          , Kuster, J., Volzer, H.:
          <article-title>A case study on consistency management of business and IT process models in banking</article-title>
          .
          <source>Journal of Software and Systems Modeling SoSyM</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Diskin</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiong</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Czarnecki</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>From state- to delta-based bidirectional model transformations</article-title>
          .
          <source>In: Proceedings of the Third international conference on Theory and practice of model transformations</source>
          . pp.
          <volume>61</volume>
          {
          <fpage>76</fpage>
          . ICMT'
          <volume>10</volume>
          , Springer-Verlag, Berlin, Heidelberg (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Diskin</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiong</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Czarnecki</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>From State- to Delta-Based Bidirectional Model Transformations: the Asymmetric Case</article-title>
          .
          <source>Journal of Object Technology</source>
          <volume>10</volume>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Diskin</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiong</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Czarnecki</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ehrig</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          , Hermann,
          <string-name>
            <given-names>F.</given-names>
            ,
            <surname>Orejas</surname>
          </string-name>
          ,
          <string-name>
            <surname>F.</surname>
          </string-name>
          :
          <article-title>From State- to Delta-Based Bidirectional Model Transformations: the Symmetric Case</article-title>
          .
          <source>In: Proceedings of the 14th international conference on Model driven engineering languages and systems</source>
          . pp.
          <volume>304</volume>
          {
          <fpage>318</fpage>
          . MODELS'
          <volume>11</volume>
          , Springer-Verlag, Berlin, Heidelberg (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Foster</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Greenwald</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moore</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pierce</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schmitt</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Combinators for bidirectional tree transformations: A linguistic approach to the view-update problem</article-title>
          .
          <source>ACM Transactions on Programming Languages and Systems (TOPLAS) 29(3)</source>
          ,
          <volume>17</volume>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. Hegedus,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Horvath</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Rath</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            ,
            <surname>Branco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.C.</given-names>
            ,
            <surname>Varro</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          :
          <article-title>Quick x generation for DSMLs</article-title>
          .
          <source>In: Proceedings of IEEE Symposium on Visual Languages and HumanCentric Computing VLHCC</source>
          <year>2011</year>
          . IEEE (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Hofmann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pierce</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wagner</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Symmetric lenses</article-title>
          .
          <source>In: Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages</source>
          . pp.
          <volume>371</volume>
          {
          <fpage>384</fpage>
          . POPL '11,
          <string-name>
            <surname>ACM</surname>
          </string-name>
          , New York, NY, USA (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Hofmann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pierce</surname>
            ,
            <given-names>B.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wagner</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Edit lenses</article-title>
          .
          <source>In: POPL</source>
          . pp.
          <volume>495</volume>
          {
          <issue>508</issue>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Vanhatalo</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , Volzer, H.,
          <string-name>
            <surname>Leymann</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Faster and More Focused Control-Flow Analysis for Business Process Models Through SESE Decomposition</article-title>
          .
          <source>In: ICSOC 2007</source>
          . pp.
          <volume>43</volume>
          {
          <fpage>55</fpage>
          . LNCS, Springer-Verlag, Berlin, Heidelberg (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>