<!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>Controlling Internet of Things devices with Read-Write Linked Data Interfaces using Data-Driven Work ows</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Nico A falg</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Leonard Nurnberg</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Benjamin Jochum</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tobias Kafer uberq@student.kit.edu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>ujeng@student.kit.edu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>uzebb@student.kit.edu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>tobias.kaefer@kit.edu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute AIFB, Karlsruhe Institute of Technology (KIT)</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We present a rst rough prototype for our approach to specify and execute agents on Read-Write Linked Data that are given as data-driven work ows, speci cally we build on Guard-Stage-Milestone work ows. We showcase our approach in a setting from the Internet of Things, speci cally building automation. { Microservices [10] give access to business functions { Internet of Things devices with web interfaces (see e. g. the W3Cs Web of Things e ort1) allow for enacting change using actuators { Decentralised social networks such as SoLiD2 allow for standards-based digitised social interaction Overall, we see that besides the uniform interaction model of REST [4], or HTTP3, also semantic descriptions using the uniform data model of RDF4 nd considerable uptake. For this data-driven environment called Read-Write Linked Data [1], we want to specify and execute behaviour. Hence, we are currently investigating data-driven approaches such as Guard-Stage-Milestone [5] to workow modelling for their application as agent speci cations for Read-Write Linked Data. Data-driven approaches de ne the course of action using data, i. e. system state, whereas traditional ow-based approaches use the nishing of activities to de ne the course of action. Work ows in data-driven approaches are considered more exible than ow-driven approaches, e. g. it is easier in a data-driven approach to cover all exceptions and corner cases. We think that the data-driven 1 https://www.w3.org/2016/07/wot-ig-charter.html 2 https://solid.mit.edu/ 3 https://tools.ietf.org/rfc/rfc7230.txt 4 https://www.w3.org/TR/rdf11-concepts/</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        The web can be argued to be at a stage where hypermedia agents could be
applied [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], as its foundational technologies also for write access nd widespread
use, for instance:
approach provides a much better t to the web architecture than the ow-driven
approach for two reasons: (1) in both, data-driven work ows and on the web,
system state is the rst-class citizen (cf. REST { Representational State Transfer).
(2) compared to traditional environments for work ow management, systems are
typically more open and less under central control on the web. Thus, exibility,
ie. the ability to cope with unforseen but possible execution paths in a work ow,
is a desired property in a work ow approach for the web. For an example of
data-drivenness and exibility, see our walk-through in Section 3.
      </p>
      <p>
        The challenge is that properties of the environment play a major role in
which work ow approaches are applied in what settings [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Therefore, we need
to look at the assumptions of our environment Read-Write Linked Data when
applying work ow technologies. Speci cally, we found that Read-Write Linked
Data is fundamentally di erent from traditional environments where work ow
technologies are applied, e. g. databases, in the following regards:
The absence of events in HTTP In HTTP, there is no way for subscribing
to events, which a controller could track for changes in the environment.
Reasoning and querying under the Open-World Assumption Under the
open-world assumption, we cannot consider information we cannot derive as
false, i. e. we cannot rely on negation when specifying the controller.
      </p>
      <p>
        In previous works, we have been working towards this challenge: As a basis for
applying work ow approaches for specifying behaviour, we de ned ASM4LD, a
model of computation for the environment of Read-Write Linked Data [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Thus,
we can specify agent behaviour using rules. Based on this model of computation,
we provided an approach to specify ow-driven work ows [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and presented a
corresponding demo [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. In this demo, we present a data-driven approach instead.
      </p>
      <p>
        Also, there is previous work in work ow management. Hull et al. developed
the Guard-Stage-Milestone approach [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] for central data bases instead of the
web architecture. Pautasso investigated how to retro t REST into ow-based
work ows [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], whereas we t an approach for data-driven work ows into REST.
      </p>
      <p>
        The demo shows our work on two main parts, a work ow ontology and
operational semantics for the Guard-Stage-Milestone work ow language in the
ASM4LD model of computation [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. The contribution of the demo is a rst
rough implementation for a simple use-case from the Internet of Things. This
submission is accompanied by a web page5. We published a paper on the formal
aspects of the approach [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>The paper is structured as follows: In Section 2, we present the architecture
of our demo and the set-up. Next, in Section 3, we describe how a visitor to our
demo booth can interact with our demo. Last, in Section 4, we conclude.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Architecture and Set-Up</title>
      <p>5 http://people.aifb.kit.edu/co1683/2019/gsm/semantics-demo/
Mock/Visualization Server
http://mock-server.lan:3000
/ → main page with info &amp; links</p>
      <p>Get mock state
(/mock)</p>
      <p>Linked Data-Fu
When all servers run:</p>
      <p>start with
$ draft/run-curl.sh
$ draft/run.sh</p>
      <p>Get Workflow Instances</p>
      <p>/ldbbc/[n]
Submit LDBBC’s IP</p>
      <p>/iphs
Get sensor data
Post speaker text</p>
      <p>LDBBC
http://tok450s.lan:8080/ldbbc</p>
      <p>Get/Put Workflow Instances</p>
      <p>/ldbbc/[n]</p>
      <p>
        IoT
http://t2-rest- … .lan
component families: (1) A Linked Data Platform container to maintain work ow
models and instances, (2) an execution engine for the work ows, (3) a grapical
user interface (4) the actual devices to control. All components are connected
via a network switch that can be coupled with a notebook or a wi router. We
will now in turn provide more detail on the components:
Linked Data Basic Basic Container (LDBBC) The LDBBC is an
implementation6 of a Linked Data Platform Container[
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. We use LDBBC to
maintain data about work ow models and instances as Linked Data. LDBBC
is written in Java and we deploy it on Eclipse Jetty, a Servlet Container.
Linked Data-Fu Linked Data-Fu7 is a Linked Data processing engine written
in Java [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Linked Data-Fu can be programmed in a subset of the Notation3
language's syntactical features to interact with and reason over Linked Data.
Speci cally, we deploy rules for our prototypical operational semantics of a
work ow language8 on Linked Data-Fu.
      </p>
      <p>Visualization We wrote a component in Node.js and Express that allows to
visualize the work ow's state stored on the LDBBC. This visualisation reads
the Linked Data about the work ow instance state and shows it as a
simplied GSM work ow model with small annotations. The left part of Figure 2
shows a screenshot of this UI.</p>
      <p>IoT Devices We have a number of physical and virtual IoT devices in our
demo. For the physical devices, we use a set of Tessel 29 IoT boards with
modules for RFID sensors, light sensors, and loudspeakers. Each board runs a
Node.js/Express server providing a REST API to get state information with
measurements as Linked Data, or to receive messages to be read out using
the speaker. For the virtual devices, we rely on a similar implementation as
6 https://github.com/kaefer3000/ldbbc
7 https://linked-data-fu.github.io/
8 https://github.com/nico1509/data-driven-workflows
9 https://tessel.io/
the visualisation UI (see the right part of Figure 2). Running out of boards,
we implemented a counter using this UI.</p>
    </sec>
    <sec id="sec-3">
      <title>Walkthrough</title>
      <p>The scenario of our demo will be an evacuation work ow. The work ow
represents the programming of an automatic evacuation control system. When
approaching our stand, the visitor will see: a set of IoT devices with RFID sensors
attached to interact with the work ow (used for representing alarm buttons and
doors that have to be closed), speakers for noti cations by the work ow (used for
giving evacuation instructions), and a screen showing status information about
work ow instances (used for visualising the evacuation progress and for
explanations on the overall system).</p>
      <p>We show the work ow on the left side of Figure 2. Each activity, called stage
in Guard-Stage-Milestone consists in an action, ie. here: an HTTP request that
changes something, a guard, ie. a condition on the system state that must hold
before the action is executed, and a milestone, ie. a ag that is set after the
action nished. The guards and the milestones re ect the data-drivenness of
this work ow approach: They determine the course of action based on system
state, in contrast to ow-driven approaches such as BPMN, which only take the
nishing of other activities in the arrows into account. As guards and milestones
can get invalidated, deviations in the course of action, which call for exibility
in the models, can easier be covered in a data-driven approach:</p>
      <p>The control system then works as follows. The visitor initiates the
evacuation work ow by placing an RFID card on the reader that represents a re alarm
button. On the speaker, the work ow then announces a re alarm, and that (1)
emergency will arrive, people have to be (2) evacuated and (3) counted. The
visitor then can ful l stages by placing and releasing RFID cards on
corresponding readers. The operational semantics poll the system state including whether
cards are on the RFID readers. The presence of cards on readers is then part of
our conditions. One of the features of the data-driven approach is that stages
can be invalidated, and thus need to be re-executed or are halted. For instance,
if the initially placed alarm card is removed, the whole emergency procedure is
stopped.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>Using this demo, we want to show our work-in-progress in applying data-driven
work ows for controlling Read-Write Linked Data resources to the Semantic
Web community. We present a rst rough implementation of our approach that
ports the Guard-Stage-Milestone approach to the web architecture. We base
our demo in the setting of Internet of Things, speci cally building automation,
where currently a W3C community group is investigating web technologies for
application10.
10 https://w3c-lbd-cg.github.io/bot/</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Berners-Lee</surname>
            ,
            <given-names>T:</given-names>
          </string-name>
          <article-title>Read-Write Linked Data</article-title>
          .
          <source>Design Issues</source>
          , (
          <year>2009</year>
          ). http://www.w3. org/DesignIssues/ReadWriteLinkedData.html
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Ciortea</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mayer</surname>
            ,
            <given-names>S</given-names>
          </string-name>
          , Gandon,
          <string-name>
            <surname>F</surname>
          </string-name>
          , Boissier,
          <string-name>
            <given-names>O</given-names>
            ,
            <surname>Ricci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A</given-names>
            , and
            <surname>Zimmermann</surname>
          </string-name>
          ,
          <string-name>
            <surname>A:</surname>
          </string-name>
          <article-title>A Decade in Hindsight: The Missing Bridge Between Multi-Agent Systems and the World Wide Web</article-title>
          .
          <source>In: Proc. 18th AAMAS</source>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Elmroth</surname>
            ,
            <given-names>E</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hernandez-Rodriguez</surname>
            ,
            <given-names>F</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Tordsson</surname>
            ,
            <given-names>J:</given-names>
          </string-name>
          <article-title>Three fundamental dimensions of scienti c work ow interoperability: Model of computation, language, and execution environment</article-title>
          .
          <source>Future Generation Computer Systems</source>
          <volume>26</volume>
          (
          <issue>2</issue>
          ) (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Fielding</surname>
            ,
            <given-names>R:</given-names>
          </string-name>
          <article-title>Architectural Styles and the Design of Network-based Software Architectures</article-title>
          .
          <source>PhD thesis</source>
          , University of California, Irvine, USA (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Hull</surname>
          </string-name>
          , R et al.:
          <article-title>Introducing the Guard-Stage-Milestone Approach for Specifying Business Entity Lifecycles</article-title>
          .
          <source>In: Proceedings of the 7th International Workshop on Web Services and Formal Methods (WS-FM)</source>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Jochum</surname>
            ,
            <given-names>B</given-names>
          </string-name>
          , Nurnberg, L, A falg, N, and
          <article-title>Kafer, T: Data-Driven Work ows for Specifying and Executing Agents in an Environment of Reasoning and RESTful Systems</article-title>
          .
          <source>In: Proc. 3rd AI4BPM at the 17th BPM</source>
          (
          <year>2019</year>
          ). Accepted
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. Kafer, T and Harth,
          <string-name>
            <surname>A</surname>
          </string-name>
          :
          <article-title>Rule-based Programming of User Agents for Linked Data</article-title>
          .
          <source>In: Proc. 11th LDOW at the 27th WebConf</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8. Kafer, T and Harth,
          <string-name>
            <surname>A</surname>
          </string-name>
          : Specifying, Monitoring, and
          <article-title>Executing Work ows in Linked Data Environments</article-title>
          .
          <source>In: Proc. 17th ISWC</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. Kafer, T, Lauber,
          <string-name>
            <surname>S,</surname>
          </string-name>
          <article-title>and</article-title>
          <string-name>
            <surname>Harth</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          :
          <article-title>Using Work ows to Build Compositions of Read-Write Linked Data APIs on the Web of Things</article-title>
          .
          <source>In: Proc. Posters &amp; Demonstrations at the 17th ISWC</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Newman</surname>
            ,
            <given-names>S: Building</given-names>
          </string-name>
          <string-name>
            <surname>Microservices-Designing</surname>
          </string-name>
          Fine-grained
          <string-name>
            <surname>Systems</surname>
          </string-name>
          . O'
          <string-name>
            <surname>Reilly</surname>
          </string-name>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Pautasso</surname>
            ,
            <given-names>C:</given-names>
          </string-name>
          <article-title>RESTful Web Service Composition with BPEL for REST</article-title>
          .
          <source>Data and Knowledge Engineering</source>
          <volume>68</volume>
          (
          <issue>9</issue>
          ) (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Speicher</surname>
            ,
            <given-names>S</given-names>
          </string-name>
          , Arwe,
          <string-name>
            <given-names>J</given-names>
            , and
            <surname>Malhotra</surname>
          </string-name>
          , A, eds.:
          <source>Linked Data Platform</source>
          <volume>1</volume>
          .0. Recommendation,
          <year>W3C</year>
          . (
          <year>2015</year>
          ). http://www.w3.org/TR/ldp/
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13. Stadtmuller, S, Speiser,
          <string-name>
            <surname>S</surname>
          </string-name>
          , Harth,
          <string-name>
            <given-names>A</given-names>
            , and
            <surname>Studer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R</given-names>
            :
            <surname>Data-Fu</surname>
          </string-name>
          :
          <article-title>A language and an interpreter for interaction with R/W Linked Data</article-title>
          .
          <source>In: Proc. 22nd WWW</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>