![Page 1: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/1.jpg)
Semantic Web Services Composition
Peter Bartalos
![Page 2: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/2.jpg)
Outline
Basics of service composition Why we need semantics? Different kinds of user goals
![Page 3: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/3.jpg)
Service composition
Arranging web servicesinto complex workflows Based on user goal
WS1
WS5
WS3WS7
WS4
WS6
WS2
![Page 4: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/4.jpg)
Service chaining
Requirement I/O compatibility Syntactic level - WSDL
Ancestor
Successor
O
I?
<element name=“getTemperatureReturn" type="xsd:double"/>
<element name=“areaName" type="xsd:string"/>
![Page 5: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/5.jpg)
Service chaining
Output:meteoowl:Temperature
Input:meteoowl:Elevationmeteoowl:LocalPressure
getTemperature()
getAtmPressure()
Output:<element name=“getTemperatureReturn" type="xsd:double"/>
Input:<element name=“elevation" type="xsd:double"/><element name=“localPressure" type="xsd:double"/>
![Page 6: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/6.jpg)
Meaningful chaining
Output:meteoowl:Elevation
getElevation()
getAtmPressure()
Output:<element name=“getElevationReturn" type="xsd:double"/>
Input:<element name=“heightAboveLocation" type="xsd:double"/><element name=“localPressure" type="xsd:double"/>
Input:meteoowl:Elevationmeteoowl:LocalPressure
![Page 7: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/7.jpg)
Problem again
Output:meteoowl:Elevation
Input:meteoowl:Elevationmeteoowl:LocalPressure
getElevation()
getAtmPressure()Output:
<element name=“getElevationReturn" type="xsd:double"/>
Input:<element name=“heightAboveLocation" type="xsd:double"/><element name=“localPressure" type="xsd:double"/>
In meters
In ft.
![Page 8: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/8.jpg)
Problem again
Output:meteoowl:Elevation
Input:meteoowl:Elevation
getElevation()
getAtmPressure()Output:
<element name=“getElevationReturn" type="xsd:double"/>
Input:<element name=“heightAboveLocation" type="xsd:double"/><element name=“localPressure" type="xsd:double"/>
Postcondition:
inMeters (getElevationReturn)
Precondition:
inFeet (heightAboveSeaLevel)
![Page 9: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/9.jpg)
Considering conditions
Output:meteoowl:Elevation
Input:meteoowl:Elevation
getElevation()
getAtmPressure()Output:
<element name=“getElevationReturn" type="xsd:double"/>
Input:<element name=“heightAboveLocation" type="xsd:double"/><element name=“localPressure" type="xsd:double"/>
Postcondition:
inMeters (getElevationReturn)
Precondition:
inMeters (heightAboveSeaLevel)
![Page 10: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/10.jpg)
Semantic service composition
Basic service description I/O
Binding parameters to the concepts in the ontology
Pre-/post-conditions Logical expressions Predicates combined with logical operators Binding to ontological elements
![Page 11: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/11.jpg)
Semanticcompatibility evaluation
Compatibility evaluation I/O
Checking if O subsumes I Pre-/post-conditions
Checking if Post => Pre
![Page 12: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/12.jpg)
How it starts
User goal definition Required outputs Required condition Provided inputs
![Page 13: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/13.jpg)
How it starts
User goal example The user wants the air pressure in kPa in
Smolenice corrected to sea level.
Required output meteoowl:AtmosphericPressure
Required condition inkPa(pressure)
Provided inputs geoowl:Area = Smolenice meteoowl:LocalPressure = 98.5kPa
![Page 14: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/14.jpg)
Example composition
getElevation()
getAtmPressure()
Output:meteoowl:Elevation
Input:meteoowl:Elevationmeteoowl:LocalPressure
Output:meteoowl:AtmosphericPressure
Input:geoowl:Area
Postcondition:
inkPa(pressure)
Smolenice
98.5kPa
![Page 15: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/15.jpg)
Best composition
Generally we have several composite services satisfying the user goal
We have to choose the best one Soft and hard constraints
![Page 16: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/16.jpg)
Simple condition
The user wants to book a flight.
Condition booked(flight)
![Page 17: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/17.jpg)
Value restriction
The user wants to book a flight to Los Angeles.
Condition booked(flight)^hasDestination(flight,
destination) Value restriction
destination = LosAngeles
![Page 18: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/18.jpg)
Local variables The user wants to book a flight to Los Angeles
and a hotel for overall price at most 500$. Condition
booked(flight)^hasDestination(flight, destination)^hasPrice(flight, flightprice)^booked(hotel)^hasPrice(hotel, hotelprice)
Value restriction destination = LosAngeles ^ price < 500$
Local variable definition price = flightprice + hotelprice
![Page 19: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/19.jpg)
Soft constraints - fuzzy
The user wants to book a flight for about 350$.
Condition booked(flight) ^ hasPrice(flight,
flightprice) Value restriction
flightprice = fuzzy number
![Page 20: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/20.jpg)
Predicate evaluation I
The user wants to book a flight through weekend.
Condition booked(flight)^hasFlightTime(flighttime)
Value restriction isWeekendTime(flighttime)
![Page 21: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/21.jpg)
Predicate evaluation II
The user wants to book the cheapest flight.
Condition booked(flight) ^ hasPrice(flight,
flightprice) Value restriction
cheapest(flightprice)
![Page 22: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/22.jpg)
Conditional restriction
The user wants to book a flight if it includes also insurance, else he wants to use a train.
Alternatives booked(flight)^includesInsurance(flight) book(traintravel)
If Then Else …
![Page 23: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/23.jpg)
Event handling
The user wants to book a flight, but if that flight is delayed by more than 24 hours, he wants to cancel the flight and take a train.
Basic condition booked(flight)
Event booked(flight) ^ isDelayed(flight, delay) delay > 24hour
Action cancelled(flight) ^ booked(traintravel)
![Page 24: Semantic Web Services Composition Peter Bartalos](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e435503460f94b36d2b/html5/thumbnails/24.jpg)
Open problems
How to get the required representation of the user goal?
How to present the results? Booking problem …? Do we need additional metadata? How to develop “composition
friendly” services?