<!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>Dynamic Evaluation Forms using Declarative Modeling</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Rasmus Str msted</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hugo A. Lopez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>S ren Debois</string-name>
          <email>deboisg@itu.dk</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Morten Marquard</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DCR Solutions A/S</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Exformatics A/S</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>IT University of Copenhagen</institution>
          ,
          <country country="DK">Denmark</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper reports preliminary experiences using the Dynamic Condition Response (DCR) graphs declarative process notation to specify dynamic evaluation forms, and using an execution engine for that notation to subsequently \run" the form. The DCR notation was able to express all the patterns of behaviour necessary for a real case: a post-hoc evaluation form for a Danish arbitration court, \Voldgiftsn vnet for Anl g og Byggeri". However, some patterns were somewhat cumbersome to express.</p>
      </abstract>
      <kwd-group>
        <kwd>forms</kwd>
        <kwd>declarative process model</kwd>
        <kwd>Dynamic Condition Response</kwd>
        <kwd>DCR</kwd>
        <kwd>process execution</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        This paper presents a preliminary experience report using the DCR Solutions
declarative process engine [
        <xref ref-type="bibr" rid="ref2 ref3 ref4">4, 3, 2</xref>
        ] as a mechanism for implementing dynamic
web forms [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] in Exformatics ECM. We investigate the question whether the
Dynamic Condition Response (DCR) graph process language is exible enough
to model the requirements of a real-life evaluation form example, by applying
the methodology to an evaluation form commissioned by the Danish arbitration
court \Voldgiftsn vnet for Anl g og Byggeri" (VBA).
      </p>
      <p>
        Related work Forms have strong similarities with declarative process notations
explored [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]: (1) The order of execution is exible: the user may ll in the form
in whatever order he prefers, and (2) forms have constraining rules, e.g. \If eld
A is lled in, then also eld B must be lled in ".
      </p>
      <p>The premiere extant commercially/freely available services for constructing
on-line evaluation forms are provided by SurveyMonkey and Google Forms. Both
products emphasize ease-of-use, both for the form constructor and the end-user.</p>
      <p>A SurveyMonkey form is speci ed as a list of elds. Each eld has a type
(e.g., multiple choice, number, text, etc.), and the form designer may choose
the ordering of elds. Both SurveyMonkey and Google Forms o er dynamically
changing behaviour: 1. SurveyMonkey has so-called \skip page logic". This
feature allows the form designer to set conditions to control the sequence ow of
the form. In SurveyMonkey this is done by grouping questions in pages, and
using conditional statements on questions to control whether or not the group
of questions will be shown. 2. Randomized sequence features, which shu es the
evaluation question 3. Dynamic labeling, which SurveyMonkey calls \Question
&amp; Answer Piping". This feature allows the form designer use text variables in
question labels; the value of the variable is set to the answer of a given previously
answered question.
2</p>
    </sec>
    <sec id="sec-2">
      <title>DCR Graphs</title>
      <p>
        In this section, we give a brief introduction to the Dynamic Condition Response
(DCR) graph process notation [
        <xref ref-type="bibr" rid="ref1 ref5">1, 5</xref>
        ]. A DCR graph is a directed multigraph
where nodes are activities, and edges are relations between activities. Each
activity has an associated state (i.e.: Executed, Included, and Pending). The
\Executed" state indicates whether the activity was previously executed. The
\Included" state indicates whether it is currently relevant for the work ow. Finally,
the \Pending" state indicates whether the activity must execute (or be made
not \Included") before the work ow can be considered complete.
      </p>
      <p>DCR is a declarative notation: processes are speci ed not by explicit sequence
ows, but by the rules (relations) governing which sequence ows are
admitted and which are not. Relations between activities indicate (1) constraints on
whether an activity may be executed depending on the states of other activities,
and (2) how executing one activity may a ect the state of another.</p>
      <p>E.g., suppose (a) that an activity \Payout" is constrained to not happen
