Information Technology Reference
In-Depth Information
another web service to be executed before them. Such services can be located by
searching for the existence of each web service in the plan as a right part of an order
constraint. If this search returns no results, then the service can be marked as “clear”.
For example, having the set of web services { A, B, C } and the order constraints
{ A<B, B<C } it can be easily inferred that only the service A is clear, because it does
not appear as a right member of any order constraint. For each clear web service, the
construction of sub-representations of the desired composition takes place. In essence,
the relationship among a clear web service and all its children, all the services that can
be executed after the completion of the clear service, is revealed.
Algorithm 2 (Basic): Computes an initial composite
service with Sequence and Split constructs
Inputs : G = (V,E), the web service graph
Output : C, a composite service
// R is the set of root nodes in G
set R {r V: x V, (x r) E }
if R = 0 then return NULL
if R = 1 then
set G' the tree in G with r R
as the root
return sequence(r, Basic(G'-{r}))
set c {}
for each r in R
set G' the tree in G with r R
as the root
set c c Basic(G'-{r})
return Join(split(c))
In the next steps of the algorithm Basic , the number of clear services is examined. In
the trivial case, where there are no such services, a null value is returned. If there is
only one clear service, then the only representation that can be constructed is a simple
sequence of the clear service and the composition of the child. So in this point, the
algorithm calls recursively itself with the rest of the graph as a parameter. This is
because the expression beginning from the clear service must contain all the informa-
tion about the expressions that can be built from the children of this service.
If there are more than one clear services, then an empty composite web service is
created and for every clear service the Basic procedure is invoked having as parameter
the Graph without the service in question. All the returned functional representations
are then added to a split control. The resulting split expression is simplified by an algo-
rithm that will be analyzed later in the paper. A short example is given to clarify the
procedure. Suppose there are a clear service A and two children B and C . The function-
al representation returned from the algorithm, in terms of control constructs, will be
seq ( A , split ( Basic ( B ), Basic ( C ))). Supposing that there are no other web services in the
plan, the final result will be seq ( A , split ( B , C )).
Search WWH ::




Custom Search