<!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>A Tool for the Analysis of DMN Decision Tables</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ulari Laurson</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabrizio Maria Maggi</string-name>
          <email>f.m.maggig@ut.ee</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Tartu</institution>
          ,
          <country country="EE">Estonia</country>
        </aff>
      </contrib-group>
      <fpage>56</fpage>
      <lpage>60</lpage>
      <abstract>
        <p>The Decision Model and Notation (DMN) is a standard notation to specify decision logic in business applications. A central construct in DMN is a decision table. The rising use of DMN decision tables to capture and to automate everyday business decisions fuels the need to support analysis tasks on decision tables. This paper presents an opensource DMN editor to tackle three analysis tasks: detection of overlapping rules, detection of missing rules and simpli cation of decision tables via rule merging. The tool has been tested on large decision tables derived from a credit lending data-set.</p>
      </abstract>
      <kwd-group>
        <kwd />
        <kwd>Decision Table</kwd>
        <kwd>Decision Model and Notation</kwd>
        <kwd>Camunda</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Copyright c 2016 for this paper by its authors. Copying permitted for private and
academic purposes.
vide a common notation that is readily understandable for all business users
including business managers, analysts, and developers. DMN consists of two
levels: a \decision requirements level" and a \decision logic level". The decision
requirements level de nes input data needed to make a decision. The decision
logic level describes how each decision is made. Decisions are usually expressed
as decision tables. In decision tables, columns represent inputs and outputs of
a decision, and rows represent rules. Columns typically are typed so that they
have an associated domain. A rule is a conjunction of basic expressions (one
basic expression per cell). Basic expressions are captured using a language known
as S-Feel (Simpli ed Friendly Enough Expression Language).</p>
      <p>In Figure 1, we see an example of a decision table. The rules in the decision
table should be interpreted as follows:
1. If the customer asks for a loan duration of 36 and her annual income is less
than or equal to 56943, then she gets grade \C."
2. If the customer asks for a loan duration of 36 and her annual income is
greater than 56943, then she gets grade \A."
3. If the customer asks for a loan duration of 60, then she gets grade \B."</p>
      <p>
        Using DMN decision tables for making critical business decisions raises the
