<!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>Supporting Blended Work ows</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Davide Passinhas</string-name>
          <email>davide.passinhas@ist.</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Michael Adams</string-name>
          <email>mj.adams@qut.edu.au</email>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Bernardo Oliveira Pinto</string-name>
          <email>bernardo.pinto@ist.</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ricardo Costa</string-name>
          <email>ricardo.antunes.costa@ist.</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Antonio Rito Silva</string-name>
          <email>rito.silva@ist.</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Arthur H.M. ter Hofstede</string-name>
          <email>a.terhofstede@qut.edu.au</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Eindhoven University of Technology</institution>
          ,
          <addr-line>Eindhoven</addr-line>
          ,
          <country country="NL">The Netherlands</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>INESC-ID/IST/Technical University of Lisbon</institution>
          ,
          <addr-line>Av. Prof. Dr. Cavaco Silva, 2744-016 Porto Salvo</addr-line>
          ,
          <country>Portugal utl.pt</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Queensland University of Technology</institution>
          ,
          <addr-line>Brisbane</addr-line>
          ,
          <country country="AU">Australia</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>The Blended Work ow Approach</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Despite advances in the eld of work ow exibility, there is still insu cient support for dealing with unforeseen exceptions. In particular, it is challenging to nd a solution which preserves the intent of the process as much as possible when such exceptions are encountered. This challenge can be alleviated by making the connection between a process and its objectives more explicit. This paper presents a demo illustrating the blended work ow approach where two speci cations are fused together, a \classic" process model and a goal model. End users are guided by the process model but may deviate from this model whenever unexpected situations are encountered. The two models involved provide views on the process and the demo shows how one can switch between these views and how they are kept consistent by the blended work ow engine. A simple example involving the making of a doctor's appointment illustrates the potential advantages of the proposed approach to both researchers and developers.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>The two speci cations are consistent from a semantic point of view: any
work ow instance that is executing according to one of the speci cations can
continue executing according to the other. Therefore each view can present the
current state of the work ow instance to end users, who can switch between the
two views without having to redo any of the work they have done while using
the other view. However, it is possible to produce more information using the
goal-based speci cation, so that additional knowledge that may be useful when
dealing with unexpected situations can be acquired. Additionally, it is possible
to relax some restrictions when executing according to the goal view or to skip
the execution of activities in the activity view.</p>
      <p>episodes
String nPaamtieen(tkey) p1atient * Int nuEmpbiesro(dkeey)
Int age (key) Date reserveDate
Bool heartProblems Bool checkin
episode Bool checkout
(key) 1 1 episode (key)
IInntt hweeiPiggahhtttient Data1 patientData StriMngeddiecsacl1rRipetmipoonerdticalReport
int bloodPressure
String physicalCondition
medicalPrescription
1 0..1
episode
(key)</p>
      <p>Medical</p>
      <p>Prescription
String description
1medicalPrescription</p>
      <p>(key)
* prescriptionMedication
Prescription</p>
      <p>Medication
Int number (key)
String name
Int quantity
bool heartImpact</p>
      <p>Figure 1 presents the data model for a Doctor Appointment work ow
speci cation. The creation of a work ow instance corresponds to the creation of an
Episode instance and its association to an existing Patient instance. The
workow instance progresses by creating instances of the other entities. Eventually a
Medical Report will be written and the patient checks out.</p>
      <p>Figure 2 presents the activity-based speci cation of the Doctor Appointment
example. The speci cation follows a typical BPMN4-like activity-based
specication enriched with pre- and post-conditions, denoted respectively by PRE
and POS. For each activity, its pre- and post-conditions describe what should
be the data model state immediately before and after the execution of the
activity, respectively. An activity-based speci cation can execute in an activity
engine in isolation, ignoring its set of pre- and post-conditions, but pre- and
post-conditions are necessary for the blended work ow to keep both views
synchronized, as we shall show in the demo.</p>
      <p>The speci cation shows that the Booking activity creates an instance of
Episode and sets its reserveDate attribute. Note that the creation of an Episode
instance requires a Patient instance and a value for the number attribute, which
4 http://www.bpmn.org/</p>
      <p>PRE: episode is DEF
