<!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>Towards a Theory of Query Stability in Business Processes</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Elisa Marengo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Werner Nutt</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ognjen Savkovic´</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Faculty of Computer Science Free University of Bozen-Bolzano</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Data quality has attracted attention in theoretical database research in the past few years
and different aspects, such as consistency, accuracy, currency, and completeness have
been investigated [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">1–3</xref>
        ]. One of the main factors that determine data quality is where
and how data originate. We believe that analyzing how business processes generate
data allows one to gather additional information on their fitness for use. Specifically,
we want to understand whether an ongoing business process that reads from and writes
into a database can affect the answer to a query or whether the answer is stable, that is,
it will not change as a result of the process.
      </p>
      <p>As motivating example consider the student registration at the University of
BozenBolzano. In November the student office distributed a report showing the numbers of
students enrolled in the offered courses. When comparing the numbers with those of
the previous years, the Master in Computer Science (MScCS) showed a decrease, in
contrast with other courses, like the Master in Economics (MScECO), that registered
a substantial increase. The reason for this discrepancy was a complication in the
registration process, which foresees two routes to registration: an ordinary one and a second
one via international federated study programs to which some Bolzano courses, like the
MScCS, are affiliated. Due to different deadlines, ordinary registration was concluded
in November while registration for students from federated programs was not. Since
the MScCS is affiliated to some federated programs, but the MScECO not, the query
asking for all MScECO students was stable in November and returned a reliable figure,
while the query for all MScCS students was not and returned too low a number.</p>
      <p>Even though in general a database may be constantly updating, and thus making data
unstable, certain queries may have stable answers, (at least for some period of time).
Registration at our University follows strict rules and is supported by an information
system. If not only the data of the registration process were explicitly available, but also
the rules, such a stability analysis of query answers could potentially be automated.</p>
      <p>Assuming that data are created and manipulated according to a given business
process, a formal reasoning task is to determine whether in all possible executions of such
a process, the answer to a given query will remain the same. Then we say that the query
is stable, and therefore reliable.</p>
      <p>In this work, we propose a simple yet expressive formalism to model business
processes that read, create and write data in an underlying database. We leverage the formal
definition of such a business process to deduce whether a query answer is stable in case
the data is managed according to the rules of the process. We establish exact
complexity measures for checking the stability of conjunctive queries in several variants of
processes. Since our upper complexity bounds stem from reductions to the evaluation
of certain FOL and Datalog queries, our work provides an immediate way for
implementations using technologies such as SQL and ASP engines.</p>
      <p>
        Related Work. Traditional approaches to business processes modeling are
activitycentric and are based on (high-level) Petri Nets [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and standards such as BPMN and
BPEL. These approaches do not capture the specification of a database or the
interaction with it. In recent years, the modeling of data and business processes under the
same umbrella has gained significant attention [
        <xref ref-type="bibr" rid="ref5 ref6 ref7 ref8">5–8</xref>
        ]. Our work can be considered as a
restricted case of [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ] where only database insertions are allowed but not updates or
deletions. Checking properties of processes that allow unboundedly many data is
inherently undecidable, and decidability is obtained by imposing additional restrictions (e.g.,
see state boundedness in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]). As a difference, having insertions only allowed us to
establish new decidable cases without additional restrictions. In the context of databases,
query stability can be related to the problem of queries independent from updates [
        <xref ref-type="bibr" rid="ref10 ref9">9,
10</xref>
        ], i.e. checking when a query is independent from a set of updates over the database,
by considering the update rules but not the database instance.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Data-aware Business Processes</title>
      <p>With our model of data-aware business processes (DABP) we want to capture some
