Temporal Constraint in Web Service Composition
Bey Fella, Samia Bouyakoub and Abdelkader Belkhir
Institute of Electronics & Computer Sciences, USTHB University, Algiers, Algeria
Keywords: Web Services Composition, Petri Network, Temporal Constraints.
Abstract: Web service composition is studied by many works, and constitutes the heart of a great research activity.
However, the majority of this work does not take into account all temporal constraints imposed by the
service provider and the users in the composition process. Incorporating temporal constraints in Web service
composition result in more complex model and make crucial the verification of temporal consistence during
the modeling (at design time) and then during the execution (at run time). In this paper, we presented H-
Service-Net model for Web service composition with time constraints, and propose a modular approach for
modeling composition with time constraint using Extend time unit system (XTUS), Allen’s interval algebra
and comparison operators in a time Petri net model.
1 INTRODUCTION
The compositions of Web services allow to
determine a combination of services that meets the
customer's request, this composition is provided as a
single service. Moreover, the composition of Web
services should consider the time constraints
associated with this composition.
It is possible to identify at least two types of
services available on the Web. The former include
services that require an immediate response, such as
dictionaries or weather services online. This type of
service allows the user to get immediate answers.
The second type of service refers to Web services
that require estimates or more generally a
negotiation such as travel agency, building a house
or production and delivery of products.
The terms orchestration and choreography
describe two aspects of creating business processes
from composite Web services. Orchestration refers
to an executable business process that can interact
with both internal and external Web services, the
interactions occur at the message level. They include
business logic and task execution order, and they can
span application and organizations to define a long-
lived, transactional, multi-step process model.
Orchestration always represents control from one
part’s perspective. This differs from choreography,
(Peltz, 2003).
This article presents the definition of a formal
model that supports the necessary abstractions such
as time constraint, time consistency and proposing a
framework that meets the needs of the user with the
temporal properties. The content of this article is
organized as follows:
Section 2 presents some related work, Section 3
presents our major objectives, Section 4 presents our
model named ‘H-Service-Net’, and it is illustrated
with an example. Finally, Section 5 concludes the
paper.
2 RELATED WORK
Incorporating the time factor in the process of
composing Web services has become essential for
the implementation of time-based Web services.
Several works have been proposed in the context of
modeling time constraints in Web services (Dai,
2007) (CHEN, 2011), (Hamadi, 2003), (Hamadi,
2008). In the next section, we describe the
approaches presented in the literature for the
development of service composition based on time
constraints.
There are several formalisms of modeling Web
service composition using Petri nets (Dai, 2007),
(CHEN, 2011), (Hamadi, 2003) which is one of the
most known formalisms and the most adapted to
express the concurrent systems. Hamadi et al.
(Hamadi, 2003), (Hamadi, 2008) propose a model
based on Petri nets for Web service composition and
model the control flow of Web services. Diaz et al.
577
Fella B., Bouyakoub S. and Belkhir A..
Temporal Constraint in Web Service Composition.
DOI: 10.5220/0005345405770584
In Proceedings of the 17th International Conference on Enterprise Information Systems (ICEIS-2015), pages 577-584
ISBN: 978-989-758-097-0
Copyright
c
2015 SCITEPRESS (Science and Technology Publications, Lda.)
(Diaz, 2006) use formal methods for describing and
analyzing the behavior of Web Services, including
time restrictions. Dai et al. (Dai, 2007) present a
time constraint modeling and analyzing method
for Web processes based on OWL-S annotations,.
Lallali et al. (Lallali, 2007), (Lallali, 2008) proposed
a new formalism called Web service time extended
nite state machine (WS-TEFSM) and an
intermediate format (IF) which enables modeling of
timing constraints in BPEL. Rouached et al.
(Rouached, 2006) propose an event driven approach
for checking, functional and non-functional
consistency of Web service composition expressed
in BPEL by using the Event Calculus framework.
The paper of Kazhamiakin et al. (Kazhamiakin,
2004) introduced a new formalism called WSTTS
(Web service time transition system) which enables
verication of time constraints in Web service
compositions using model checking for WS-BPEL
processes to capture the time behavior. Lastly, Ting-
Wei et al. (CHEN, 2011) present a verification
approach of time constraint consistency of Web
service composition, which transform OWL-S to
ETPN (extended time Petri net), an algorithm of
time consistency verification in Web service
composition is proposed but this paper did not
support time constraints for the execution of the
service.
The composition of Web services is an issue that
has been studied by many researches and is the core
to a wide research activity. However, most studies
(Diaz, 2006), (Lallali, 2007), (Kazhamiakin, 2004),
(Hamadi, 2003), (CHEN, 2011), (Rouached, 2006),
(Dai, 2007), (Hamadi, 2008) did not consider all
types of temporal constraints "local, global, relative,
absolute..." imposed by the composition, the client
and the service provider. Therefore, the results did
not satisfy the needs and time preferences.
Moreover, works like (Hamadi, 2003),
(Kazhamiakin, 2004) can only answer whether there
is temporal inconsistency, but they did not provide a
concrete solution.
3 MAJOR OBJECTIVES
To guaranty vulnerabilities of web service
composition and control system behavior is an
important criterion and can be done by defining a
temporal consistency at design and run time of the
composition
Recently, Web service composition model and
languages do not allow defining all types of
temporal constraint imposed by the client, the
provider and the composition in a declarative and
formal way and verify temporal consistency at
design and run time, defining if there is a temporal
contradiction at design time is important because
modification of temporal constraint cannot be done
at run time.
4 COMPOSED WEB SERVICES
AS TIME PETRI NETS
4.1 H-Service-Net: A Temporal Model
for Web Service Composition
Although the temporal RDP allows to define
temporal performance information, there are not
enough for modeling any complex system such as
temporal constraints in web service composition, For
this, we have extended the timed RDP in order to
define a well-suited timed model for the
formalization of a web service orchestration. Thus,
we have defined an extended time Petri net called H-
Service-Net.
The H-Service-Net model (an acronym for
Hierarchical Service Net) is a time Petri net-based
model It allows the modeling of time-critical
aspect in the field of Web Services. It allows
incremental composition of services, as well as
consistency checking after each modification. It
introduces a new type of places named composite
places. A composite place is an abstract place
represented by a sub-network, allowing a degree of
independence between the parts of the H-Service-
Net. Indeed, a composite or single place in H-
Service -Net depends only on the subnet to which it
belongs. In other words, the modification of a
component can affect its subnet or the subnets of the
same hierarchy. This representation allows for
incremental modeling of the H-Service-Net. This
will allow for easy correction of errors, an exact
location of conflicts between the subnet elements
and support rapid changes. Thus, the H-Service-Net
model is well suited for modeling the
synchronization constraints in a temporal scenario.
As a result, it was chosen to model the composition
of web services. We present in what follows the
different elements of the H-Service-Net model:
ICEIS2015-17thInternationalConferenceonEnterpriseInformationSystems
578
4.1.1 Places in H-Service-Net
Table 1: Places in H-Service-Net.
Place
Modelin
g
Description
Ordinary
Place
It models a basic element (Web
service) and its execution time.
Virtual
Place
It models a temporal constraint.
Silent
Place
It models a place without any
specific task, which is used to
handle exceptions.
Parallel
Place
It models a set of elements of
the same group that operate
simultaneously, which is used
to model concurrent Web
service.
Sequenti
al
Place
It models a sequence of
elements of the same group that
run in sequence. It is used to
model sequential Web services.
Root
Place
It represents the root of the
global Petri net and behaves
like a sequential composite
place.
Loop
Place
It is an element that runs in a
loop and is used to model a
recursive Web service.
4.1.2 Transitions in H-Service-Net
Table 2: Transitions in H-Service-Net.
Transition Modeling Description
Simple
transition
It is fired when all its
input places are active
and have available
tokens.
Master
transition
It is fired as soon as the
place associated with
the Master arc is active
and has an available
token.
First
transition
It is fired when one of
its input places is active
and has a free token.
4.1.3 Tokens and Arcs in H-Service-Net
Table 3: Tokens and arcs in H-Service-Net.
Arc \ token
Modeling Description
State
Token
It defines the state of the
Web service associated
with the place
Exception
Token
It is used to handle
exceptions
Simple arc
Control the firing of a
simple transition
Master arc
Control the firing of a
Master transition.
4.2 Case Study
In this section, we illustrate an application of our
system with a real example.
Real Scenario: An orchestration Service of
building a house
The time constraints imposed by house building
services are very important because in the case of
exceeding the expiration time can cause large
financial loss. Therefore, verification of temporal
consistency is important to overcome this loss.
A composition of service must be provided to
satisfy the customer and links must be established
with other entities such as: real estate agency, a
notary, the mayor, the contractor, a company of
selling building materials and finally a bank to
perform all financial transactions, for that seven
Web service should be invoked:
• Ws1: Estate agency: is an intermediary in
transactions concerning real estate.
• Ws2: Ws8: The bank allows performing financial
transactions and online payment.
• Ws3: human resource: the notary establishes the
act of buying the plot of land between the client and
the seller of the plot through the real estate agency.
• WS4: human resource the architect establishes the
house plans, according to the customer's
requirements.
• WS5: The City Hall: Establishes the permit to
build the house.
• WS6: human resource: The contractor: who
manages the construction of the house.
• WS7: The sales service of building materials.
For the modeling of these Web Services in a
single H-Service-Net, we add the following
composite places:
• The online payment service Ws2 and the notary
service Ws3 can run in parallel, we model them in
H-Service-Net by a parallel composite place P1.
• The architect service Ws4 and the City Hall service
P
S
R
L
M
F
TemporalConstraintinWebServiceComposition
579
can run in sequence, we model them with a
sequential composite place S1.
• The contractor service Ws6 and The building
materials sales service ws7 can run in the loop, we
model them with a loop composite place L1.
• The estate agency service Ws1 and the Composite
services P1, S1, L1 and the online payment service
Ws8 run in sequence, we have modeled this set by
the root place R. Remember that by definition the
elements of the root run in sequence.
Figure 1: H-Service-Net for the example.
4.3 Temporal Constraint in H-Service-
Net Model
In order to complement our system we propose a
modular approach to model composition and
consider all types of temporal constraints using
Extend time unit system (XTUS) (Bouzid, 2005) to
represent temporal interval and the algebra of
Allen’s intervals (Allen, 1983) in order to define
temporal relations between Web services and
comparison operators (<, , >, , =, ) for
comparing temporal interval to a specific time unit
in a time Petri net [(BERTHOMIEU, 1991)] model.
4.3.1 Allen’s Interval Algebra
James F. Allen (Allen, 1983) has defined a set of
13 basic temporal relations between two intervals
{b, m, o, s, d, f, eq, a, mi, oi, si, di, fi} which
describe the relative positions between two times
intervals, These relations cover all possible cases of
temporal relations.
4.3.2 XTUS (Extend Time Unit System)
XTUS (Bouzid, 2005) is an algebraic tool for
constructing temporal specifications in a simple and
powerful way, as XTUS refers to absolute time,
basic time units are defined by providing a full date
specification including the following temporal
attributes: year, month, day, hour, minute and
second.
Although the system is extensible and other BTU
(Basic time Unit) can be added, each absolute time
can be specified in a unique way as a sequence of
integers i with the following form: i = [year, month,
day, hour, minute, second]. (Bouzid, 2005)
4.3.3 Schematic Representation of Time
Constraints in H-Service-Net
Different measures of time exist to describe the
temporal constraints in our model seven time units
are adopted so the diagram is defined as follows:
[Year, Month, Day, Weekday, Hour, Minute,
Second] that allows to express temporal constraints
which must be confirmed with calendar dates.
4.3.4 Representation Model of Temporal
Constraints
CWS: refers to a composite Web service that is
represented as H-Service-Net Model.
CWS = {ID, WS, M, R}
ID: identifier of the composite Web service.
WS = {ws
1
, ws
2
,…, ws
i
,…, ws
n
}: Non-empty set of
Web service, ws
i:
is a Web service component which
belongs to the composite Web service CWS.
M
?!
= {? m / m M
?
} {! m / m M
!
}. M?: Non-
empty set of incoming message, M!: Non-empty set
of outgoing message.
R: Finite set of temporal constraint, R= R
1
R
2
.
R
1
: A relation that allows assigning absolute time
constraints.
R
1
= {XTUS, φ
K
C
1
φ
K
C
2,
ws
i
M
?!
}.
R
2:
A relation that allows assigning relative time
constraints between two Web services.
R
2
= {ws
i
M
?!
, XTUS, RA
K
(φ
K
C
1
φ
K
C
2
), ws
j
M
?!
}
XTUS: Time interval expressed in the XTUS system
with the follows schema [Year, Month, Day, Day of
Week, Hour, Minute, Second].
K: the number of the temporal attribute.
K {0,1,2,3,4,5}.
k=0 (BTU=”Year”, k=1 (BTU=”Month”, k=2
(BTU=”Day”, k=3 (BTU=”Day of Week”, k=4
(BTU=”Hour”, k=5 (BTU=”Minute”, k=6
(BTU=”Second”.
φ
K
: A set of comparison operator, φ
K
{<
K,
K
, >
K
,
K
, =
K
,
K}
.
C
1
, C
2
: Constants that express the values of BTU.
RA
K
:Allen’s Relation, RA {b
k
, m
k
, o
k
, s
k
, d
k
, f
k
,
ICEIS2015-17thInternationalConferenceonEnterpriseInformationSystems
580
eq
k
, a
k
, mi
k
, oi
k
, si
k
, di
k
, fi
k
}
The following table represents illustrative examples
that express relative temporal constraints using our
system for each Allen’s relation:
Table 4: Relative Time constraints for each Allen’s
relation.
Allen
Relation
Example
i
ws b
j
ws
j
ws
can be run between 1 and 5 days
after the execution of
i
ws
ji
wsbws ),51(,,
2
i
ws m
j
ws
j
ws
can be run Just after
i
ws the
first trimester of each year
j
i
wsmws ,]],31[,[,
i
ws o
j
ws
j
ws
can be run at least 20 minutes
before the beginning of
i
ws
j
i
wsows
,20
(
,,
5
i
ws s
j
ws
j
ws
can be run at the beginning of
i
ws every work day from 8 to 16
hours
ji
wssws ,]],168[],62[,,,[,
i
ws d
j
ws
j
ws
can be run at least 10 minutes
before the start of ws
and more than
20 minutes after the end of
i
ws
j
i
wsdws
,20,10
(
,,
5
i
ws f
j
ws
i
ws must end its execution by the end
of
j
ws
the last day of each year
j
i
ws
f
ws ,],31,12,[,
.
i
ws eq
j
ws
i
ws must begin and end with
j
ws
each weekend.
j
i
wseqws ,]],1,0[,,,[,
Our model allows expressing all relations of Allen
interval algebra. In order to model the temporal units
of Web services with time constraints, solutions in
section 2 (Diaz, 2006), (Kazhamiakin, 2004),
(CHEN, 2011) model time with one basic time unit
such as second or an hour. However, all basic time
units can be expressed in our solution.
Our system is applicable in every type of service
and especially in service aimed at temporal
constraints as critical
4.3.5 Temporal Constraint in H-Service-Net
The following temporal constraints are specified
TC1: if the client sends a valid credit card number
the notary must send the contract of purchasing the
land within a period of 8h.
Temporal constraints can be expressed either by
absolute constraints affected to a single service or by
a relative constraint between two messages
exchange.
.?),8(,,?
4
ActBuyingbCCN
TC2: in winter, a discount of the price is given to
building materials service.
.?,]],111[,[ materialdevis
TC3: service of selling and building materials has its
specific delivery time constraints in collaboration
with the contractor:
If the delivery request is received from 8h to
12h material is delivered after at most 1 hour.
If the delivery request is received from 13h to
16h material is delivered after at least 3 hours.
If the delivery request is received the weekend
the material is delivered over 24 hours.


deliverybdeliveryofordre
deliverybdeliveryofordre
deliverybdeliveryofordre
?),3(]],1612[,,,,[,!
?),1(]],118[,,,,[,!
?),24(]],10[,,,[,!
4
4
4
TC4: the client imposes that the construction of the
house should not exceed the realization delay of six
months.
.!),6(,,?
1
workendbaccept
4.3.6 Checking Temporal Consistency at
Design Time
This section presents the check-relative-constraint-
at-design-time algorithm for verifying relative
constraint in composite Web services. It affects the
new local constraint to the composite place that
contains relative constraint and then checks if the
relative constraint between two web services can be
satisfied compared to the local constraint of each
Web service. For the successful case, the outcome is
“total or partial temporal consistency”, and for the
unsuccessful case the outcome is “temporal
inconsistency”
Check-relative-constraint-at-design-time
algorithm
ALGORITHM 1. Check-relative-constraint-at-
design-time algorithm
Input:
LC
i
= [min
i
, max
i
]
ki
: Local constraint affected to ws
i
with
BTU=ki;
LC
j
=[min
j
,maxj]
kj
: Local constraint affected to ws
j
with
BTU=kj;
RC
i-j
={ws
i
,-,R
k(i-j)
(>l <m),ws
j
}: Relative constraint
affected to composite place TC
i-j
between ws
i
and ws
j
with
BTU=k(i-j);
Return (PTC: partial temporal consistency, TTC: total
temporal consistency, TI: temporal inconsistency)
Int Max-k= Max(ki,kj,k(i-j) );
TemporalConstraintinWebServiceComposition
581
s {i, j, i-j};
V
t
convert (V, i, j) {
T array [6];T [0] =12;T [1] =30;T [2] =24;T [3] =1;
T [4] =60;T [5] =60;
Int t =1;
For k=i to (j-1)
{t=t*T [k];}
V
t
=V*t;
Return V
t
; }
If (ks<Max-k) then
LCs=[convert(mins,ks,Max-k),convert(maxs,ks,Max-k)];
End if
Switch (R) {
Case “b”: LC [TC
i-j
] = [min
i
+l+min
j
, max
i
+m+max
j
];
break
Case “m”: LC [TC
i-j
] = [min
i
+min
j
, max
i
+max
j
];
break
Case “o”: LC [TC
i-j
] = [min
j
+l, max
j
+m];
Verify-o-constraint (); break
Case “s, f”: LC [TC
i-j
] = [min
j
, max
j
];
Verify-s-f-constraint (); break.
Case “d”: LC [TC
i-j
] = [min
j
, max
j
];
Verify-d-constraint (); break
Case “eq”: LC [TC
i-j
] = [max0 (min
i
, mini), max (max
i
,
max
j
)]; Verify-eq-constraint (); break
}
Verify-o-constraint () {
If (l+min
j
>min
i
) &(m+max
j
>max
i
) then return (‘’TTC ‘’);
Else if (l+min
j
>min
i
) then return (‘PTC‘’);
Else if (m+max
j
>max
i
) then return (‘’OTC‘’)
Else return ("TI’’)
End if
End if
End if }
Verify-s-f-constraint () {
If (min
j
min
i
>0) & (

>0) then return (‘’TTC‘’)
Else if (min
j
min
i
>0) then return (“PTC ‘’)
Else if (

>0) then return (“PTC‘’)
Else return (“TI”)
End if
End if
End if
}
Verify-d-constraint () {
If (min
j
>l+min
i
) &(
>
+) then return (‘’TTC‘’)
Else if ((
>+
) then return (‘’PTC‘’)
Else if (
>
+)) then return (‘’PTC‘’)
Else return (“TI”)
End if
End if
End if }
Verify-eq-constraint () {
If (min
i
=min
j
) & (
=
) then return (‘’TTC’)
Else if [min
i
, max
i
] [min
j
, max] then return (‘’PTC‘’)
Else return ("TI”)
End if
End if }
Example:
Ws
4
and Ws
5
are executed in parallel composite
place P
1
with local temporal constraints
LC
4
=[min
4
,max
4
], LC
5
=[min
5
, max
5
] and a relative
temporal constraint
RC
4-5
= {Ws
4
, R (>l <m), Ws
5
}.
The following table presents some example of
executing Check-relative-constraint-at-design-time
algorithm
min
4
max
4
min
5
max
5
R l m LC(P
1
) result
30 50 40 45 o 10 30 [50,75] TTC
30 50 5 10 o 10 30 [15,40] TI
5 20 10 15 eq 10 30 [10,20] PTC
5 10 20 30 eq 10 30 [20,30] TI
The following algorithm checks if the client global
constraint assigned to a composite place can be
satisfied compared to the local constraint of each
Web service. For the successful case, the outcome is
“total or partial temporal consistency”, and for the
unsuccessful case the outcome is “temporal
inconsistency”
ALGORITHM 2. Check-global-constraint-at-
design-time algorithm
GC= {-,
k
c, CompositPlace} GC: global constraint
affected to a composite place CompositPlace
LC: a set of local time constraint affected to a simple
place (atomic Web service) or composite place (composite
Web service)
Each simple Place has a local temporal constraint
affected by the service provider as a range LC= [min
L
,
max
L
]
k
Return (PTC: partial temporal consistency, TTC: total
temporal consistency, TI: temporal inconsistency)
k: the number of the time attribute k{0,1,2,3,4,5}.
k=0BTU="Year", k=1BTU="Month",
k=2BTU="Day", k=3BTU="Day of Week",
k=4BTU="Hour", k=5BTU="Minute",
k=6BTU="Second"
maxk max_temporal_attributes () {
maxk=0;
For each simple_place do
If maxk < simple_place. k then maxk = k;
End if
And for
Return maxk; }
Transform_to_interval (
k
c) {…………………..(5)
If
k
=<
k
c then return [0, c-1]
If
k
=
k
c then return [0, c]
If
k
=>
k
c then return [c+1, +]
If
k
=
k
c then return [c, +]
If
k
= >
k
c
1
k
=<
k
c
2
then return [c
1
+1, c
2
-1]
If
k
=>
k
c
1
k
=
k
c
2
then return [c
1
+1, c
2
]
If
k
=
k
c
1
k
= <
k
c
2
then return [c
1
,c
2
-1]
If
k
=
k
c
1
k
=
k
c
2
then return [c
1
,c
2
]
}
For each place do
Maxk = max_temporal_attribut ()………(1)
For each place.child do
LC.child=[convert(min
L
,k,maxk),
convert(max
L
,k,maxk)]………(2)
End for
If (place = S) or (place=R)
then LC.place= Somme (LC.child) ….(3)
ICEIS2015-17thInternationalConferenceonEnterpriseInformationSystems
582
And if
If (place = P) then
LC.place=[Max(min
L
.child),Max(max
L
.child)]…..(4)
And if
End for
[min
L
,max
L
]=LC(CompositPlace);
[min
g
,max
g
]= Transform_to_interval (GC);
If ([min
g
, max
g
] [min
L
, max
L
]) then return (‘’TTC‘’)
Else if [min
L
, max
L
] [min
g
, max
g
] then return (“PTC‘’)
Else if (max
L
>min
g)
then return (“PTC”)
Else return ("TI");
End if
End if
End if
If (min
L
max
g)
then return (“TI’’)
Else return (‘PTI‘’);
End if
(1) max_temporal_attributes () is a method that
returns the largest temporal attribute affected to a
simple place (atomic Web service) in the HSN
network, i.e. The maximum value of the k variable.
(2) Temporal attributes conversion of simple place
to the value max_k in order to have a common time
unit (BTU: Basic Time Unit).
(3) And (4) calculation methods of local temporal
constraints in a composites place.
(5) The method Transform_to_interval ( ) converts
temporal constraint to a temporal interval.
Example:
Ws
4
and Ws
5
are executed in parallel composite
place P
1
with local temporal constraints LC
4
= [min
4
,
max
4
], LC
5
=[min
5
, max
5
] and a global temporal
constraint
GC = { -, (>C
1
<C
2
), P
1
}.
The following table presents some example of
executing Check-global-constraint-at-design-time
algorithm
min
4
max
4
min
5
max
5
C1 C2 LC(P
1
) result
30 50 40 42 40 45 [40,42] TTC
30 50 40 45 40 45 [40,50] PTC
30 50 40 45 10 20 [40,50] TI
4.3.7 Checking Temporal Consistency at
Runtime
This section presents the check-relative-local-
constraint-at-run-time algorithm for verifying
relative and local constraint at run time in Web
service composition
ALGORITHM 3. Check-relative-local-
constraint at run time algorithm
LC
i
= [min
i
, max
i
]
ki
: Local constraint affected to ws
i
with
BTU=ki;
LCj=[minj,maxj]kj : Local constraint affected to wsj with
BTU=kj;
RCi
-j
= {ws
i
, -, R
k (i-j)
(>l <m), ws
j
}: Relative constraint
affected to composite place TC
i-j
between ws
i
and ws
j
with
BTU=k (i-j);
Bi, Ei: Begin and End execution of wsi;
Bj, Ej: Begin and End execution of wsj;
Return (LTC: Local temporal consistency, LTI: Local
temporal inconsistency, RTC: Relatif temporal
consistency, RTI: Relatif temporal inconsistency)
If ((E
i
-B
i
∈ [min
i
, max
i
] )then return (“LTC ‘’)
Else return (“LTI’’);
End if
If (E
j
- Bj ) [min
j
, max
j
] ) then return (“LTC‘’)
Else return (“LTI’’);
End if
Switch (R)
Case “b”:
if (B
j
[B
i
+min
i
+l, B
i
+max
i
+m]) then return
(“RTC”)
Else return (“RTI’’);
End if
break
Case “m”:
if (B
i
=E
j
) then return (“RTC”)
Else return ("RTI);
End if
break
Case “o”:
if ((B
j
[B
i
+l, B
i
+m]) & (E
i
<E
j
) & (E
j
[B
i
+l+min
j
,
B
i
+m+max
j
]) ) then return (“RTC‘’)
else return (“RTI’’);
End if
break
Case “s”:
if ((B
i
=B
j
) & (E
i
<E
j
)) then return (“RTC‘’)
Else return (“RTI’’);
End if
break
Case “d”:
if ((B
i
[B
j
+l, B
j
+m])&(E
i
<E
j
)) then return
(“RTC‘’)
Else return (“RTI’’);
End if
break
Case “f”:
if ((B
j
<B
i
) & (E
i
=E
j
)) then return (“RTC ‘’)
Else return (“RTI’’);
End if
break
Case “eq”:
if ((B
i
=B
j )
&(E
i
=E
j
)) then return (“RTC”)
Else return (“RTI’’);
End if
break
End switch
Example:
Ws
4
and Ws
5
are executed in parallel composite
place P
1
with local temporal constraints
LC
4
=[min
4
,max
4
], LC
5
=[min
5
, max
5
] and a relative
temporal constraint
RC
4-5
= {Ws
4
, R (>l <m), Ws
5
}.
The following table presents some example of
TemporalConstraintinWebServiceComposition
583
executing Check-relative-local-constraint at run time
algorithm
min
4
max
4
min
5
max
5
R l m B
4
E
4
B
5
E
5
result
30 40 40 45 o 10
30
35 70 50 95 RTC, LTC
30 40 40 45 o 10
30
35 70 50 65 RTI,LTI
5 CONCLUSIONS
Verification of temporal constraints in Web service
composition is an important way to ensure the
exactitude and the reliability of composition. Our
contribution proposes a modular approach for the
modeling composition with time constraint while
using Extend time unit system (XTUS) to represent
the temporal periodicity of the services, Allen’s
interval algebra and comparison operators (<, , >,
, =, ) to represent all types of temporal constraint
in a time Petri net model. H-Service-Net model
allows an incremental composition of services, as
well as checking of temporal consistency at design
time, during the execution and after each handling of
exception in a simplified manner and allows
reducing the quantity of stored data. Finally, we
present an algorithm of checking temporal constraint
at design and run time.
REFERENCES
Berthomieu, B., Diaz, M., 1991. Modeling and verification
of time dependent systems using time Petri nets.
Software Engineering, IEEE Transactions on
(Volume:17, Issue: 3) Page (s): 259 – 273.
Diaz, G., Pardo, J., Cambronero, M., Valero, V.,
Cuartero, F., 2006. Verification of Web Services with
Timed Automata. Notes in Theoretical Computer
Science, vol. 157(2), pp. 19-34.
Dai, G., Bai, X., 2007. A Framework for Time
Consistency Verification for Web Processes Based on
Annotated OWL-S. The Sixth International
Conference on Grid and Cooperative Computing(GCC
2007).
Allen, J., 1983. Maintaining Knowledge about Temporal
Intervals. Communications of ACM ,Vol 26 , no 11 ,
1983.
Bouzid, M., Ligeza, A., 2005. hierarchical granular terms
and their applications. In Proc. of the International
Conference on Tools with Artificial Intelligence.
IEEE, pp. 249–253.
Lallali, M., Zaidi, F., Cavalli, A., 2007. Timed Modeling
of Web Services Composition for Automatic Testing.
In Proc. Third International IEEE Conference on
Signal-Image Technologies and Internet-Based System
SITIS ’07, pages 417–426.
Lallali, M., Zaidi, F., Cavalli, A., 2008. Automatic Timed
Test Case Generation for Web Services Composition.
In Proc. IEEE Sixth European Conference on Web
Services ECOWS ’08, pages 53–62.
Rouached, M., Perrin, O., Godart, C., 2006. Towards
Formal Verification of Web Service Composition. in
ed. S. Dustdar, J. L. Fiadeiro, and A. Sheth, Lecture
Notes in Computer Science 4102: 257–273.
Peltz, C. 2003. Web services orchestration and
choreography. Published in: Computer (Volume:36 ,
Issue: 10 ) Page(s): 46 – 52.
Hamadi, R., Benatallah, B., 2003. A Petri Net-based
Model for Web Service Composition. Proceeding
ADC '03 Proceedings of the 14th Australasian
database conference Volume 17, 2003, Pages 191-
200, Australia.
Hamadi, R., Benatallah, B, Medjahed , B., 2008. Self-
adapting recovery nets for policy-driven exception
handling in business processes. Journal Distributed
and Parallel Databases Volume 23 Issue 1, Pages 1 –
44.
Kazhamiakin, R., Pandya, P., Pistore, M., 2004.
Representation, Verication, and Computation of
Timed Properties in Web Service Compositions. In
Proceedings of AAAI Spring Symposium on
Semantic Web Services (Stanford University, CA).
CHEN, T., GENG, S., 2011. Verification of Time
Constraints Consistency on Web Service Composition
based on ETPN. Applied Mechanics and Materials
Vols. 58-60 (2011) pp 1094-1099.
ICEIS2015-17thInternationalConferenceonEnterpriseInformationSystems
584