POS: (patientData.height is DEF) AND
(patientData.weight is DEF))</p>
      <p>Col ect Physical</p>
      <p>Data
Col ect Medical</p>
      <p>Data</p>
      <p>PRE: episode is DEF
POS: (patientData.bloddPressure is DEF) ANF
(patientData.physicalCondition is DEF))</p>
    </sec>
    <sec id="sec-2">
      <title>Supporting Blended</title>
    </sec>
    <sec id="sec-3">
      <title>Work ows 3</title>
      <p>patient data
medical report</p>
      <p>episode
Doctor
Appointment</p>
      <p>Checkout</p>
      <p>PRE: (episode is DEF) AND
(patientData.bloodPressure is DEF)
POS: (medicalReport.description is DEF)</p>
      <p>PRE: (episode is DEF) AND
(medicalReport.description is DEF)
POS: (episode.checkout is DEF)
patient list
episode</p>
      <p>episode
Booking</p>
      <p>CheckIn
POS: (episode is DEF) AND
(episode.reserveDate is DEF)</p>
      <p>PRE: episode.reserveDate == TODAY</p>
      <p>POS: (episode.checkin is DEF)
constitute the key attributes of Episode. As another example, note that the
execution of Collect Medical Data only requires an instance of Episode. This
relaxed restriction occurs because the blended work ow allows activities to be
skipped. In this case it would be possible to skip the Booking and Checkin
activities, but to execute Collect Medical Data if an Episode instance is created.</p>
      <sec id="sec-3-1">
        <title>CT: Episode SC: reserved = today Book Patient</title>
      </sec>
      <sec id="sec-3-2">
        <title>CT: Episode</title>
        <p>AC: today == reserved
SC: checkin = TRUE
CT: Patient Data
AC: episode.checkin
Obtain
Patient
Data
Checkin
Patient</p>
      </sec>
      <sec id="sec-3-3">
        <title>Obtain</title>
        <p>Physical</p>
        <p>Data</p>
        <p>CT: Patient Data
SC: (height is DEF) AND (weight is DEF)
CT: Episode
Process</p>
        <p>Medical
Appointment</p>
      </sec>
      <sec id="sec-3-4">
        <title>Obtain Medical Data</title>
      </sec>
      <sec id="sec-3-5">
        <title>Measure Blood Pressure</title>
      </sec>
      <sec id="sec-3-6">
        <title>CT: Prescription Medication MC: (heartImpact == FALSE) OR (medicalPrescription.episode.patient.heartProblems == FALSE)</title>
      </sec>
      <sec id="sec-3-7">
        <title>Heart</title>
        <p>Medication
Restriction</p>
      </sec>
      <sec id="sec-3-8">
        <title>Checkout</title>
        <p>Patient</p>
      </sec>
      <sec id="sec-3-9">
        <title>CT: Episode AC: checkin SC: checkout is DEF</title>
        <p>and have activation conditions (AC), which should hold true to allow the goal to</p>
      </sec>
      <sec id="sec-3-10">
        <title>CT: Medical Report AC: (episode is DEF) AND (episode.patientData.bloodPressure is DEF) SC: description is DEF</title>
      </sec>
      <sec id="sec-3-11">
        <title>CT: Medical Prescription AC: episode.checkin SC: description is DEF</title>
      </sec>
      <sec id="sec-3-12">
        <title>Write Medical Report</title>
      </sec>
      <sec id="sec-3-13">
        <title>CT: Patient Data</title>
      </sec>
      <sec id="sec-3-14">
        <title>SC:physicalCondition is DEF</title>
      </sec>
      <sec id="sec-3-15">
        <title>CT: Patient Data SC: bloodPressure is DEF</title>
      </sec>
      <sec id="sec-3-16">
        <title>Write</title>
        <p>Medical
Prescription</p>
        <p>Add
Prescription
Medication</p>
      </sec>
      <sec id="sec-3-17">
        <title>CT: Prescription Medication AC: medicalPrescription is DEF SC: (prescriptionMedication is COMPLETELY DEF)</title>
        <p>become active, and success conditions (SC), which de ne when a goal is achieved.
