<!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>BPMN Analyzer 2.0: Instantaneous, Comprehensible, and Fixable Control Flow Analysis for Realistic BPMN Models</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Tim Kräuter</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Patrick Stünkel</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Adrian Rutle</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yngve Lamo</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Harald König</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>FHDW Hannover</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Western Norway University of Applied Sciences</institution>
          ,
          <addr-line>Bergen</addr-line>
          ,
          <country country="NO">Norway</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Many business process models contain control flow errors, such as deadlocks or livelocks, which hinder proper execution. In this paper, we introduce a new tool that can instantaneously identify control flow errors in BPMN models, make them understandable for modelers, and suggest corrections to resolve them. We demonstrate that detection is instantaneous by benchmarking our tool against synthetic BPMN models with increasing size and state space complexity, as well as realistic models. Moreover, the tool directly displays detected errors in the model, including an interactive visualization, and suggests fixes to resolve them. The tool is open source, extensible, and integrated into a popular BPMN modeling tool.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;BPM</kwd>
        <kwd>Verification</kwd>
        <kwd>Control flow analysis</kwd>
        <kwd>BPMN model checking</kwd>
        <kwd>Soundness</kwd>
        <kwd>Safeness</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>use
analyze every change
&amp; display results</p>
      <p>BPMN Editor
BPMN
modeler</p>
      <p>design
quick fixes
Language engineer</p>
      <p>BPMN
model
analysis
results</p>
      <p>TM instantaneous analysis</p>
      <p>Soundness Checker</p>
      <p>
        The tool can check models after each change since analysis is instantaneous according to [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ],
i.e., it takes 500ms or less. Furthermore, we ensure the results are comprehensible by
highlighting possible violations directly in the model and displaying an interactive counterexample
visualization. Finally, the tool suggests fixes for the most common control flow errors and can
be extended to suggest more fixes in the future.
      </p>
      <p>
        Fahland et al. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] describe coverage, immediacy, and consumability as the main challenges