elementary aspects of how data are manipulated by business processes. A DABP over a
schema is a pair B = hP; Ci, consisting of a process part P and a configuration part
C. Intuitively, the process part is fixed. It defines how and under which conditions
actions can change data stored in the configuration part. The configuration part comprises
an instance of the underlying database and the state of all active process instances.
Process Part. The skeleton of the process part is a directed potentially cyclic graph
N = hP; T i, the process net, consisting of a set of vertices P , the places, and a set
of edges T , the transitions. There is one distinguished place in P , the start place start.
There is also a distinguished relation symbol, I, the input of a process instance. The last
argument of I is a timestamp , called the start time, to record the time when the process
instance was started. We denote the schema augmented by I as I . In a process
instance, an object holding an I-atom traverses the graph, starting from start. Thus,
the different transitions emanating from a place represent alternative developments of a
process instance.</p>
      <p>The whole process part is a pair P = hN; Li, which in addition to a network N
comprises a labeling function L that assigns to every transition t 2 T a pair L(t) =
(Et; Wt). Here, Et, the execution condition, is a Boolean query over I and Wt, the
writing rule, is a rule Qt(x) ! R(x) whose head is a relation of and whose body is a</p>
      <p>I -query that has the same arity as the head relation. Evaluating Wt over a -instance
D results in the set of ground atoms Wt(D) = fR(c) j c 2 Qt(D)g. Intuitively,
Et specifies in which state of the database which object can perform the transition t
and Wt specifies which new information is (or can be) written into the database when
studyplan
program registr. master
emSE affil mscCS
emCL affil mscCS
emCL ord mscCS
db ord mscCS
econ ord mscECO</p>
      <p>admitted
student program
bob emCL
mary emSE</p>
      <p>deadline
registr. date
ord 1st Oct
affil 1st Dec
registered
student master program
bob mscCS emCL
affiliated</p>
      <p>start
ordinary</p>
      <p>a_late
admitted</p>
      <p>a_ontime
refuse
accept
register</p>
      <p>end
o_ontime
acad
check
o_late</p>
      <p>reject
Eaffiliated = I(S; P; T ); studyplan(P; affil; M )
Eordinary = I(S; P; T ); studyplan(P; ord; M ); :studyplan(P; affil; M )
Eadmitted = I(S; P; T ); admitted(S; P )</p>
      <p>Erefuse = I(S; P; T ); :admitted(S; P ); studyplan(P; ord; M )</p>
      <p>Ea late = I(S; P; T ); deadline(affil; D); T &gt; D
Ea ontime = I(S; P; T ); deadline(affil; D); T &lt; D
Wregister = I(S; P; T ); studyplan(P; R; M ) ! registered(S; M; P )</p>
      <p>Eo late = I(S; P; T ); deadline(ord; D); T &gt; D
Eo ontime = I(S; P; T ); deadline(ord; D); T &lt; D
Eregister = Eaccept = Ereject = true
performing t. In this paper we assume that Et and Qt are conjunctive queries with
negated atoms and possibly comparisons involving timestamps.</p>
      <p>Example 1. Consider again the scenario described in the Introduction. Table 1(a)
contains a graphical representation of a DABP process net for a simplified student
registration process, together with execution conditions and writing rules.</p>
      <p>A student who wants to register to a program needs to fill a form providing her
name and the program she wants to apply to. When received by the administration, the
request is associated with a timestamp. We represent this information by a ground atom
I (s; p; ) of the relation I . The available programs are of two kinds: those that are
affiliated to international federated programs, and ordinary ones. For federated programs, an
international commission decides about whom to admit and these decisions are stored
in the table admitted. For ordinary programs, the university takes the decision.</p>
      <p>According to this distinction, the first check in the process is to determine to which