To achieve a goal it is also necessary that all its sub-goals have succeeded.
Additionally, a goal has a context (CT) that represents the data model entity which
is the root of its condition's evaluation. A maintain goal describes a data model
invariant.</p>
        <p>The achievement goal Write Medical Report has the Medical Report
entity as context, and requires both an Episode instance and a value for the
patient's blood pressure to become active. Upon the goal achievement, the
description attribute is de ned. The maintain goal Heart Medication
Restriction states that it is not possible to prescribe drugs that may adversely
impact the hearts of patients with heart problems.</p>
        <p>
          When executing a work ow instance in the activity view end users can: (
          <xref ref-type="bibr" rid="ref1">1</xref>
          )
execute an activity; or (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) skip the execution of an activity. In both situations
the process instance progresses according to the control- ow de nition. If an
activity's pre-condition does not hold when it is enabled according to the
controlow speci cation, the end user can execute a pre-activity to satisfy the
precondition.
        </p>
        <p>
          When executing a work ow instance in the goal view end users can: (
          <xref ref-type="bibr" rid="ref1">1</xref>
          )
activate a goal; (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) achieve a goal; (
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) skip a goal; (4) redo a goal; (5) disable a
goal's activation condition; (6) disable a maintain goal; or (7) create a new goal.
When a goal becomes active, its sub-goals also become active. If a goal's success
condition holds when it is activated, then it is immediately achieved. When a
goal is achieved, the activity view evaluates whether any of the enabled activities
can complete. The redo of a goal preserves the state: the same set of conditions
continue to hold.
2
        </p>
        <sec id="sec-3-17-1">
          <title>Demo Script</title>
          <p>In this section we describe the demo script and its objectives. For a screen-cast
please visit URL: http://www.youtube.com/watch?v=Anb4kuXtBgc. The tool
does not include a worklist manager that assigns workitems to users based on
their roles because it is not relevant for the blended work ow proof of concept.
Therefore in the demo the doctor is able to execute any workitem, either goal
or activity.</p>
          <p>
            Second Opinion case
1. Start a Doctor Appointment process for Patient Davide Passinhas;
2. In the activity view, execute all activities until Doctor Appointment activity
is enabled;
3. An unexpected situation occurs: during the Doctor Appointment activity
the patient's condition deteriorates, and the doctor decides to measure his
blood pressure again: (
            <xref ref-type="bibr" rid="ref1">1</xref>
            ) the doctor switches to the goal view, activates goal
Measure Blood Pressure and redoes it;
4. Due to this situation the doctor decides to seek a second opinion from a
colleague, so in the goal view she: (
            <xref ref-type="bibr" rid="ref1">1</xref>
            ) creates a new entity, Second Opinion,
de nes a relationship with entity Medical Report, and then creates a new
goal, Second Opinion, which has a success condition requiring a Second
Opinion's description attribute to be de ned; (
            <xref ref-type="bibr" rid="ref2">2</xref>
            ) activates goal Write
Medical Report, which also activates goal Second Opinion; (
            <xref ref-type="bibr" rid="ref3">3</xref>
            ) goal Second
Opinion is enabled by the blended work ow engine; (4) goal Second Opinion
is achieved by the user; (5) goal Write Medical Report is enabled by the
blended work ow engine; and (6) goal Write Medical Report is achieved
by the user;
5. The doctor switches to the activity view and veri es that the Doctor
Appointment activity is completed, and the Checkout activity is enabled for
execution;
6. The doctor decides to prescribe a medication. She switches again to the goal
view: (
            <xref ref-type="bibr" rid="ref1">1</xref>
            ) activates goals Write Medical Prescription and Add
Prescription Medication, with the latter being enabled by the blended work ow
engine; (
            <xref ref-type="bibr" rid="ref2">2</xref>
            ) achieves goal Add Prescription Medication; (
            <xref ref-type="bibr" rid="ref3">3</xref>
            ) activates new