question of ensuring their correctness and simplicity to prevent costly defects.
The tool presented in this paper implements scalable algorithms for two basic
correctness checking tasks over DMN tables and one algorithm for simpli cation
task [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The two correctness checking tasks are the detection of overlapping rules
and the detection of missing rules. The detection of missing rules allows the user
to check the completeness of the table, while the detection of overlapping rules
allows the user to identify: (i) inconsistent rules, meaning two rules that overlap
and that are associated with two di erent outputs; and (ii) redundant rules,
meaning two rules that overlap and that have the same output.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Tool</title>
      <p>We implemented our tool starting from dmn-js, the open-source rendering and
editing toolkit of Camunda DMN.2 We extended dmn-js to support correctness
veri cation and simpli cation. Our tool can be found at https://github.com/
ulaurson/dmn-js and a deployed version for testing is available at http://
dmn.cs.ut.ee/. A screencast of the tool demo can be found at https://www.
dropbox.com/s/nc0vibw2jlv0p3l/DMN_Screencast.mp4?dl=0.</p>
      <p>The tool provides a syntactic check that veri es whether each cell of a decision
table has the right content. The implemented algorithm checks if the content of
each cell matches its column type.3 If not, the cell becomes red and a tooltip is
added. In Figure 2, we see two syntactic errors. In the third rule rst column we
have a syntactic error because this cell should contain a double but it contains a
string. Another syntactic error is in the rst rule second column. This cell should
contain a string, but it contains an integer.</p>
      <sec id="sec-2-1">
        <title>2 https://camunda.org/</title>
        <p>3 Our tool supports types integer, string, Boolean, and double.</p>
        <p>When clicking verify table (see Figure 2), the tool nds all the overlaps in the
decision table. The tool can nd two types of overlaps: overlaps where inputs and
outputs are the same and overlaps where inputs are the same and at least one
output is di erent. In Figure 3, we see that the tool has found two overlaps. Rules
2 and 5, and rules 4 and 6 have overlaps. The overlapping rules are summarized
in the \Missing and overlapping rules" table. This table contains maximal sets
of overlapping rules with a non-empty intersection. If \(outputs are the same)"
is explicitly mentioned in a set of overlapping rules, then these rules have the
same inputs and outputs, otherwise they have di erent outputs. The overlapping
rules are highlighted in light red.</p>
        <p>When clicking verify table, the tool also nds the missing rules in the decision
table. In Figure 4, the decision table has three missing rules. The rst value inside
the brackets shows what is missing in the rst input column, the second value
shows, what is missing in the second input column and so on. In Figure 4, we can
see that there are three types of missing rules. In the rst case, a categorical value
is missing. Corresponding to interval [21, 65) there is no rule with \Customer
Status" = \gold". In the second case, an interval is missing. In the decision table,
there is no rule where \Age" = [65, 80). The third case has a missing Boolean
value. With \Age" &gt;= 80 and \Customer Status" = \gold" or \silver" there is
no rule with \Lives in Estonia" = true. The missing rules are summarized in the
\Missing and overlapping rules" table. The rst column of this table contains
information about the missing rules. The second column contains a button for
adding the missing rules into the table.</p>
        <p>When clicking simplify table (see Figure 2), the tool simpli es the decision
table via rule merging. In Figure 5, the rst decision table is a regular decision
table that has no overlapping rules and no missing rules. The second decision
table represents the simpli ed version of the rst table. Rules 1, 2, and 6 can be
merged because these rules only di er in one input (the outputs are the same).
Rules 3, 4, and 7 can also be merged. Rules 1 and 3 in the second table cannot
be merged because their outputs are di erent.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Maturity and Inherence</title>
      <p>Based on the tool implementation, we have conducted empirical evaluations
to compare the proposed algorithms with respect to existing approaches (in
particular the one implemented in Signavio4) in terms of scalability, conciseness
of the feedback provided to users (in case of overlapping and missing rules) and
compactness of the simpli ed tables. The tests have been conducted on large
decision tables derived from a credit lending data-set.</p>
      <sec id="sec-3-1">
        <title>4 http://www.signavio.com</title>
        <p>
          Execution times for missing rules detection are under 2 seconds. The
detection of overlapping rules leads to higher execution times, due to the need to
detect sets of overlapping rules and ensure maximality. In Signavio, if multiple
rules have a joint intersection (e.g., rules fr1, r2, r3g) the output contains an
overlap entry for the triplet fr1, r2, r3g but also for the pairs fr1, r2g, fr2, r3g
and fr1, r3g (i.e., subsets of the overlapping set). Furthermore, in some cases,
the overlap of pair fr1, r2g may be reported multiple times (and same for fr2,
r3g and fr1, r3g). Meanwhile, our approach produces only maximal sets of
overlapping rules with a non-empty intersection. Therefore, the number of sets of
overlapping rules and the number of missing rules identi ed by our approach
is drastically lower than the number of overlapping and missing rules identi ed
by Signavio. For more information about our experimentation of the tool, the
reader is referred to [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dumas</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Laurson</surname>
            ,
            <given-names>U</given-names>
          </string-name>
          .,
          <string-name>
            <surname>Maggi</surname>
            ,
            <given-names>F.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Montali</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Teinemaa</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Semantics and analysis of DMN decision tables</article-title>
          .
          <source>In Proceedings of the 14th International Conference on Business Process Management (BPM) 2016</source>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2. Object Management Group:
          <article-title>Decision Model and Notation (DMN) 1</article-title>
          .0 (
          <issue>2015</issue>
          ), http: //www.omg.org/spec/DMN/1.0/
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>