<!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>Declo: A Chatbot for User-friendly Speci cation of Declarative Process Models</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Anti Alman</string-name>
          <email>anti.alman@ut.ee</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Karl Johannes Balder</string-name>
          <email>han@informatik.uni-mannheim.de</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabrizio Maria Maggi</string-name>
          <email>maggi@inf.unibz.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Han van der Aa</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Free University of Bozen-Bolzano</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Mannheim</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Tartu</institution>
          ,
          <country country="EE">Estonia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Proposed approaches for modeling knowledge-intensive processes include declarative, constraint-based solutions, which meet halfway between support and exibility. A noteworthy example is the Declare framework, which is equipped with a graphical declarative language whose semantics can be expressed with multiple logic-based formalisms. So far, the practical use of Declare constraints has been mostly hampered by the di culty of modeling them: the formal notation of Declare represents a steep learning curve for users lacking an understanding of temporal logic, while the graphical notation has proven to be unintuitive. This work presents Declo, a chatbot that allows users to easily de ne declarative constraints using natural language statements provided in the form of vocal or textual input. The supported constraints cover the entire Multi-Perspective extension of Declare (MP-Declare), complementing control- ow constraints with data and temporal perspectives.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Knowledge-intensive processes are known to be complex and unpredictable [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
These types of processes are di cult to model with standard procedural process
modeling languages like BPMN (because these languages would produce complex
models di cult to understand), but are more suitable to be represented with
declarative process modeling languages like Declare [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        However, Declare is known to be di cult to use in practice since its formal
notation represents a steep learning curve for users lacking an understanding
of temporal logic, while its graphical notation has proven to be unintuitive [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
Declo is a chatbot supporting users in the speci cation of declarative process
models using natural language. Users can de ne constraints providing them in
the form of vocal or textual input without the need for previous knowledge about
Declare. The constraints covered by Declo include the entire Multi-Perspective
extension of Declare (MP-Declare) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], complementing control- ow constraints
with data and temporal perspectives.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Approach and Features</title>
      <p>
        With Declo, the user can build declarative process models using natural
language. A natural language statement can be provided using a chat, or a vocal
input. In the latter case, the vocal input is recorded and interpreted using speech
recognition. In both cases, to interpret the text, the tool rst presented in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] is
used for the automatic extraction of constraints from natural language.1
Linguistic processing. During the rst step of the constraint extraction,
linguistic processing is performed to identify the semantic components from the
input statement. Verbs are used to express actions in natural language texts, e.g.,
\to create". They can be e ectively identi ed by using part-of-speech taggers.
The subject of a verb speci es the entity performing the action (e.g., a manager
creating a claim), while the object of a verb speci es the entity acted upon (e.g.,
a claim that is created). Subjects and objects are identi ed by computing
dependency grammars using natural language processing techniques, which reveal
the grammatical relationships among words using dependency relations.
      </p>
      <p>The extracted verbs, objects, and subjects are further enhanced with
speci ers, i.e., modal verbs, negations and prepositions. Modal verbs are
auxiliary verbs indicating feasibility (mainly \can/could", \may/might", \must",
\will/would", \shall/should") and are used to identify certain constraints, e.g.,
response (expressing the concept of obligation) and precedence (expressing the
concept of permission). Negations are identi ed through the negative dependency
relation and are used to identify negative constraints. Prepositions express
relationships between nouns and other parts of a sentence; for example, the term
\immediately" speci es the immediacy of the action (e.g., when specifying
constraints of type chain).</p>
      <p>Activity extraction. Activities can be either verb-based or noun-based.
Verbbased activities are constructed from the semantic components extracted during
the previous processing step, where the verb stands for the action, its subject
for the actor and its object for the activity's business object. For example, the
sentence \a manager processes a claim" translates to the activity process claim,
with manager as the actor. Noun-based activities appear in a statement as noun
phrases which correspond to process activities, e.g., \processing of a claim".
In order to extract these activities, the tool focuses on identifying verbs which
describe the process ow, i.e., temporal verbs such as \to start", \to precede",
\to end", \to follow", \to happen". The object and/or the subject of the verb
are used to generate the activity.</p>
      <p>Data and time conditions. Declo supports adding data and time