goal Add Prescription Medication, and prescribes a medication that may
adversely impact on the heart; (4) tries to achieve goal Add Prescription
Medication with the prescribed medication, but receives an error message
because the maintain goal Heart Medication Restriction is violated; (5)
the doctor decides to take the responsibility to prescribe the drug anyway,
and so disables the maintain goal Heart Medication Restriction; and (6)
executes goal Add Prescription Medication;
7. The doctor switches to the activity view and executes the Checkout activity,
nishing the process.
          </p>
          <p>Urgency case
1. Start a Doctor Appointment process for Patient David Martinho;
2. The Booking activity is executed and the reservedDate is set for 10 days
later;
3. Due to urgency of the patient's condition, the patient requires an
examination by the doctor before the reserveDate but the Checkin activity is not
enabled for execution;
4. The doctor switches to the goal view, activates the Checkin Patient goal
and overrides the goal's activate condition, 'today == reserveDate', so that
the goal can become enabled;
5. The doctor executes the Checkin Patient goal. The blended work ow
engine automatically completes the Checkin activity and enables activities
Collect Physical Data and Collect Medical Data;
6. In the activity view Collect Physical Data and Collect Medical Data
activities are skipped by the doctor, due to the urgency;
7. The doctor executes the pre-activity in the Doctor Appointment activity to
ll in the missing data, the blood pressure data, and continues execution.</p>
          <p>Passinhas et al.</p>
          <p>The current version of the tool is a second prototype that extends a rst
prototype [3] implemented one year ago. It was implemented in JAVA using the
FenixFramework5 for the domain speci cation and persistency, Vaadin6 for the
user interfaces, and the YAWL [4] engine to execute the activity speci cation.
The code is publicly available in a GitHub repository7.
3</p>
        </sec>
        <sec id="sec-3-17-2">
          <title>Acknowledgement</title>
          <p>The research was partially supported by the Portuguese Foundation for Science
and Technology, FCT-MCTES (INESC-ID multiannual funding) through the
PIDDAC Program funds.
5 https://fenix-ashes.ist.utl.pt/trac/fenix-framework
6 https://vaadin.com/home
7 https://github.com/socialsoftware/blended-work ow</p>
        </sec>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Silva</surname>
            ,
            <given-names>A.R.:</given-names>
          </string-name>
          <article-title>A blended work ow approach</article-title>
          . In Daniel, F.,
          <string-name>
            <surname>Barkaoui</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dustdar</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aalst</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mylopoulos</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosemann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shaw</surname>
            ,
            <given-names>M.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Szyperski</surname>
          </string-name>
          , C., eds.:
          <source>Business Process Management Workshops. Volume 99 of Lecture Notes in Business Information Processing.</source>
          , Springer (
          <year>2012</year>
          )
          <volume>25</volume>
          {
          <fpage>36</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Van</given-names>
            <surname>Lamsweerde</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>Goal-oriented requirements engineering: A guided tour</article-title>
          .
          <source>In: Proceedings of the Fifth IEEE International Symposium on Requirements Engineering</source>
          . RE '01, Washington, DC, USA, IEEE Computer Society (
          <year>2001</year>
          )
          <volume>249</volume>
          {
          <fpage>262</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Pinto</surname>
            ,
            <given-names>B.O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Silva</surname>
            ,
            <given-names>A.R.:</given-names>
          </string-name>
          <article-title>An architecture for a blended work ow engine</article-title>
          . In Daniel, F.,
          <string-name>
            <surname>Barkaoui</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dustdar</surname>
          </string-name>
          , S., van der Aalst, W.,
          <string-name>
            <surname>Mylopoulos</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosemann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shaw</surname>
            ,
            <given-names>M.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Szyperski</surname>
          </string-name>
          , C., eds.:
          <source>Business Process Management Workshops. Volume 100 of Lecture Notes in Business Information Processing.</source>
          , Springer (
          <year>2012</year>
          )
          <volume>382</volume>
          {
          <fpage>393</fpage>
          4. ter Hofstede,
          <string-name>
            <given-names>A.H.M.</given-names>
            ,
            <surname>van der Aalst</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.M.P.</given-names>
            ,
            <surname>Adams</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Russell</surname>
          </string-name>
          , N., eds.:
          <source>Modern Business Process Automation: YAWL and its Support Environment</source>
          . Springer (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>