<!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>Rapid Software Prototyping from Business Artifacts</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Michael Wahler</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Enrico Conte</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Martin Frick</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>David Mosquera</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marcela Ruiz</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Hitachi Energy</institution>
          ,
          <addr-line>Baden</addr-line>
          ,
          <country country="CH">Switzerland</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Zurich University of Applied Sciences (ZHAW)</institution>
          ,
          <addr-line>Winterthur</addr-line>
          ,
          <country country="CH">Switzerland</country>
        </aff>
      </contrib-group>
      <fpage>9</fpage>
      <lpage>14</lpage>
      <abstract>
        <p>Information systems must be able to quickly adapt to changing requirements. In software development, changing the requirements often entails a repetition of development tasks such as implementation or testing. To accelerate such tasks, model-driven development (MDD) ofers users to express their requirements as domain models and to automatically generate code from these models. Most MDD approaches, however, require users to learn new tools and languages. Thus, MDD has found little adoption beyond a few niches and most code is still written by hand, which is slow, costly, and error prone. In this paper, we propose an approach to using existing business artifacts as reusable models in software development. These models can be either transformed into executable code, or they can be used as functional modules using an interpreter. This approach allows product owners to update requirements and build information systems by having the behavior and logic of existing business artifacts immediately reflected in the software, which drastically increases business agility. We validate our approach with a proof of concept for automatically transforming existing business logic and domain data encoded in an Excel document into a web service and generating a web-based user interface for it.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Agile Information Systems Engineering</kwd>
        <kwd>Business Agility</kwd>
        <kwd>Model-driven Development</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Businesses must be agile to cope with changes in their environment. This is especially true in
