Information Technology Reference
In-Depth Information
only shared variable in the capability definition is ?request . This is required
in order to capture which postcondition will be achieved when a specific input
is provided to the service.
capability amazonWSCapability
sharedVariables { ?request }
precondition
definedBy
//A search by author, keywords, title , minPrice or maxPrice
?request memberOf am#itemSearchRequest or
[...]
.
postcondition
definedBy
// The result for a search request by author is a container of products
// such that all items in the container are amazonBooks have the requested author:
(?request [
author hasValue ?author
] memberOf am#searchBooks implies
exists ?container
( ?container memberOf am#itemContainer and
forall ?item
(?container [
items hasValue ?item
] memberOf am#itemContainer implies
?item[
author hasValue ?author
] memberOf bk#amazonBook
)
)) and
// The result for a search request by keyword is a container of products
// such that all items in the container are amazonBooks have the requested keyword:
(?request [
keywords hasValue ?keyword
] memberOf am#searchBooks implies
exists ?container
( ?container memberOf am#itemContainer and
forall ?item
( ?container [
items hasValue ?item
] implies
?item[
keywords hasValue ?keyword
] memberOf bk#amazonBook
)
)) and [...]
.
Listing 11.1. Capability of the Amazon e-commerce service
The second important part of the WSMO description of the Amazon ECS
that we present here is the choreography interface. This defines the behavioral
interface for consumption of the service by a client. In other words, it defines
the communication structure supported by the Web service for consuming
its functionality. As explained above, WSMO choreography interface defini-
tions consist of a state signature that defines the ontological terminology and
its usage for communication, and of guarded transitions that specify the dy-
namic aspects of the service's communication behavior. Listing 11.2 shows a
selection from the ECS choreography interface. This corresponds to the prod-
uct search functionalities that the above listing specified the postcondition for.
Search WWH ::




Custom Search