<!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>Lorikeet: A Model-Driven Engineering Tool for Blockchain-Based Business Process Execution and Asset Management</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>An Binh Tran</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Qinghua Lu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ingo Weber</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>Data61, CSIRO</institution>
          ,
          <addr-line>Sydney</addr-line>
          ,
          <country country="AU">Australia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>School of Computer Science and Engineering</institution>
          ,
          <addr-line>UNSW, Sydney</addr-line>
          ,
          <country country="AU">Australia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Blockchain has attracted broad interest as a distributed ledger technology for building the next generation of applications to address lack-of-trust issues in business. Business processes that manage assets (e.g. transferring car/grain/land titles) are a promising domain for applying blockchain technology: secure asset management (including tokens and crypto-currency) is a major application area of blockchain. Solutions for non-fungible assets (like cars and houses, but also supply chain goods) are recurrently addressed case by case and traditionally rely on a centralised trusted authority. This can cause trust issues and introduce ine ciencies or counterparty risks. However, developing blockchain applications is far from easy, and mistakes may not be xable. Thus, in this paper, we present a model-driven engineering (MDE) tool named Lorikeet for the implementation of business processes on blockchain, which can manage assets. Lorikeet can automatically create well-tested smart contract code from speci cations that are encoded in the business process and data registry models based on the implemented model transformations. We demonstrate the tool with an industrial use case.</p>
      </abstract>
      <kwd-group>
        <kwd>Blockchain</kwd>
        <kwd>Registry</kwd>
        <kwd>Model-Driven Engineering</kwd>
        <kwd>Business Process</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Blockchain is an innovative distributed ledger technology that enables
agreements on decentralised and transactional data sharing across a large network
of untrusted participants without relying on a central trusted authority. Many
organisations (e.g. startups, enterprises, and governments) [
        <xref ref-type="bibr" rid="ref1 ref6">1, 6</xref>
        ] are currently
exploring how to leverage blockchain technology to build trust in the next
generation of applications. Blockchain application areas are diverse, including
physical or digital asset registry, tokens, currency, identity management, and business
processes.
      </p>
      <p>Management of assets is considered to be the rst \killer application" of
blockchain, starting with fungible assets like crypto-currency (Bitcoin, Ether,
etc.) and tokens (second-tier coins that are managed on existing blockchain
networks like Ethereum). Non-fungible assets (e.g., car or house titles, and titles
to supply chain goods) can also be managed using smart contract technology.
In contrast to fungible assets, the latter are recurrently solved case by case and
are traditionally managed by relying on a centralised trusted authority. This
can cause trust issues and introduce ine ciencies or counterparty risks (e.g.,
re-assigning ownership of goods before payment).</p>
      <p>
        However, building systems on blockchain is non-trivial due to the steep