unless \Approve payout" happened rst; and (b) that executing \Payout" changes
the state of itself to be \no longer relevant" (to prevent a second payout).</p>
      <p>
        DCR Solutions provides an on-line process portal4, for creating and
simulating DCR graphs [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. DCR Graphs answer to the following graphical notation:
{ Activities: First class citizens, they are denoted by grey boxes.
{ Condition (Yellow arrow): A constraining relation, e.g., activity A has to be
executed before activity B.
{ Response (Blue arrow): A follow-up relation, e.g., after activity A has been
executed activity B is set to 'Pending', which means that B must happen or
be excluded for the work ow to complete.
{ Exclude (Red arrow): Makes an activity irrelevant, e.g., if activity A is
executed, activity B is set to 'not included'. Irrelevant activities are disregarded
as conditions and cannot be executed.
{ Include (Green arrow): Opposite of Exclude: re-instates an activity.
4 http://dcrgraphs.net
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>DCR Forms</title>
      <p>In order to use DCR Graphs to build a form, we interpret activities as elds in
the form, then we use relations to de ne the dynamic behaviour, e.g., to turn on
and o one form eld/activity depending on the value of another eld.</p>
      <p>Fig. 1 provides an example of a form in DCR graphs. There are six activities.
The title of the activity corresponds to a eld text question in the form. An
activity is executed with a green tick, and solid (resp. dashed) borders in an
activity denote whether it is included (resp. excluded). A pending activity has
a blue exclamation mark. Colored arrows denote relations in Sec. 2.</p>
      <p>Notice how states of activities are drawn in Fig. 1, with three activities
initially excluded. Two activities have pending states, indicating that they must
be executed or excluded in the form to be deemed complete.</p>
      <p>Each activity has a role and a label onto it. The green relation arrow from
\Activity 2" includes a parent activity, including the nested activities \Activity 3
$(var)" and \Activity 4". Relations may have guards, as exhibited in the arrows
between \Activity 4" and \Activity 5". They are used to constrain behaviour
based on input.</p>
      <p>Fig. 1 uses some modelling techniques for creating forms using DCR graphs:
1. Mandatory elds as pending activities: The pending state of \Activity
2" indicates that it must be executed before the work ow is complete. For
forms, we interpret this as the eld \Activity 2" being mandatory: The form
cannot be submitted unless \Activity 2" has received a value.
2. Guarded inclusions/exclusions: Dual, guarded include/exclude arrows
from \Activity 4" to \Activity 5" represent a common pattern that includes
or excludes \Activity 5" in the work ow/form depending on the value of
\Activity 4".
3. Self-responses as content-control: A self-response on \Activity 6" is
guarded by \Activity 6 = null". Since \Activity 6" is already a mandatory
eld because of the blue exclamation mark, it ensures that if the eld is
lled, and it is cleared at a later stage, it goes back to a pending/mandatory
state.</p>
      <p>The following new features in the DCR process portal were useful for the
development of declarative forms:
Sequence Editor and Form Preview The DCR process portal allows setting
sequencing and grouping elds by drag-and-drop order controls. Fig. 2 shows on
the left side the order of the sequence editor tool. When the form is shown in the
preview (right side), it simulates what the recipient will see. Notice that only
the included activities of Fig. 1 are shown.</p>
      <p>Dynamic Labels. DCR process portal supports dynamic labels. In Fig. 1 the
activity \Activity 3" has label \Activity 3 $(var)". At run-time this label will
evaluate the contents of variable \var". This variable is bound to the input given
at \Activity 2". The variable can be used for both roles and activity labels.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Evaluation Form for Voldgiftsn</title>
    </sec>
    <sec id="sec-5">
      <title>Proceedings vnet's Arbitration</title>
      <p>We now report on using the above mechanisms to specify a real-life for the VBA
case. The initial requirements for VBA's evaluation form were simple: After an
arbitration, VBA would send an evaluation form to the involved parties. The
evaluation questions included how satis ed parties were with VBA as
arbitrators, with the process followed, and with the outcome of the proceeding. The
exact questions were outlined by VBA, and Exformatics produced from this
speci cation a DCR graph to be interpreted as a web form.</p>
      <p>The VBA speci cation actually called for evaluation of ve di erent types of
arbitration proceedings, called (A), (G), (P), (Q), (C). An evaluation comprised
both a set of general questions and a set of type-speci c questions. The (C) type
was a special case, and had choices which would include other proceeding types.
Some of the proceeding types shared speci c questions e.g. (P) and (G).
The structure of the model is given in Fig. 35. Exformatics used roles to denote
the arbitration proceeding type, and colors to ease the readability of the
graphical presentation. The choice of which evaluation form to present was made using
the guarded include/exclude pattern: A choice eld allowed the user to pick a
type of proceedings, who will control the remaining content to be shown.</p>
      <p>Exformatics and VBA lled the evaluation structure with the questions
outlined, see Fig. 4. The model uses guards to impose the desired behaviour; e.g.:
activity C will be only included if the case type (\Sagstype" in Danish) required
is \C", and will be excluded otherwise.</p>
      <p>Robotic support: Activities in Fig. 4 that correspond to the 'Exformatics' role
are executed automatically. The data required for such activities is collected from
the VBA database. The data was used to set variables for use as dynamic labels.
4.2</p>
      <p>Adaptation
VBA intended to continuously improve the form after its initial development,
and they needed to collect statistics on the answers collected. It was therefore
vital that (1) the DCR graph could be accessed and modi ed by VBA sta ; (2)
that VBA sta could in fact understand and modify the graph; and (3) that
VBA could have a data-extraction process that was stable under graph updates.</p>
      <p>A key challenge was that VBA sta on the project did not have prior
programming experience. However, the sta quickly acquired basic modelling
competences, and contributed to model development. Nonetheless, understanding
elements of the DCR Graph remained cumbersome for some sta .
5 The full graph is accessible at http://www.dcrgraphs.net/tool/main/Graph?id=
da7c4489-578c-4b94-b17c-66ceb214692c
5</p>
    </sec>
    <sec id="sec-6">
      <title>Discussion</title>
      <p>
        Unlike the previous use cases for DCR as declarative processes [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], evaluation
forms require further data eld support. For instance, to express questions such
as \On a scale from 1 to 10, how much do you like...". A 'slider' eld type was
added to the DCR Form, which lets the user drag a handle to on a scale set
by the form designer. In future work we would like to include further support
for additional eld types, e.g.: Multi-checkbox, Star rating, Matrix scale, Image
choice, etc. This is, however, orthogonal to the behaviour of the form.
      </p>
      <p>Mapping some standard behaviour of forms into DCR models proved to be
challenging. That was the case of mandatory elds: One must add a pending
activity combined with a self-response guarded by null, as discussed above. As
seen in Fig. 4 most activities use this technique. In further work, we will
consider adding process templates to the DCR portal to encapsulate this kind of
behaviour, especially for readability.</p>
      <p>In the forms case, include/exclude relations tend to come in pairs
corresponding to the true and false branches of a condition. It would be helpful to express
such choices in a single relation. The image below (Fig. 5) illustrates how the
VBA evaluation graph might look had such a relation been available.</p>
      <p>One of the main di erences between DCR and SurveyMonkey is the control
of the sequence ow. Compared to DCR, SurveyMonkey o ers only a limited
version of declarative conditional rules. SurveyMonkey only supports one condition
for each question and SurveyMonkeys \skip" logic is bound to page breaks, in
contrast to DCR which responds with change every time the user engage with a
eld. The exibility of DCR was in fact instrumental to satisfy the requirements
made by the customer. For instance, without the inclusion of DCR relations,
it would have been challenging in SurveyMonkey to model VBAs evaluation,
whereas this comes more naturally in DCR.</p>
      <p>The second di erence was economy: by using DCR Graphs's declarative
notation we were able to minimize the number of elds produced, enabling them
depending on the type of proceeding. As a consequence (1) From a maintenance
perspective, new changes to the forms have become agile; change is done to one
activity, not to several. (2) From a data analysis perspective, the data from the
di erent types were directly compatible on extraction, not having to merge data
from the di erent proceeding types.</p>
      <p>
        As mentioned in Sec. 4.2, one of the challenges remaining is to bridge the
adoption gap between declarative models and users with no experience in
declarative modelling, for instance, lawyers. In future iterations we would like to
explore how tools that maintain the correspondences between natural language
speci cations and DCR graphs (i.e.: [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]) help us bridging such a gap.
6
      </p>
    </sec>
    <sec id="sec-7">
      <title>Conclusion</title>
      <p>The DCR graphs formalism successfully expressed the required dynamic
behaviour of the VBA evaluation form. However, the modelling was not entirely
straightforward, as the addition of Dynamic Labels and new a eld type was
introduced, and expressing dynamic behaviour via DCR relations remain in some
cases arti cial. In the future, DCR Solutions will study the inclusion process
templates in order to facilitate abstraction and process reuse in the tool.
Acknowledgments Work supported by the Innovation Fund Denmark project
EcoKnow.org (7050-00034A). This project has received funding from the European Union's
Horizon 2020 research and innovation programme under the Marie Sklodowska-Curie
grant agreement BehAPI No.778233.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Debois</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hildebrandt</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>The DCR Workbench: Declarative Choreographies for Collaborative Processes</article-title>
          .
          <source>In: Behavioural Types: from Theory to Tools</source>
          , pp.
          <volume>99</volume>
          {
          <fpage>124</fpage>
          . River Publishers (
          <year>Jun 2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Debois</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hildebrandt</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marquard</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Slaats</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Hybrid Process Technologies in the Financial Sector: The Case of BRFkredit</article-title>
          . In: Business Process Management Cases, pp.
          <volume>397</volume>
          {
          <fpage>412</fpage>
          .
          <string-name>
            <surname>Management</surname>
          </string-name>
          for Professionals, Springer, Cham (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Debois</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hildebrandt</surname>
          </string-name>
          , T.T.,
          <string-name>
            <surname>Marquard</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Slaats</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>The DCR Graphs Process Portal</article-title>
          .
          <source>In: BPM Demo Track</source>
          <year>2016</year>
          . pp.
          <volume>7</volume>
          {
          <issue>11</issue>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Debois</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hildebrandt</surname>
          </string-name>
          , T.T.,
          <string-name>
            <surname>Slaats</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marquard</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>A Case for Declarative Process Modelling: Agile Development of a Grant Application System</article-title>
          .
          <source>In: EDOC '14</source>
          . pp.
          <volume>126</volume>
          {
          <fpage>133</fpage>
          . IEEE Computer Society (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Hildebrandt</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mukkamala</surname>
            ,
            <given-names>R.R.</given-names>
          </string-name>
          :
          <article-title>Declarative Event-Based Work ow as Distributed Dynamic Condition Response Graphs</article-title>
          .
          <source>In: Post-proceedings of PLACES 2010. EPTCS</source>
          , vol.
          <volume>69</volume>
          , pp.
          <volume>59</volume>
          {
          <issue>73</issue>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Lopez</surname>
            ,
            <given-names>H.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Debois</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hildebrandt</surname>
          </string-name>
          , T.T.,
          <string-name>
            <surname>Marquard</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The process highlighter: From texts to declarative processes and back</article-title>
          .
          <source>In: BPM Demo Track</source>
          <year>2018</year>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Marquard</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Debois</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Slaats</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hildebrandt</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Forms are declarative processes! (2016), presented at the BPM 2016 Industry track</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>