kind of program the request I refers to: affiliated (Eaffiliated) or ordinary (Eordinary). In
the first case, a student who is already admitted to the federated program can proceed
towards registration. Non-admitted students can go for an ordinary registration
provided the program is open also to this kind of students (Erefuse). In case the student is
admitted to the federated course, then the corresponding deadline for the application is
looked up in the database: if the request arrived after the deadline (Ea late) then the
registration process ends. Otherwise, if the request arrived on time (Ea ontime) the student
is registered (Eregister) and a corresponding atom is inserted into the database instance
(Wregister). Similarly, for a late ordinary request (Eo late) the process is ended, while for
a request arrived on time (Eo ontime) the academic merits are checked (acad check). This
human intervention is modelled as a non-deterministic choice that can result in the
request being accepted (Eaccept) or rejected (Ereject). If accepted, the student is registered.
Configuration Part. This part models the data that is manipulated by the process part.
Formally, a configuration is a quadruple hD; O; M; i, where D is an instance of the
schema , O is a set of process instances, which we call process objects, M is a
mapping that associates every object o 2 O with a place MP (o) 2 P and with a ground
I -atom I (c) = MI (o), and is a timestamp, the current time. We assume that for all
objects o 2 O the start time in MI (o) is less or equal than the current time.
Example 2. Table 1(b) shows a simplified database instance for our reference scenario.
Relation studyplan stores the study programs offered by the university, the kind of
registration they allow (ordinary or affiliated), and the master they belong to; admitted
contains the students already admitted to a federated program; deadline stores the
registration deadlines for the registrations to ordinary and affiliated courses; registered
contains the students that successfully completed the registration process.</p>
      <p>We consider an input relation I of arity 3, carrying the following information about
the request: (i) the student name; (ii) the requested program; and (iii) the time of the
request. In our example, there are no objects currently in the net.</p>
      <p>Execution of DABP. Let B = hP ; Ci be a DABP, with current configuration C =