learning curve of the blockchain technology. According to a survey by Gartner [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], \23
percent of [relevant surveyed] CIOs said that blockchain requires the most new
skills to implement of any technology area, while 18 percent said that blockchain
skills are the most di cult to nd." Model-driven engineering (MDE) is
software engineering methodology that automatically creates software system code
from the models. MDE tools can generate well-tested code implementing best
practices and help developers manage software complexity by only focusing on
building high-level models without requiring expert development knowledge [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>
        In this paper, we present how to leverage MDE to facilitate the development
of blockchain applications in the space of business processes and asset registries,
which can easily be applied to a broad range of blockchain applications. We
designed and implement an MDE tool, named Lorikeet, which can
automatically produce smart contracts from business process models and registry data
schema. Lorikeet incorporates the registry editor Regerator [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and implements
the BPMN translation algorithms from both [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. It is an entirely separate
tool from Caterpillar [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], and tackles the hard challenges of integrating the
asset management and business process interactions on blockchain. Lorikeet is in
commercial use by Data61, and has been applied in numerous industry projects.
      </p>
      <p>BPMN and registry modeller user interface</p>
      <p>REST API gateway</p>
      <p>Docker container
DNS name: bpmn2solidity</p>
      <p>BPMN translator</p>
      <p>Docker container
DNS name: regerator</p>
      <p>Registry generator
BPMN and registry modeller &amp; smart contract generator</p>
      <p>Fig. 1. Architecture of Lorikeet.</p>
      <p>Socket.io server</p>
      <p>Message queue</p>
      <p>Docker container
DNS name: ethtrigger
Blockchain trigger
Blockchain trigger</p>
    </sec>
    <sec id="sec-2">
      <title>Tool Description</title>
      <p>3 https://github.com/bpmn-io/bpmn-js</p>
      <p>The BPMN and registry modeller UI interacts with the back-end
microservices via an API gateway. The API gateway forwards API calls from the modeller
UI, such as translating BPMN model to Solidity, to the corresponding
microservice. Fig. 2 shows the business process modeller UI of our tool. Once the user
makes changes to the BPMN model on the left-hand side, it is translated to the
corresponding Solidity smart contract code which is displayed on the right-hand
side. The registry modeller UI is similar to the business process modeller UI. On
the left-hand sides is a form collecting the customised registry information.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Maturity, Demo, and Screencast</title>
      <p>Lorikeet is a well-evaluated tool that is used for creating blockchain smart
contracts in industry and academia. Besides the usual testing, we have used Lorikeet
in collaborations with academics internationally and in student projects. We also
have completed a number of external blockchain application projects using
Lorikeet and received positive feedback from our clients.</p>
      <p>
        For the demo, we will use Lorikeet to model a grain title transfer process use
case [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and generate smart contract code based on the models. We encountered
this use case in our projects and discussions with industry, and modelled it based
on publicly available information. Fig. 3 shows a simpli ed grain title transfer
process modelled using Lorikeet. There is only one grain title registry interacting
with this selected grain title transfer process.
      </p>
      <p>A screencast demonstrating the usage of the Lorikeet tool can be found at
https://drive.google.com/open?id=1rpy-oHbDVkXa6u4Fn73wSX8rINn1sv3U .</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <article-title>Distributed ledger technology: beyond blockchain</article-title>
          .
          <source>Technical report</source>
          ,
          <year>2016</year>
          . UK Government Chief Scienti c Adviser.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>L.</given-names>
            <surname>Garc</surname>
          </string-name>
          a
          <article-title>-Ban~uelos, A</article-title>
          . Ponomarev,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dumas</surname>
          </string-name>
          ,
          <string-name>
            <surname>and I. Weber.</surname>
          </string-name>
          <article-title>Optimized execution of business processes on blockchain</article-title>
          .
          <source>In BPM'17: International Conference on Business Process Management, Sept</source>
          .
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>O.</given-names>
            <surname>Lopez-Pintado</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Garc</surname>
          </string-name>
          a-Ban~uelos, M. Dumas,
          <string-name>
            <surname>and I. Weber.</surname>
          </string-name>
          <article-title>Caterpillar: A blockchain-based business process management system</article-title>
          .
          <source>In BPM'17: International Conference on Business Process Management</source>
          , Demo track,
          <source>Sept</source>
          .
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>G. P.</given-names>
            <surname>Release</surname>
          </string-name>
          .
          <article-title>Gartner survey reveals the scarcity of current blockchain deployments</article-title>
          , May
          <year>2018</year>
          . ,
          <source>accessed: 4 May</source>
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>D. C.</given-names>
            <surname>Schmidt</surname>
          </string-name>
          .
          <article-title>Guest editor's introduction: Model-driven engineering</article-title>
          .
          <source>Computer</source>
          ,
          <volume>39</volume>
          (
          <issue>2</issue>
          ):
          <volume>25</volume>
          {
          <fpage>31</fpage>
          ,
          <string-name>
            <surname>Feb</surname>
          </string-name>
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>M.</given-names>
            <surname>Staples</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Falamaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ponomarev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rimba</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. B. T. I.</given-names>
            <surname>Weber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and J.</given-names>
            <surname>Zhu</surname>
          </string-name>
          .
          <article-title>Risks and opportunities for systems using blockchain and smart contracts</article-title>
          .
          <source>Technical report, Sydney</source>
          ,
          <year>2017</year>
          .
          <article-title>Data61(CSIRO).</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>A. B. Tran</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>I. Weber</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Staples</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Rimba</surname>
          </string-name>
          .
          <article-title>Regerator: a registry generator for blockchain</article-title>
          .
          <source>In CAiSE'17: International Conference on Advanced Information Systems Engineering</source>
          , Forum Track (demo),
          <year>June 2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>I.</given-names>
            <surname>Weber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Riveret</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Governatori</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ponomarev</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Mendling</surname>
          </string-name>
          .
          <article-title>Untrusted business process monitoring and execution using blockchain</article-title>
          .
          <source>In BPM'16: International Conference on Business Process Management, Sept</source>
          .
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>