Information Technology Reference
In-Depth Information
the
user
preference
is:
AccountBalance
>
Payment
?
PayInFull
:
PayByInstallments
in which “
AccountBalance
>
Payment
?” is denoted
by
Cond
.
The inference method in our algorithm can be simply based on
input and output parameters of a service. In other words, each state
S
that is associated with an action can be just viewed as a set of input and
output parameters. Under
S
, a service
WS
can be executed if and only if
its input set
I
can be covered by
S
(i.e.,
I
S
).
By executing SCP, we first establish the initial node
n
0
, where its
related state is
S
0
{
DN, DQ, AN, AP
}. Under this state, we know
that the set of invocable services is
V
(
S
0
)
¼
I
A
¼
{
SearchDrugs, Account-
Query
}, since the input requirements of these two services can be
satisfied by the available parameters at
S
0
. Two action nodes
n
1
and
n
2
,
labeled with
SearchDrugs
and
AccountQuery
, respectively, are intro-
duced into the diagram.
S
1
¼
{
AB
}
are their corresponding states. Since the user preference is of Type I,
we call subprocedure PPCE. However, the services in user preference
(i.e.,
PayInFull
and
PayByInstallments
) have not appeared yet. Then
we continue the while-repeat procedure in SCP. We obtain node
n
1
from
set
NS
, and the set of invocable services is
V
(
S
1
)
¼
S
0
[
{
DC
,
DP
,
DD
} and
S
2
¼
S
0
[
{
SubmitOrder,
AccountQuery
}. Two action nodes
n
3
and
n
4
are introduced into the
diagram for them, and
S
3
¼
¼
g
are
their corresponding states. The services in which we are interested have
not appeared yet. Thus, we continue the while-repeat procedure.
Similarly, for node
n
2
2
S
1
[f
OI
;
Pa
g
and
S
4
¼
S
1
[f
AB
¼
{
SearchDrugs
}. An action node
n
5
is introduced for it and its corre-
sponding state is
S
5
¼
NS
, the set of invocable services is
V
(
S
2
)
. Continuing the while-
repeat procedure, node
n
3
is taken from set
NS
. The set of invocable
services is
V
(
S
3
)
S
2
[f
DC
;
DP
;
DD
g
{
AccountQuery, PayInFull, PayByInstallments
},
and three action nodes
n
6
,
n
7
, and
n
8
are introduced into the diagram for
them.
S
6
¼
¼
are their correspond-
ing states. The services in the user preference appear now. Then we
execute subprocedure PPCE.
The formula
Cond
in the user preference cannot be evaluated under
state
S
3
, but it can be evaluated under
S
6
(i.e., the second case in PPCE).
Then, according to the algorithm, a conditional branch structure is
introduced into the diagram after action node
n
6
, and the corresponding
state of the merge node
n
M
1
is
S
M
1
S
3
[f
AB
g
and
S
7
¼
S
8
¼
S
3
[f
PaN
g
. We now return to the
main algorithm SCP and continue the while-repeat procedure. At
present
NS
¼
S
6
[f
PaN
g
¼
{
n
4
,
n
5
,
n
M
1
}. For
n
4
and
n
5
, two action nodes
n
9
and