<!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>Process Monitoring Using Sensors in YAWL</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ra aele Conforti</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marcello La Rosa</string-name>
          <email>m.larosag@qut.edu.au</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giancarlo Fortino</string-name>
          <email>g.fortino@unical.it</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>NICTA Queensland Lab</institution>
          ,
          <country country="AU">Australia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Queensland University of Technology</institution>
          ,
          <country country="AU">Australia</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Universita della Calabria</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <fpage>49</fpage>
      <lpage>55</lpage>
      <abstract>
        <p>This article describes the architecture of a monitoring component for the YAWL system. The architecture proposed is based on sensors and it is realized as a YAWL service to have perfect integration with the YAWL systems. The architecture proposed is generic and applicable in di erent contextes of business process monitoring. Finally, it was tested and evaluated in the context of risk monitoring for business processes.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        The growing number of cases in which work ow management systems are utilized
to execute business processes, created the need for companies to monitor the
execution of their process instances [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Being able to monitor a process instance
is a basic requirements for companies that want to prevent the eventuation of
risks, be aware of the processing cost of process instances, or simply verify if a
process instance is being delayed.
      </p>
      <p>Several commercial work ow management systems already provide
monitoring functionality for their systems, e.g. WebSphere4, Oracle BAM5, Sybase6.
This type of functionality is not yet available in open-source work ow
management systems, such as the YAWL work ow management system.7</p>
      <p>In this article we will illustrate how to realize a multi-purpose monitoring
component for the YAWL system. The component will be realized as a service
for the YAWL system, to guarantee a perfect integration with the system.</p>
      <p>This article is structured as follows. Section 2 provides a brie y description of
the YAWL systems. Section 3 shows how to realize the monitoring component,
which is evaluated in Section 4. Section 5 discusses related work and nally
Section 6 concludes the article.</p>
    </sec>
    <sec id="sec-2">
      <title>Requirements and Preliminaries</title>
      <p>In order to monitor a business process, being able to have a complete overview
of process instances is a requirements. The status of a process instance is fully
provided by information about instances of tasks (work items) and subprocesses
(nets) belonging to such a process instance.</p>
      <p>When we consider a work item, to properly describe its status is essential to
know: i) if the work item was performed or not (status in the life-cycle of a work
item); ii) who (resource) performed the work item; iii) when the work item was
performed (time stamp); and iv) how it was performed (data). A similar set of
information is required for an instance of a net, except for the resource.</p>
      <p>YAWL Engine</p>
      <sec id="sec-2-1">
        <title>Interface A</title>
      </sec>
      <sec id="sec-2-2">
        <title>Interface B</title>
      </sec>
      <sec id="sec-2-3">
        <title>Interface E</title>
      </sec>
      <sec id="sec-2-4">
        <title>Interface X</title>
        <p>Resource Service</p>
        <p>Web Service</p>
        <p>Invoker</p>
        <p>Worklet Service</p>
        <p>Generic</p>
        <p>YAWL Service</p>
        <p>
          A clear understanding of the YAWL environment [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] is required if we want
to be able to access the status of work items and nets. The YAWL system is
a service-oriented architecture built using Java. Figure 1 provides a simpli ed
overview of the architecture of the YAWL system. The core element of this
architecture is the YAWL engine, it is in charge of managing the instantiation of
process instances and work items. The engine provides four interfaces to allow
services to interact with the engine, for example allowing the resource service,
which manages resources, to perform a work item instantiated.
        </p>
        <p>These four interfaces are: i) interface A, which provides connection
capabilities and allows process models to be uploaded and unloaded, and external
services to be registered and unregistered; ii) interface B, which allows process
instances to be lunched, work items to be checked-out for their execution, and
process information to be retrieved; iii) interface E, which allows process logs to
be retrieved; and iv) interface X, which provides a terminal for detecting and
handling exceptions.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Monitoring Component</title>
      <p>
        We can now describe how to create a monitoring component for the YAWL
system, as the one realized for [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The best way to realize a new component for
the YAWL system is to realize it as a YAWL service. Our service will use the
interfaces provided by the system, described in section 2, to receive noti cations
from the engine about the initialization of the system and the starting of new
instances.
      </p>
      <p>Two are the interfaces that will provide information that may be relevant for
us, they are interface B and interface X. The rst interface will notify us with
events related with the life-cycle of a process instance and the initialization of
the YAWL system. Interface X will notify us when a process instance is canceled,
and a case is enabled or completed.</p>
      <p>
        In order to receive the noti cations sent by these two interfaces, our
monitoring component must extend the java class InterfaceBWebsideController and
implements the java interface InterfaceX Service. We are only interested in a subset
of all noti cations that interface B and X will send, for this reason we only need
to implements these four methods: i) handleCancelledWorkItemEvent ; ii)
handleCaseCancellationEvent ; iii) handleEngineInitialisationCompletedEvent ; and
iv) handleCheckCaseConstraintEvent. Figure 2 shows the UML [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] class
diagram of how our monitoring component is built. In the diagram are only shown
the classes required for the realization of the monitoring component and the
methods that are relevant for us.
      </p>
      <p>Our monitoring component works through the use of sensors (YSensor ). Each