for users unaccustomed to formal analysis. The BPMN Analyzer addresses all these challenges
since it supports the most common BPMN elements used in practice (coverage), provides
instantaneous results (immediacy), and a comprehensible user interface (consumability), even including
suggestions for fixes. Developers of industrial BPMN software also like our tool, especially the
End-to-end user journey [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Thus, this supports our claim that the UI is understandable for
users unfamiliar with formal analysis.
      </p>
      <p>In the remainder of the paper, we describe how instantaneous, comprehensible, and fixable
control flow error detection is achieved in section 2. Then, we discuss tool maturity in section 3
before concluding in section 4.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Innovations</title>
      <p>
        The BPMN Analyzer has three main innovations: instantaneous, comprehensible, and
ifxable control flow error detection. In this section, we will present the innovations, and more
details can be found in our extended paper [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <sec id="sec-2-1">
        <title>2.1. Instantaneous Analysis</title>
        <p>
          We demonstrate instantaneous control flow analysis by benchmarking our tool in three
scenarios. For all our benchmarks, we use the hyperfine benchmarking tool (version 1.18.0), which
calculates the average runtime when executing each control flow analysis ten or more times. We
ran the benchmarks on Ubuntu 22.04.4 with an AMD Ryzen 7700X processor (4.5GHz) and 32
GB of RAM (5600 MHz). All used BPMN models, our tools to generate them, and benchmarking
scripts to run them are available in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ].
        </p>
        <p>
          First, we benchmarked how our tool handles BPMN models of growing size. We generated
500 synthetic BPMN models starting with five elements up to 4000. The models repeatedly
contain three activities and an exclusive/parallel block with two branches containing one activity
per branch (see [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]). The BPMN Analyzer spends from 1 ms up to 9 ms for the BPMN models [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]
compared to 0.7 s up to 14 s in our previous tool [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. In summary, the runtime grows linearly
with the state space.
        </p>
        <p>
          Second, we benchmarked the tool against a synthetic data set of models that led to a state
space explosion. This represents a worst-case scenario for formal analysis. We generated a data
set of models [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] with a growing number of parallel branches with increasing length, like [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ].
        </p>
        <p>
          Table 1 shows the average runtime of our tool when analyzing these models. The BPMN
Analyzer explores the entire state space while simultaneously analyzing the control flow, i.e.,
verifying soundness properties. The models’ state space grows exponentially, leading to the
same order of growth in runtime. Our analysis is not instantaneous anymore when approaching
17 parallel branches of length 1 (see Table 1). However, analysis is still instantaneous for more
reasonable models with five parallel branches of length 5 or 3 branches of length 20. Other tools
report 2-3s of runtime for most soundness properties and 30s for a model with five parallel
branches [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], which took milliseconds in our tool.
        </p>
        <p>
          Third, we applied our tool to eight realistic models, where three models (e001, e002, e020)
are taken from [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], and the remaining five models are part of the Camunda BPMN for research
repository3. Table 2 shows each model’s average runtime and number of states. The BPMN
Analyzer takes 1-10ms for e001, e002, and e020 [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], while [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] and [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] report 3.66-10.26s and
1-1.75s respectively. The benchmarks in [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] were run on the same hardware, while the machine
used in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] was less powerful. Our analysis is instantaneous for nearly all BPMN models since
most have less than 1000 states, according to [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
3https://github.com/camunda/bpmn-for-research
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Comprehensible Analysis</title>
        <p>We implemented two features to make control flow analysis understandable for everyone. First,
we highlight the problematic elements that cause control flow errors by directly attaching red
overlays to them in the model. In addition, there is a summary panel in the top-right stating if
any errors are found.</p>
        <p>Second, we use tokens to visualize errors interactively, i.e., show an execution leading to the
error. Our analysis provides sample executions resulting in the found control-flow errors, which
we visualize in the editor by showing how tokens move from the process start to an erroneous
state. We are unaware of other tools that visualize errors directly and allow interactions, such
as stopping/resuming and restarting.</p>
        <p>In Figure 2, the visualization has been paused just before an unsafe state was reached. One
token is already located at the marked sequence flow, while a second token is currently waiting
at the exclusive gateway e1. The visualization can be resumed or restarted using the play and
restart button on the left side. The gateway e1 will execute when resumed, resulting in two
tokens at the subsequent sequence flow, i.e., an unsafe execution state. Furthermore, one can
control the visualization speed using the bottom buttons next to the speedometer.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Fixable Analysis</title>
        <p>
          Besides detecting, highlighting, and visualizing control flow errors, the BPMN Analyzer suggests
ifxes like quick fixes in IDEs. Quick fixes cannot be provided for all errors, but we currently
cover many patterns leading to deadlocks, lack of synchronization, message starvation, and
reused end events. The quick fixes we support are described in detail in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] and can be extended
independently of the formal analysis. We are unaware of other tools that can fix identified
control-flow errors.
        </p>
        <p>
          For example, Figure 2 shows a screenshot of our tool, where quick fixes are depicted as green
overlays containing a light bulb icon. A user can apply a quick fix by clicking on a green overlay
and instantly see the changes regarding control flow errors. If unhappy with the result, a user
can undo all changes since each quick fix is entirely revertible due to the command pattern. A
user might not like a quick fix if it not only fixes an error but also has unintended side efects,
such as introducing a diferent control flow error.
The BPMN Analyzer incorporates many findings from our previous work [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] while focusing on
instantaneous and understandable error detection, as described in the previous section. The
tool is open source [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], and we ensure high code quality by employing industry best practices
such as rigorous static analysis and testing. Furthermore, we received positive feedback from
companies in the BPMN process orchestration space [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ].
In this paper, we describe the novel BPMN Analyzer that provides instantaneous, comprehensible,
and fixable BPMN control flow error detection and is integrated into a popular BPMN modeling
tool. We benchmarked our tool against synthetic and realistic BPMN models to demonstrate
instantaneous soundness checking. We address the three main challenges, coverage, immediacy,
and consumability, to provide formal analysis to non-expert users as identified in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. In
addition, our tool ofers quick fixes for common patterns that lead to control flow errors. One
can understand the BPMN Analyzer as a BPMN-specific model checker, implemented in Rust
paired with an intuitive user interface based on the popular bpmn.io ecosystem that is open for
extension by design.
        </p>
        <p>In future work, we aim to improve our tool by providing more quick fixes, considering
advanced BPMN elements such as diferent events, and ranking quick fixes based on usefulness
and previous user behavior. Finally, we aspire to test our tool in a real-world scenario to gather
feedback and measure its impact on productivity.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>D.</given-names>
            <surname>Fahland</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Favre</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Koehler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Lohmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Völzer</surname>
          </string-name>
          ,
          <string-name>
            <surname>K. Wolf,</surname>
          </string-name>
          <article-title>Analysis on demand: Instantaneous soundness checking of industrial business process models</article-title>
          ,
          <source>Data &amp; Knowledge Engineering</source>
          <volume>70</volume>
          (
          <year>2011</year>
          )
          <fpage>448</fpage>
          -
          <lpage>466</lpage>
          . doi:
          <volume>10</volume>
          .1016/j.datak.
          <year>2011</year>
          .
          <volume>01</volume>
          .004.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>F.</given-names>
            <surname>Corradini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Muzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Re</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Tiezzi</surname>
          </string-name>
          ,
          <article-title>A Classification of BPMN Collaborations based on Safeness and Soundness Notions</article-title>
          ,
          <source>Electronic Proceedings in Theoretical Computer Science</source>
          <volume>276</volume>
          (
          <year>2018</year>
          )
          <fpage>37</fpage>
          -
          <lpage>52</lpage>
          . doi:
          <volume>10</volume>
          .4204/EPTCS.276.5.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>T.</given-names>
            <surname>Kräuter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Stünkel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rutle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>König</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Lamo</surname>
          </string-name>
          , Instantaneous, Comprehensible, and
          <source>Fixable Soundness Checking of Realistic BPMN Models</source>
          ,
          <year>2024</year>
          . arXiv:
          <volume>2407</volume>
          .
          <fpage>03965</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>T.</given-names>
            <surname>Kräuter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rutle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>König</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Lamo</surname>
          </string-name>
          ,
          <article-title>A higher-order transformation approach to the formalization and analysis of BPMN using graph transformation systems</article-title>
          ,
          <year>2024</year>
          . arXiv:
          <volume>2311</volume>
          .
          <fpage>05243</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>F.</given-names>
            <surname>Corradini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Fornari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Polini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Re</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Tiezzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Vandin</surname>
          </string-name>
          ,
          <article-title>A formal approach for the analysis of BPMN collaboration models</article-title>
          ,
          <source>Journal of Systems and Software</source>
          <volume>180</volume>
          (
          <year>2021</year>
          )
          <article-title>111007</article-title>
          . doi:
          <volume>10</volume>
          .1016/j.jss.
          <year>2021</year>
          .
          <volume>111007</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>S.</given-names>
            <surname>Houhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Baarir</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Poizat</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Quéinnec</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Kahloul</surname>
          </string-name>
          ,
          <article-title>A First-Order Logic verification framework for communication-parametric and time-aware BPMN collaborations</article-title>
          ,
          <source>Information Systems</source>
          <volume>104</volume>
          (
          <year>2022</year>
          )
          <article-title>101765</article-title>
          . doi:
          <volume>10</volume>
          .1016/j.is.
          <year>2021</year>
          .
          <volume>101765</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>