the  IoT  workflow  management  system.  Finally,  it 
presents performance results. 
The  rest  of  the  paper  is  organized  as  follows: 
Section  2  covers  related  work,  Section  3  mentions 
some  necessary  definitions,  Section  4  presents  a 
motivating  use  case  and  lays  down  the  design 
challenges,  Section  5  describes  the  design, 
Experiments and Results are discussed in Section 6, 
and Section 7 presents conclusions and future work.  
2  RELATED WORK 
In  this  section,  we  discuss  related  work  on  SLA 
violations  in  workflows.  Unfortunately,  not  much 
scholarly work  exists on IoT  workflows at  the time 
of this writing. 
(Emeakaroha,  2012)  discusses  the  issue  of 
maintaining  customer  specified  SLAs  in  Cloud 
infrastructures. Cloud infrastructures need to be self-
managed  to  minimize  user  intervention.  This  is 
achieved  through  timely  detection  of  possible  SLA 
violations.  The  paper  describes  an  architecture 
(Detecting SLA Violation infrastructure (DeSVi)). It 
uses  a  framework  which  maps  low  level  metrics 
(such as  device  uptime/downtime)  to  user  specified 
SLAs.  This  helps  to  manage  and  prevent  SLA 
violations. The DeSVi framework is validated in two 
applications:  an  image  rendering  application,  and  a 
web  application  running  the  TPC-W  benchmark. 
SLA  violation  prediction  is  achieved  through 
defining  “threat  thresholds”  which  are  more 
restrictive SLAs than the SLAs themselves. 
(Leitner,  2010)  discusses  the  PREvent 
framework which  monitors  SLAs,  predicts possible 
SLA  violations  using  machine  learning  techniques, 
and  takes  necessary  action  to  avoid  the  SLA 
violation.  Prediction  of  SLA  values  is  done  at 
specific  “checkpoints”  using  regression  techniques 
(mostly using  multilayer perceptrons). To  avoid the 
predicted  SLA  violation,  the  framework  uses  an 
adaptation  actions  database.  This  database  contains 
few  actions  that  when  applied  singly  or  in 
combination  can  avoid  the  violation.  For  this,  the 
framework knows in advance what is the impact of a 
specific  action;  this  is  done  by  estimating  the 
improvement caused by a specific action – these are 
termed improvement estimates. 
(Wetzstein,  2012)  discusses  a  strategy  for 
preventing KPI violations. Unlike (Leitner, 2010) it 
uses decision trees to model the relationship between 
low  level  metrics  and  higher  level  KPIs.  The  KPIs 
are  predicted  at  specific  points  called  checkpoints, 
similar  to  (Leitner,  2010).  During  the  prediction, 
“instance  trees”  are  derived  which  show  which 
metrics  need  to  be  improved  to  reach  specific  KPI 
goals.  Then  adaptation  requirements  are  identified 
based  on  the  instance  trees.  Alternative  adaptation 
strategies  are  ranked  based  on  “preferences  and 
constraints  model”  (Constraints  must  be  met  while 
preferences  should  be  optimized).  Finally,  the 
adaptation  strategy with the  highest  score is  chosen 
for  execution.  In  our  work,  the  workflow  is 
instrumented with domain specific code. 
(Ivanovic,  2011)  describes  a  scheme  for  SLA 
Violation  prediction.  It  constructs  a  model  of 
constraints  that  model  both  the  states  of  SLA 
conformance  and  SLA  violation.  Based  on  this 
model  it  is  able  to  predict  when  SLA  may  be 
violated. 
Our work discusses the concept of workflows in 
IoT. Regarding SLA violation prediction, work such 
as  (Leitner,  2010)  differs  from  ours  in  that  we 
instrument the workflow actions with prediction and 
alerting  code. Actions  taken upon alerting  are work 
in progress, but the general direction (as explained in 
this  paper)  is  towards  a  rule  based  diagnosis 
followed by a selection of best action. 
3  DEFINITIONS 
Most  structured  organizations  have  business 
processes  modelled  as  workflows  hosted  in  a 
workflow  management  system  (WMS).  Workflows 
are formally modelled as a WFNet (Workflow Net). 
In  this  section,  we  give  some  definitions  regarding 
workflows. The definitions 1 through 3 are based on 
(Vander Aalst,  1998)  while  definitions 4  through 7 
are added by this work. 
Definition  1  (Petri  Net)  A  Petri  net  is  a  triple 
(P,T,F) where: 
- P is a finite set of places, 
-T is a finite set of transition, 
-F ⊆ (P×T) ∪ (T×P) is a set of arcs 
     Places  are conditions  while  transitions  are tasks. 
Arcs connect a place to a transition or a transition to 
a place. 
•t denotes the set of input places for a transition t. 
Similarly p•  is a  set of  all transitions from an input 
place p. 
Definition 2 (Strongly Connected) A Petri Net is 
said  to  be  strongly  connected  if  for  every  pair  of 
nodes s and e there exists a path from s to e.(Nodes 
are either places or transitions). 
Definition  3  (WFNet) A Petri Net WF is a 
WFNet iff: 
  There are two special places i and o such that •i