perspectives to declarative constraints, e ectively turning Declare constraints into
MPDeclare constraints. Three types of conditions are supported: activation,
correlation and time conditions. Data and time conditions express more textual
fragments rather than full sentences, unlike constraints; in addition, as they
1 The tool can be found at https://github.com/hanvanderaa/declareextraction
are short statements, their variance is much lower than that of declarative
constraints. As such, the tool uses pattern matching to extract conditions instead
of grammatical parsing used during constraint generation.</p>
      <p>Activation conditions de ne requirements that must be met for a constraint
to be activated, e.g., the creation of a claim must be followed by a check only if
the amount of the claim created is greater than a set value. Correlation conditions
must be adhered to when the target of a constraint is being executed, expressing
relations that must exist between attributes of the activation and the target.
Declo supports two types of correlation conditions, i.e., either that the attribute
values should be the same (e.g., \the amount is the same") or di erent (e.g., \the
resource is di erent") for the activation and the target of a constraint. Complex
conditions are supported by concatenating multiple logical statements: an
input string is rst split into substrings by detecting coordinating conjunctions
(and and or ) and splitting the string accordingly. Each substring is expected to
match an expression. Expressions are then joined with logical operators. Pattern
matching is supported on both numerical and categorical attributes.</p>
      <p>Time conditions specify the time elapsed between the activation and the
target of a constraint, e.g., that the target should occur between 2 to 6 days
after the activation. Time conditions speci ed using seconds, minutes, hours
and days are supported.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Pipeline and Implementation</title>
      <p>Declo is integrated into the Rule Mining toolkit RuM2 and is implemented using
Java 11 and the speech recognition API provided by Google Cloud Speech.3</p>
      <p>To interact with the chatbot, the user needs to access the MP-Declare editor
of RuM, create a new MP-Declare model and press the \Start listening" button
or the \Let's write" button in the chat. In the rst case, Declo will listen for an
input sentence from the microphone. Once the tool has recognized a sentence,
it displays the sentence and adds the detected activities and constraints to the
graphical model, to the list of activities and to the list of constraints. Then, Declo
asks the user if the sentence was recognized correctly. If this is not the case, it
is possible to edit the recognized sentence or discard the recognized constraints
entirely and record again. If the user presses the \Let's write" button the sentence
can be directly typed into the chat. Data and time conditions can also be added
via speech recognition or the chat using the corresponding buttons: \Activation"
for activation conditions, \Correlation" for correlation conditions, and \Time"
for time conditions. Also these conditions can be modi ed or discarded. The user
can repeat the steps above to create additional constraints.</p>
      <p>
        Fig. 1 displays a screenshot of the MP-Declare editor in RuM. The top-left
area of the screen shows the chat. The graphical notation of the constraints is
shown in the top-right area of the screen, with the modi able lists of activities
and constraints in the bottom part of the screen. A screencast demonstrating
the tool is available at https://www.youtube.com/watch?v=M kBu9Bqso.
2 www.rulemining.org
3 https://cloud.google.com/speech-to-text/
A qualitative user study, presented in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], was conducted to test the speech
recognition component of Declo with the aim of (1) nding ways to improve the
interface, (2) analyzing issues and needs of users from di erent backgrounds, and
(3) discovering possible usage scenarios. For the study, eight participants were
selected with di erent characteristics. Two participants were selected for their
experience related to BPM (tier 1); two for their background in temporal logics
(tier 2); two for having used Declare for modeling temporal constraints (tier 3);
and two participants for having used di erent tools to model, analyze and execute
Declare models (tier 4). The di erent backgrounds were used for di erentiation
in order to study how users with di erent levels of expertise perceive the tool
and recognize possible issues and needs.
      </p>
      <p>
        The study was conducted via Skype by a team consisting of a facilitator
and an observer, with the facilitator guiding the participant and the observer
serving in a supporting role. The participant shared her/his screen, whereas the
facilitator started the video recording and began guiding the participant through
a prepared test scenario, which consisted of constructing a declarative process
model using speech recognition. At the end of the study, a follow-up interview
was conducted, focusing on resolving questions about the issues the participants
had encountered. The participants were asked what they liked about the tool,
wished was di erent, under which circumstances they would use it. The study
concluded with a post-survey questionnaire consisting of multi-point Likert scales
including the System Usability Scale (SUS) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and scales covering satisfaction,
expectation con rmation, continuation intention, and usefulness adapted from
      </p>
      <p>
        tier 1 tier 2 tier 3 tier 4
