Information Technology Reference
In-Depth Information
In the first case, Cond can be evaluated under the current state S' .
In this case, we can introduce a decision node into the diagram
directly, whose input comes from action n 0 (which is being processed
in SCP).
In the second case, Cond cannot be evaluated under S 0 .However,in
the set of services V ( S 0 ) which can be executed currently, there is a
service such that the state obtained after executing it can result in the
truth value of Cond . Under this circumstance, we introduce a decision
node after the action corresponding to the service.
If both above-mentioned cases are not satisfied, we continue the
reasoning process based on the action set NS temp which corresponds to
the invocable service set V ( S 0 ), until there exists an action whose state
can result in the truth value of Cond . Here, the reasoning process is
similar to the one utilized in SCP.
After the decision node is introduced no matter which case is
satisfied, we draw connectors from it to n 0 A and n 0 A (corresponding to the
two services designated), respectively. Meanwhile, set the correspond-
ing guard ( Cond or
Cond ) for these two control flows. Then we
introduce a merge node into the diagram, whose two inputs originate
from n 0 A and n 0 A , respectively. After that, we compute the corresponding
state S M of merge node n M ,andadd n M into NS to complete the
connection with SCP. The merge node is also with a state for reasoning
here for the simplicity of our algorithm. An important point needs to be
noted here. We believe that the services in different branches of the
same conditional structure have some similarities. For instance, they
may have the same outputs and effects. Therefore, we think that the
states obtained and the state of the merge node by executing services w 0
and w 00 under some state are equivalent, and can be used as the state of
the merge node. Here, we deal with this in such a way for simplicity.
Moreover, the services appearing in the same conditional branch
structure always have similar functionalities. If it is not the case, minor
modification to our algorithm is needed. The merge node will not be
introduced, and states S 0 A and S 0 A should be recalculated.
For Type II preferences, that is,
:
switch
ð
condition
Þf
case C 1 :
WS 1 ;
case C 2 :
WS 2 ;...;
case C n :
WS n ; g;
algorithm
is used to introduce multiple branch structures into
the activity diagram when some conditions are satisfied.
PPMC
Search WWH ::




Custom Search