Information Technology Reference
In-Depth Information
Output:
ADG
(adg
1
;
adg
2
;...;
adg
m
)
, a set of activity diagrams representing
all the feasible composite services.
1. Establish the initial node, and denote it by
n
0
;
2. The corresponding state of
n
0
is
S
0
;
3.
NS
¼
¼
{n
0
}
;
RS
¼
f
;
4.
while
NS
6¼
f
do
n
0
2
NS
, suppose that its corresponding state is
S
0
;
5.
8
S
0
6.
if
O
E
then
n
0
g;
n
0
g
7.
RS
¼
RS
[f
NS
¼
NS
f
;
8.
else
According to
S
0
, do one step reasoning to obtain all the executable
services, noted as
V
(
S
0
);
9.
10.
NS
temp
¼
f
;
S
0
Þ do
12. Introduce an action node into the graph, labeled with the name
of service
w
, and draw a connector from
n
0
to it;
13. Denote the new action node by
n
i
, and compute its
corresponding state
S
i
;
11.
for
each service
w
2
V
ð
14.
NS
¼
NS
[
{n
i
}
,
NS
temp
¼
NS
temp
[
{n
i
}
;
15.
end for
16.
if
there exists Type I user preference
then
17.
Call subprocedure
PPCE
;
18.
end if
19.
if
there exists Type II user preference
then
20.
Call subprocedure
PPMC
;
21.
end if
22.
if
there exists Type III user preference
then
23.
Call subprocedure
PPP
;
24.
end if
{n
0
}
;
25.
NS
¼
NS
26.
end if
27.
end while
28.
if
RS
¼
f
then
29.
print
“There is no solution!”
30.
Exit.
31.
else
32.
Introduce an activity final node into the diagram, denoted as
n
f
;