sensor monitors a speci c condition, composed of variables that are the result of
functions and actions, and is managed by the sensor manager
(YSensorManagerImplLayer ). The sensor manager manages the creation of sensors and noti es
them when changes occur in a process instance. The sensor manager creates new
sensors each time a new process instances is started. Information about the
initialization of the system and the starting, completion and cancellation of process
instances are retrieved by the sensor manager using the YAWL EngineInterface.</p>
      <p>Changes in the process instance are discovered using the classes provided by
the package databaseInterface (see Figure 3). This package provides an
abstraction layer on top of the database which allows queries to be executed through
the invocation of java methods. Executing queries gives to the system the
possibility of retrieving information from di erent cases, and then have monitoring
conditions de ned across cases. In order to know which changes are relevant for
a sensor, the sensors manager retrieves from it the list of LogVariables. Each
of this logVariable is associated with an action that using the ActionIdenti er
and the ActionExecutor is identi ed and executed, retrieving from the log the
information of interest. Each action captures a speci c aspect of a work item or
a net, the list of all possible actions is shown in gure 4.</p>
      <p>
        Changes in a process instance are then noti ed to a sensor using messages
(YSensorMessageUpdate). Every time a sensor receives a message, it checks its
monitoring condition using the updated information. The condition is checked
using a speci c interpreter (ForInterpreter ) which interprets the languages
dened in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and veri es if the condition is violated or not. In case the condition
is violated the sensor will notify the administrator by sending a noti cation
through the YAWL MonitorInterface. The condition that a sensor can monitor
is a boolean expression which may contain nested loops, if-then-else constructs,
and algebraic operators.
The architecture here proposed was evaluated in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In the experiment we
measured the time required to retrieve the result of the execution of an action. In
table 1 we show the result grouped for type of action, e.g. NetStartTime and
NetCompleteTime are grouped under the name NetXTime.
      </p>
      <p>The results show that in general a result is produced in few milliseconds
(ca. 20ms). Retrieving a net or an activity variable and retrieving information
about the distribution set and the initiator of an activity require more time, this
because they require the parsing of XML strings since the data are not directly
stored in the database.
Actions Description
NetIsX fhuanscbtieoenns rcehaecchkeidng if a net status
NNeettXXTTiimmeeInMillis faunnecttiostnasturesthuarnsibngeetnheretaicmheedwhen 18.8
NetVariable returns the value of a net variable 432.6
ActivityCount cnoummpbleerteodf times a task has been 19.8
XResource fausnsocctiioantesdthwaitthreatutranskthe resources 20.9
ActivityIsX fhuanscbtieoenns rcehaecchkeidng if a task status 30.5
AAccttiivviittyyXXTTiimmeeInMillis fautnacstkiosntsatruetsuhrnasinbgetehnerteiamcheewdhen 22.3
ActivityVariable returns the value of a task variable 96.7
XDistribution fausnsocctiioantesdrewtiutrhniangtatshkebryesdoeufracuelst 243
XInitiator fsutrnactteigoynsforretaurrneisnogurtcheeaaslsloocciaattiioonn 249.6</p>
      <p>Risk monitoring is not the only context in which our component can be
used. It is a multi-purpose monitoring component that provides the possibility
of adding new actions in order to make it usable in other context such as for
example cost monitoring, resource monitoring, or time monitoring.
5</p>
    </sec>
    <sec id="sec-4">
      <title>Related Work</title>
      <p>
        The idea of monitoring business processes is not new in the area of business
process management. Academics explored the possibility of monitoring business
processes using Complex Event Processing (CEP) systems [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ]. Commercial
workow management systems in general provide integrated monitoring features, e.g.
Oracle Business Activity Monitoring (BAM) [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], webMethods Business Events8,
and SAP Sybase [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        The monitoring component here discussed was used in the approach proposed
in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] for risk monitoring. In this approach business processes are integrated with
aspects of risk management, speci cally risk monitoring. Risk conditions are
composed of two elements, a risk likelihood which monitors the likelihood of a
risk to occur and a risk threshold which de ned level of risk which the company
is willing to accept before detecting the eventuation of a risk.
      </p>
      <p>
        Gay et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] propose the use of complex event processing for work ow