the context of digitalization, which often accelerates both the frequency and the amplitude of
change [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Businesses that have software at their core may possess suficient knowledge to react
quickly to such changes by having their software development life cycle partially automated,
e.g., through DevOps. For other companies, e.g., in the electrical industry, who often use legacy
approaches to software development and lack the necessary change culture, changes to the
business requirements often entail a lengthy process until these changes are reflected in their
digital products or services [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        Model-driven development (MDD [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]) ofers a solution for accelerating the path from
requirements to implementation in software development. In MDD, domain experts (such as
product managers) capture the requirements in structural and behavioral models. Software
developers provide model transformations and code generators to automatically convert these
models into executable code. At least, this is the theory. In practice, MDD is not widely used
today in general-purpose software projects. While it has been successful in a few niches such
as industrial automation [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] or digital electrical substations [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], we have observed that both
product managers and software developers to often be reluctant to learn and use MDD tools for
specifying applications. As a result, most code is still written by hand.
      </p>
      <p>
        The key to success of the niches above is considered to be that they use domain-specific
languages [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] over general-purpose languages (as, for example, provided by UML). This allows
domain experts to express requirements in a formal language with which they can quickly get
familiar. Thus, we see an opportunity for MDD if the semi-formal and formal approaches that
are already in use to encode business artifacts can be adopted and integrated into a model-driven
software engineering (MDSE) life cycle.
      </p>
      <p>
        We propose an approach to using existing business artifacts as models in an MDSE process.
This allows domain experts to apply changes to the requirements directly to their business
artifacts and automatically generate a new release of the software. Through such automatic
integration of artifacts from a domain-specific language (e.g., spreadsheets in Excel or illustrations
in Visio) into the software development life cycle, companies can rapidly develop applications
and thus, react to changing business requirements in an agile way. In this paper, we address
the research question: Can business artifacts such as spreadsheets be used to automatically
generate software prototypes?
1.1. Related Work
Ofice documents such as Excel spreadsheets can be considered domain-specific languages [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ],
which allow domain experts to encode problems in their respective domain with a familiar
terminology. Using well-known languages and applications (such as spreadsheets) in modeling
solves some of the “grand challenges” in model-driven development suggested by A. Bucchiarone
et al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] because they eliminate the need for domain experts to learn new modeling languages
or to get familiar with a new tool.
      </p>
      <p>
        Although ofice documents are widely used in many domains and even have inspired some
approaches to automating the software development life cycle such as low-code platforms [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ],
they are usually only used as second-class artifacts in software development. As an example, they
are used to specify domain data and business logic (as a starting point for software development),
or, reversely, to represent the call graph of the functions in the execution of a program [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>
        Excel documents have been used in an approach to automatically generating web pages [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ],
which focuses on the visual aspects of representing a spreadsheet as a web page. Although this
approach is useful, it is unclear how formulas in the spreadsheets are calculated.
      </p>
      <p>
        Several others have started to see the value of making the data and calculations in spreadsheets
available through an API. As an example, Microsoft Graph [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] provides a REST API to Excel
documents stored in its cloud to allow for their integration in web applications. There are
opensource solutions such as the GitHub project excel-microservice [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], which provides an API for
manipulating Excel documents through a microservice API. There are even commercial solutions
available for converting Excel documents into applications such as SpreadsheetWeb [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Motivating Example</title>
      <p>In this section, we present an example application from the domain of electrical substations,
which are nodes in electrical grids. They are composed of many diferent types of electrical
assets, e.g., circuit breakers or transformers. Substation owners must ensure their optimal
operation at all times. This can be achieved with a balanced mix of maintenance, replacement
of aging assets, and availability of spare parts. A key element in this optimization problem is
the storage of “enough” spare parts.</p>
      <p>At Hitachi Energy we have extended an existing algorithm for the calculation of the optimal
amount of spare parts to be kept in storage, which will ensure the best balance between cost
of spares and risk of power interruptions. We have built a proof-of-concept model for this
algorithm using Microsoft Excel. Two steps must be taken to further transform this proof
of concept into a prototype: first, validation with product managers, and second, scale-up to
represent a real-world problem.</p>
      <p>The challenge with the first step is that complex Excel models can be hard to understand by
anyone else than their creator. Thus, we seek a method to quickly convert such models into a
tool that can be handled, tried, and validated by others. We want to hide the intricacies of the
models and highlight the input/outputs in a UI wrapper, without the efort and the know-how
for such development.</p>
      <p>The challenge with the second step is that an excel model can handle a handful of variables,
but it becomes impractical or impossible to use when the number of variables increases to
represent a real scale problem, e.g., with hundreds or thousands of spare parts. In this study we
focus on the first challenge, but a natural continuation will be to explore how to automatically
extract the logic of the algorithm and implement it into a software, so that it can be scaled up at
wish. Figure 1 shows several of the input parameters to the optimization algorithm in Excel.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Proposed Implementation</title>
      <p>
        We propose the model-view-controller (MVC) design pattern [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] for the system architecture,
which splits the responsibilities of an application into the model, which contains the data and
business logic; the view, which interacts with the user through an interface; and the controller,
which takes input from the view, manipulates the model, and updates the view.
      </p>
      <p>
        We use a model interpretation approach [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] for turning Excel documents into executable
artifacts. In model interpretation, an engine is built that wraps around the model (i.e., the Excel
document) and reads or modifies it on request. For preparing an Excel document to be used
with this approach, a domain expert must declare one or more cells as inputs to the calculations
in the document, and one or more cells as outputs of these calculations.
      </p>
      <p>In this section, we show our proof-of-concept implementation in Python to demonstrate
how we have used the MVC pattern to automatically generate a web application from an Excel
document.</p>
      <p>The Model The model is the Excel document that contains both business logic and (often)
domain data. Instead of generating code from the model (which is the most common approach in
MDD), we follow the model interpretation (or models at runtime) approach: the Excel document
remains unchanged, and we add a wrapper around it to enable programmatic access.</p>
      <p>
        This ofers several advantages with respect to business agility. First, changes to the model
are immediately reflected in the application because no code needs to be generated. Second, the
application does not have to be stopped when the business logic is updated, which allows for
dynamic software updates [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. Third, fewer bugs will be introduced with each change to the
model because there is no additional hand-written code.
      </p>
      <p>For our proof-of-concept implementation, we have developed a wrapper that provides a REST
API to change cells, trigger calculations, and read cells of an Excel document. This REST API
allows the view and the controller to interact with the Excel sheet. To this end, we use the
Python package formulas1 to update data in Excel sheets and trigger the calculation of formulas
in the sheets and the package flask2 to build a web API for the Excel document.</p>
      <p>This results in a microservice, which can be immediately integrated into existing web
applications or serve as the foundation of new applications. As an example, the API call
curl -H "Content-Type: application/json" -d ’{"ExcelFileName": "simple.xlsx",
"a":"5"}’ -X POST http://localhost:5000/ExcelCalculator
updates the input cell named “a” in the Excel sheet “simple.xlsx” to the value 5. Then, the
calculations in that sheet are triggered and the results of the calculations are returned in the
JSON output { "result": [ 6.0, "text"] }.</p>
      <p>Besides updating values in the Excel document and recalculating the formulas contained
therein, our web service provides an API to add rows to the tables in the document. This enables
users to add additional data to the document at runtime and calculate functions that operate on
a set of values (such as sum or average).</p>
      <p>
        The View The view is realized through a web page, which is automatically generated from
the data in the model. In our implementation, we use the well-established stack of HTML,
CSS, and JavaScript for the front-end of the view and Python (again, the flask package) for its
backend. Our approach provides a URL /webform/&lt;filename&gt;, which automatically renders a
flask HTML template. An example view that was automatically generated is shown in Figure 2.
In this figure, the relation to the elements in the Excel document (cf. Figure 1) are obvious:
parameters of the spare parts optimization algorithm such as the planning strategy and the
planning horizon have become input elements on the web page. The results of the optimization
1https://pypi.org/project/formulas/
2https://flask.palletsprojects.com/en/2.0.x/
algorithm become outputs on the web page as simple text fields or graphical widgets. In our
implementation, we use gauges and column charts from Google Charts [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] to display widgets.
The Controller The controller is a set of JavaScript functions that send the value of the input
ifelds from the web page (the view), sends it to the backend (the model), and updates the view
with the results. These JavaScript functions are parameterized in the automatic generation of
the view. They are called when the Submit button is clicked on the web page and interact with
the model in the backend.
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion and Future Work</title>
      <p>The answer to our research question “Can business artifacts such as spreadsheets be used to
automatically generate software prototypes?” is a clear yes: we have presented an approach
to rapid software prototyping by using ofice documents as first-class modeling artifacts and
integrating them into existing applications through code generation and model interpretation.
Any changes in the ofice documents are immediately reflected in the application without
further design or implementation efort, which significantly increases agility in information
systems engineering.</p>
      <p>The presented approach provides an architecture and proof-of-concept implementation with
several limitations and open questions, which we enumerate for further discussion in the
workshop.</p>
      <p>1. We have shown that spreadsheets can be valuable artifacts for rapid software prototyping.</p>
      <p>We are going to explore systematically what other artifacts (e.g., technical drawings,
Gantt charts) can be automatically integrated into the software development process.
2. The manual mapping of inputs and outputs in the Excel document could be automated by
identifying all existing formulas and their input cells in the Excel document and assigning
them as outputs in the Outputs and Inputs sheets.
3. The Python package that we use to access Excel documents does yet not support all
function types of Excel. There are alternative APIs available for Python and other languages
that should be investigated in terms of supported Excel features and functions.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>N.</given-names>
            <surname>Perkin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Abraham</surname>
          </string-name>
          ,
          <article-title>Building the agile business through digital transformation</article-title>
          , Kogan Page Publishers,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>B.</given-names>
            <surname>Selic</surname>
          </string-name>
          ,
          <article-title>The pragmatics of model-driven development</article-title>
          ,
          <source>IEEE software 20</source>
          (
          <year>2003</year>
          )
          <fpage>19</fpage>
          -
          <lpage>25</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>IEC</surname>
          </string-name>
          , ISO/IEC 61131-3:
          <fpage>2013</fpage>
          <string-name>
            <surname>: Programmable</surname>
            Controllers - Part 3:
            <given-names>Programming</given-names>
          </string-name>
          <string-name>
            <surname>Languages</surname>
          </string-name>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <article-title>[4] IEC 61850 Communication Networks and Systems for Power Utility Automation</article-title>
          ,
          <string-name>
            <surname>IEC</surname>
          </string-name>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Bucchiarone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ciccozzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Lambers</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Pierantonio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Tichy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Tisi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Wortmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Zaytsev</surname>
          </string-name>
          ,
          <article-title>What is the future of modeling?</article-title>
          ,
          <source>IEEE software 38</source>
          (
          <year>2021</year>
          )
          <fpage>119</fpage>
          -
          <lpage>127</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M.</given-names>
            <surname>Brambilla</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Cabot</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Wimmer</surname>
          </string-name>
          ,
          <article-title>Model-driven software engineering in practice</article-title>
          ,
          <source>Synthesis lectures on software engineering 3</source>
          (
          <year>2017</year>
          )
          <fpage>1</fpage>
          -
          <lpage>207</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Bucchiarone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Cabot</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. F.</given-names>
            <surname>Paige</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Pierantonio</surname>
          </string-name>
          ,
          <article-title>Grand challenges in model-driven engineering: an analysis of the state of the research</article-title>
          ,
          <source>Software and Systems Modeling</source>
          <volume>19</volume>
          (
          <year>2020</year>
          )
          <fpage>5</fpage>
          -
          <lpage>13</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J.</given-names>
            <surname>Bézivin</surname>
          </string-name>
          ,
          <article-title>Model driven engineering: An emerging technical space</article-title>
          ,
          <source>in: International Summer School on Generative and Transformational Techniques in Software Engineering</source>
          , Springer,
          <year>2005</year>
          , pp.
          <fpage>36</fpage>
          -
          <lpage>64</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>X.</given-names>
            <surname>She</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zheng</surname>
          </string-name>
          ,
          <article-title>An automatic page code generation method based on excel template and poi technology</article-title>
          ,
          <source>in: 2020 International Conference on Intelligent Transportation, Big Data &amp; Smart City (ICITBS)</source>
          , IEEE,
          <year>2020</year>
          , pp.
          <fpage>560</fpage>
          -
          <lpage>564</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Microsoft</surname>
          </string-name>
          , Overview of Microsoft Graph, https://docs.microsoft.com/en-us/graph/ overview,
          <year>2022</year>
          . Online; accessed 2022-
          <volume>01</volume>
          -18.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Weaver</surname>
          </string-name>
          , Excel Microservice, https://github.com/sysunite/excel-microservice,
          <year>2022</year>
          . Online; accessed 2022-
          <volume>02</volume>
          -07.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Pagos</surname>
          </string-name>
          , SpreadsheetWeb, https://www.spreadsheetweb.com/,
          <year>2022</year>
          . Online; accessed 2022-
          <volume>02</volume>
          -07.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>M.</given-names>
            <surname>Fowler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Rice</surname>
          </string-name>
          , Patterns of Enterprise Application Architecture,
          <string-name>
            <surname>Addison-Wesley</surname>
          </string-name>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>M.</given-names>
            <surname>Wahler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Oriol</surname>
          </string-name>
          ,
          <article-title>Disruption-free software updates in automation systems</article-title>
          ,
          <source>in: Proceedings of the 2014 IEEE Emerging Technology and Factory Automation (ETFA)</source>
          ,
          <year>2014</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          . doi:
          <volume>10</volume>
          .1109/ETFA.
          <year>2014</year>
          .
          <volume>7005075</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <surname>Google</surname>
          </string-name>
          , Google Charts, https://developers.google.com/chart,
          <year>2022</year>
          . Online; accessed 2022-
          <volume>02</volume>
          -07.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>