hD; O; M; i. There are two kinds of atomic execution steps of a DABP, (i) the
traversal of a transition in the net by an object or (ii) the introduction of a new object.
Traversal of an enabled transition by an object. Consider an object o 2 O with M (o) =
(p1; I (c)). That is, o is at place p1 and I (c) are the input data of o. Let t be a
transition from p1 to p2, with execution condition Et. Then we say that t is enabled
for o if D [ fI (c)g j= Et. Let Wt = (Qt(x) ! R(x) be the writing action of t.
Then the effect of o traversing t is the transition from C = hD; O; M; i to a new
configuration C0 = hD0; O; M 0; i, such that (i) D0 = D [ Wt(D [ fI (c)g) is the
new database; (ii) the set of objects and the current time is the same, and (iii) M 0
is an update of M that reflects the change of place, that is, M 0(o) = (p2; I (c)) and
M 0(o0) = M (o0) for all other objects o0.</p>
      <p>Introduction of an arbitrary object at the start place. Let o0 be a fresh object and let
I (c0; 0) be an atom where c0 is a vector of constants, and the timestamp 0 is
greater or equal than C , the current time of C. Note that the constants in c0 need not
appear in the database or in the process. The result of introducing o0 with info c0 at
time 0 is the configuration C0 = hD; O0; M 0; 0i, where (i) the database instance
is the same as in C; (ii) the set of objects O0 = O [ fo0g has been augmented
by o0; and (iii) the mapping M 0 is an extension of M to O0, obtained by defining
M 0(o0) = (start; I (c0; 0)) and M 0(o) = M (o) for all o 2 O.</p>
      <p>An arbitrary execution is a sequence of atomic execution steps. Since for every
configuration C one can introduce new objects at the start place, there are always several
atomic executions possible for C. We say that a configuration C0 is reachable from C if
there exists a finite sequence of atomic executions, such that C is the first and C0 is the
last configuration in the sequence.</p>
      <p>Finally, we define the property of query stability.</p>
      <p>Definition 1 (Query Stability). Given a DABP B = hP ; Ci and a CQ Q. Then Q is
stable in B if for any reachable configuration C0 = hD0; O0; M 0; t0i holds:</p>
      <p>Q(D) = Q(D0):
We illustrate this property with our running example. Consider the queries Qcs(S)
registered(S; mscCS; P ) and Qeco(S) registered(S; mscECO; P ) that ask for the
students registered at the master in CS, and the master in Economics, respectively.
Depending on the current time, one can analyze the stability of the two queries. If the current
time is before the 1st of October both queries are unstable since arbitrary new students
can register. If the current time is after the 1st of December, both queries are stable since
the two deadlines have passed. When the current time is between two deadlines, Qeco
is stable because the deadline for ordinary programs has passed and mscECO is not
affiliated to any program. On the other hand, Qcs is not stable because it is affiliated to
the program emSE, for which mary did not register yet. Note that if she was registered,
Qcs would be stable since all admitted student would be registered.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Reasoning about Query Stability in DABP</title>
      <p>We investigated how to check whether a conjunctive query Q is stable in a DABP B.
To understand the possible sources of complexity, we studied several types of processes
that differ in the way they interact with the database and the way data can be entered
into the process.</p>
      <p>The first distinction is whether the model allows a process object to read the facts
that itself or another object has written into the database. In the general case, denoted
DABP, this is allowed. The restricted case, denoted DABProwo (read-only write-only),
does not allow this. Formally, it splits the schema into disjoint schemas, the reading
schema r and the writing schema w, such that the execution conditions and the
queries in the writing rules range over r while the heads range over w. Our running
example is in DABProwo.</p>
      <p>We consider a process under open semantics, where new process objects may start
in any moment. Alternatively, we also consider a process under closed semantics, that is
we only admit transition traversals as possible execution steps (no new instances can be
started). In this case, stability of a query depends only on the unfinished objects, while
in open processes, it depends also on new objects that may start.</p>
      <p>We also distinguish the case in which the initial configuration of the process does
not contain any object, called fresh DABP, from the arbitrary case in which we do not
make any assumption on the presence or absence of objects. Notice that under closed
semantics the only interesting case is the arbitrary one (in a closed DABP with a fresh
configuration a query answer is trivially stable since no objects can be inserted).</p>
      <p>Table 2 summarises the complexity of checking stability for the different cases. Due
to the limited space, we provide a brief intuition of the results while omitting the
technical details. In general case, DABP allows unboundedly many new objects (data values)
which combined with negation allows us to encode halting problem. Decidability is
obtained either by disallowing negation (cases in brackets) or by disallowing new
objects (closed semantics). For decidable cases, we established a correspondence between
checking stability and brave entailment in Datalog with negation under stable model
semantics. Similarly, for DABPs without negation we established a correspondence with
entailment in positive Datalog. In the case of DABProwo, the complexity drops
significantly due to the “non-recursive” rules. In particular, stability can be decided by FOL</p>
      <sec id="sec-3-1">
        <title>Semantics &amp;</title>
      </sec>
      <sec id="sec-3-2">
        <title>Init. Conf.</title>
      </sec>
      <sec id="sec-3-3">
        <title>Open &amp;</title>
      </sec>
      <sec id="sec-3-4">
        <title>Arbitrary</title>
      </sec>
      <sec id="sec-3-5">
        <title>Open &amp;</title>
      </sec>
      <sec id="sec-3-6">
        <title>Fresh</title>
      </sec>
      <sec id="sec-3-7">
        <title>Closed &amp;</title>
      </sec>
      <sec id="sec-3-8">
        <title>Arbitrary</title>
        <sec id="sec-3-8-1">
          <title>DABP</title>
          <p>Data
UNDEC.
(CONP)</p>
        </sec>
        <sec id="sec-3-8-2">
          <title>Process</title>
          <p>P
2
P
2</p>
        </sec>
        <sec id="sec-3-8-3">
          <title>Combined</title>
        </sec>
        <sec id="sec-3-8-4">
          <title>UNDEC.</title>
          <p>(EXPTIME)</p>
        </sec>
        <sec id="sec-3-8-5">
          <title>UNDEC.</title>
          <p>(EXPTIME)</p>
        </sec>
        <sec id="sec-3-8-6">
          <title>DABProwo</title>
          <p>Data Process Query Combined
in AC0 CONP
in AC0 CONP
query evaluation. Given a DABProwo and a query we are able to encode the process
part and the query into a FOL query that evaluates to true over the configuration iff the
original query is not stable. The result of query complexity follows from the fact that
deciding whether the two answers of a conjunctive query over two databases are the
same is 2P-complete in the query size.
4</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Future Work</title>
      <p>In this work we investigated the problem of determining the stability of a query answer
when data is manipulated by a business process. As future work we plan to develop the
DABP formalism further in the following ways: (i) consider more expressive queries,
e.g., CQ: or FO; (ii) consider stability of aggregate queries and introduce aggregates
in the process rules; (iii) quantify instability (in case a query is not stable, compute the
minimal and maximal number of possible new answers, e.g., newly registered students);
(iv) consider data quality aspects such as data timeliness and data currency.
Acknowledgements. This work was partially supported by the projects MAGIC and
RARE, funded by the Province of Bozen-Bolzano.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Cong</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fan</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Geerts</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jia</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ma</surname>
          </string-name>
          , S.:
          <article-title>Improving data quality: Consistency and accuracy</article-title>
          . In: VLDB. (
          <year>2007</year>
          )
          <fpage>315</fpage>
          -
          <lpage>326</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Fan</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Geerts</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wijsen</surname>
          </string-name>
          , J.:
          <article-title>Determining the currency of data</article-title>
          .
          <source>ACM Trans. Database Syst</source>
          .
          <volume>37</volume>
          (
          <issue>4</issue>
          ) (
          <year>2012</year>
          )
          <fpage>25</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Razniewski</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nutt</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          :
          <article-title>Completeness of queries over incomplete databases</article-title>
          .
          <source>PVLDB</source>
          <volume>4</volume>
          (
          <issue>11</issue>
          ) (
          <year>2011</year>
          )
          <fpage>749</fpage>
          -
          <lpage>760</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>van der Aalst</surname>
            ,
            <given-names>W.M.P.</given-names>
          </string-name>
          :
          <article-title>Verification of workflow nets</article-title>
          .
          <source>In: ICATPN</source>
          . (
          <year>1997</year>
          )
          <fpage>407</fpage>
          -
          <lpage>426</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Abiteboul</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vianu</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fordham</surname>
            ,
            <given-names>B.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yesha</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Relational transducers for electronic commerce</article-title>
          .
          <source>In: PODS</source>
          . (
          <year>1998</year>
          )
          <fpage>179</fpage>
          -
          <lpage>187</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Bhattacharya</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gerede</surname>
            ,
            <given-names>C.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hull</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Liu,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Su</surname>
          </string-name>
          , J.:
          <article-title>Towards formal analysis of artifactcentric business process models</article-title>
          .
          <source>In: BPM</source>
          . (
          <year>2007</year>
          )
          <fpage>288</fpage>
          -
          <lpage>304</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Deutsch</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sui</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vianu</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Specification and verification of data-driven web services</article-title>
          .
          <source>In: PODS</source>
          . (
          <year>2004</year>
          )
          <fpage>71</fpage>
          -
          <lpage>82</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Bagheri</given-names>
            <surname>Hariri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Calvanese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>De Giacomo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Deutsch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Montali</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          :
          <article-title>Verification of relational data-centric dynamic systems with external services</article-title>
          .
          <source>In: PODS</source>
          . (
          <year>2013</year>
          )
          <fpage>163</fpage>
          -
          <lpage>174</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Elkan</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Independence of logic database queries and updates</article-title>
          . In: PODS. (
          <year>1990</year>
          )
          <fpage>154</fpage>
          -
          <lpage>160</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Levy</surname>
            ,
            <given-names>A.Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sagiv</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Queries independent of updates</article-title>
          . In: VLDB. (
          <year>1993</year>
          )
          <fpage>171</fpage>
          -
          <lpage>181</lpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>