monitoring on Petri nets. They identify six events that can represent the basic
activities that a work ow can perform (i.e. Transition activation, Resource allocation,
Resource liberation, Advance token, Start work ow, and End work ow). Using
these simple events they have created six complex events that represent
unwanted situations: i) Lack of resource; ii) Activity delay; iii) Lack of resource
delay; iv) Transition delay; v) Work ow delay; vi) Interruption warning. This
8 http://www.softwareag.com/au/products/wm/events/overview
approach, compare to our approach, does not take in consideration the data
prospective. This limitation produces as consequence the possibility of de ning
conditions that are mainly related to the performance of a process instance.
      </p>
      <p>
        Finally, Hermosillo et al. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] propose a framework for dynamic business
process adaptation in the context of BPEL processes. In this approach they use the
monitoring functionality obtained using a CEP engine to detect conditions that
will then trigger an adaptation, i.e. the add or change of a service.
6
      </p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>In this article we showed how to realize a monitoring component for the YAWL
system using the interfaces provided by the system itself. The monitoring is done
using sensors, which monitor conditions that can be de ned using information
across cases.</p>
      <p>The main contribution of this work is the identi cation and documentation
of a minimal set of classes required for the realization of a monitoring component
for the YAWL system.</p>
      <p>The component is realized as a custom YAWL service, in order to guarantee
a perfect integration with the YAWL system. The structure of the component
also results to be independent from a speci c monitoring purpose, consenting its
application in di erent contexts could they be risk monitoring, or cost
monitoring.</p>
      <p>Finally, the architecture was implemented and tested. The results of the test
show that the retrieving of information can be computed e ciently and without
requiring additional work engine side.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>R.</given-names>
            <surname>Conforti</surname>
          </string-name>
          , G. Fortino,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>La Rosa, and</article-title>
          <string-name>
            <surname>A. H. M.</surname>
          </string-name>
          ter Hofstede.
          <article-title>History-aware, real-time risk detection in business processes</article-title>
          .
          <source>In Proc. of CoopIS</source>
          , volume
          <volume>7044</volume>
          <source>of LNCS</source>
          . Springer,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>P.</given-names>
            <surname>Gay</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Pla</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Lopez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Melendez</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Meunier</surname>
          </string-name>
          .
          <article-title>Service work ow monitoring through complex event processing</article-title>
          .
          <source>In Proc. of ETFA</source>
          , pages
          <article-title>1{4</article-title>
          . IEEE,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>G.</given-names>
            <surname>Hermosillo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Seinturier</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L.</given-names>
            <surname>Duchien</surname>
          </string-name>
          .
          <article-title>Using complex event processing for dynamic business process adaptation</article-title>
          .
          <source>In Proc. of IEEE SCC</source>
          , pages
          <volume>466</volume>
          {
          <fpage>473</fpage>
          . IEEE Computer Society,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>A.</given-names>
            <surname>Kronz</surname>
          </string-name>
          .
          <article-title>Managing of process key performance indicators as part of the aris methodology</article-title>
          .
          <source>In Corporate Performance Management</source>
          , pages
          <volume>31</volume>
          {
          <fpage>44</fpage>
          . Springer,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Object</given-names>
            <surname>Management</surname>
          </string-name>
          <article-title>Group (OMG)</article-title>
          .
          <source>OMG Uni ed Modeling LanguageTM (OMG UML)</source>
          ,
          <source>Superstructure version 2</source>
          .4. Object Management Group (OMG),
          <year>Jan</year>
          .
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Oracle. BPEL Process Manager Developer's Guide</surname>
          </string-name>
          , http://download.oracle.com/ docs/cd/E15523 01/integration.1111/e10224/bp sensors.
          <source>htm. Accessed: Jun</source>
          .
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Sybase</surname>
          </string-name>
          .
          <article-title>Sybase CEP Implementation Methodology for Continuous Intelligence</article-title>
          , http://www.sybase.com.au/ les/White Papers/
          <article-title>Sybase CEP Implementation Methodology wp</article-title>
          .
          <source>pdf. Accessed: Jun</source>
          .
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>A. H. M. ter Hofstede</surname>
          </string-name>
          ,
          <string-name>
            <surname>W. M. P. van der Aalst</surname>
            , M. Adams, and
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Russell</surname>
          </string-name>
          .
          <source>Modern Business Process Automation: YAWL and its Support Environment</source>
          . Springer,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>