(P6, P7) (P3, P8) (P2, P4) (P1, P5)
71.25
3.67
3.67
2.33
2.63
81.25
3.67
3.50
2.00
3.13
[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The collected data was analyzed by rst creating an a nity diagram [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] based
on the observations, follow-up interviews and video recordings by associating
each reported issue with a single paper note. The notes were then clustered
based on the appearing themes, resulting in 139 notes over 21 clusters. The data
extracted from the questionnaires served as an additional qualitative data point
(see Table 1).
      </p>
      <p>
        Compared to the commonly reported average SUS score of 68 [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], the
average score of 73.13 shows that using speech recognition for declarative process
modeling is reasonably feasible, although, from the interviews, this approach
resulted to be largely recognized to be especially suitable for mobile environments.
For this reason, the most signi cant improvement applied to the tool presented
in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] was to integrate the speech recognition mechanism with the chat, which
represents a valid alternative in the context of desktop applications.
Acknowledgments. This research is supported by the Estonian Research
Council (project PRG887).
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>van der Aa</surname>
          </string-name>
          , H.,
          <string-name>
            <surname>Balder</surname>
            ,
            <given-names>K.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maggi</surname>
            ,
            <given-names>F.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nolte</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          : Say It In Your Own Words:
          <article-title>De ning Declarative Process Models Using Speech Recognition</article-title>
          . In: BPM Forum.
          <article-title>(</article-title>
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>van der Aa</surname>
            , H.,
            <given-names>Di</given-names>
          </string-name>
          <string-name>
            <surname>Ciccio</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leopold</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reijers</surname>
            ,
            <given-names>H.A.</given-names>
          </string-name>
          :
          <article-title>Extracting declarative process models from natural language</article-title>
          .
          <source>In: CAiSE</source>
          . pp.
          <volume>365</volume>
          {
          <fpage>382</fpage>
          . Springer (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Bhattacherjee</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Understanding information systems continuance: an expectation-con rmation model</article-title>
          .
          <source>MIS</source>
          quarterly pp.
          <volume>351</volume>
          {
          <issue>370</issue>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Brooke</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , et al.:
          <article-title>SUS-a quick and dirty usability scale</article-title>
          .
          <source>Usability evaluation in industry 189(194)</source>
          ,
          <volume>4</volume>
          {
          <issue>7</issue>
          (
          <year>1996</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Burattin</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maggi</surname>
            ,
            <given-names>F.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sperduti</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Conformance checking based on multiperspective declarative process models</article-title>
          .
          <source>Expert Syst. Appl</source>
          .
          <volume>65</volume>
          ,
          <issue>194</issue>
          {
          <fpage>211</fpage>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Di</given-names>
            <surname>Ciccio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Marrella</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Russo</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>Knowledge-intensive processes: characteristics, requirements and analysis of contemporary approaches</article-title>
          .
          <source>JoDS</source>
          <volume>4</volume>
          (
          <issue>1</issue>
          ),
          <volume>29</volume>
          {
          <fpage>57</fpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Haisjackl</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barba</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zugal</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>So</surname>
            <given-names>er</given-names>
          </string-name>
          , P.,
          <string-name>
            <surname>Hadar</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reichert</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pinggera</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weber</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Understanding Declare models: strategies, pitfalls, empirical results</article-title>
          .
          <source>Software &amp; Systems Modeling</source>
          <volume>15</volume>
          (
          <issue>2</issue>
          ),
          <volume>325</volume>
          {
          <fpage>352</fpage>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Holtzblatt</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wendell</surname>
            ,
            <given-names>J.B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wood</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Rapid contextual design: a how-to guide to key techniques for user-centered design</article-title>
          .
          <source>Elsevier</source>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Pesic</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schonenberg</surname>
            , H., van der Aalst,
            <given-names>W.M.P.</given-names>
          </string-name>
          : Declare:
          <article-title>Full support for loosely-structured processes</article-title>
          .
          <source>In: EDOC</source>
          . pp.
          <volume>287</volume>
          {
          <issue>300</issue>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>