You are on page 1of 230

TUTORIAL

Semantically Enabled
Service-Oriented
Architectures (SESA)

WSML WSMO WSMX


SESA Tutorial Seoul, South Korea, September 2007

Description
The tutorial provides a comprehensive overview of the state-of-the-art in Semantic Web
and Semantic Web services, and presents the concept of so-called Semantically Enabled
Service-Oriented Architectures (SESA) as the next step of technology development. The
tutorial will be based on the Web Service Modeling Ontology WSMO (www.wsmo.org)
that is mainly developed by the Digital Enterprise Institute DERI (www.deri.org).
In order to overcome the deficiencies of the initial technology stack around WSDL and
SOAP for the detection and usability analysis of Web services, the emerging concept of
Semantic Web Services (SWS) develops techniques for the automated discovery,
composition, and execution of Web services. These apply inference-based reasoning
techniques that work on formal descriptions and use ontologies as the underlying data
model. Ontologies are formalized knowledge models, and are used as the base
technology for the Semantic Web in order to facilitate semantically enabled processing of
Web Content. The concept of Semantically Enabled Service-Oriented Architectures
(SESA) aims at automated support for the complete life- and production cycle of Service-
Oriented Architectures. For this, the SWS approach is extended with additional,
semantically described elements: goals as formally described client objectives, and
mediators for handling potentially occurring heterogeneities.
The Web Service Modeling Ontology WSMO is a comprehensive framework for SESA
that defines a conceptual model along with a specification language, and provides a
reference implementation with additional tool support. WSMO defines ontologies, Web
services, goals, and mediators as its top level elements with a description model and
language for each of them. The specification language WSML covers all types of
languages that are considered to be relevant for the Semantic Web, and a reasoner suite
along with additional tool support. The reference implementation WSMX provides an
open-source development and execution environment for SESA on the basis of the
WSMO framework.
The aim of the tutorial is to provide a comprehensive overview of the SESA concept and
its realization within WSMO. We will outline the motivation and need for such
technologies, explain the WSMO framework and technology, and show existing
applications. A major part of the tutorial are practical hands-on sessions wherein the
attendees actively model WSMO elements and use the existing tools. Attendees will be
provided with hand-outs and CDs with the tutorial material and software.

1
SESA Tutorial Seoul, South Korea, September 2007

Outline

The tutorial will be given as a 4-day event.


The following outlines the agenda.

Day 1: Introduction and Foundations (half day)


At first, we introduce into the context of SESA, explaining the need and the motivation,
the basic concepts and technologies, and the WSMO framework.
This part covers:
(1) Introduction: Semantic Web, Web Services & SOA
(2) Foundations: Ontologies , Web Service Technology Stack & Shortcomings, SWS
(3) The WSMO Framework: specification, language, core techniques

Day 2: Logics and Reasoning (full day)


The second part of the tutorial addresses logics and reasoning as the basis of semantic
technologies. We will explain this on hand of the WSMO specification language
(WSML); the afternoon will be a practical hands-on session.
(4) Introduction: logics & reasoning for the Semantic Web
(5) The WSML Language: variants, syntax, editors, reasoning infrastructure
(6) Hands-On Session: practical exercises with supervision

Day 3: Semantic Web Service Environments (full day)


The third part of the tutorial is concerned with development and execution environments
for SESA. We present this on hand of the WSMO reference implementation WSMX; the
afternoon will be a practical hands-on session.
(7) Introduction: SOA reference architectures, SESA architectures
(8) The WSMX System: system architecture & components
(9) Hands-On Session: practical exercises with supervision

Day 4: Applications, Standardization, Future Trends (half day)


The final part of the tutorial presents existing solutions of the WSMO technology for
different application areas, and depicts the current status of standardization efforts around
semantic technologies as well as market prospects and expected future trends.
(10) Application Areas: approach & benefits (esp. telecommunication industry)
(11) The SUPER project: semantically enabled business process management

2
SESA Tutorial Seoul, South Korea, September 2007

Presenters
The tutorial is presented by three experienced researchers from the DERI institute in
Innsbruck who actively work on the presented technologies. The following provides
some biographical information.

Michael Stollberg is a researcher with the Digital


Enterprise Research Institute DERI, working in the area of
Semantic Web Services. He has published around 30
scientific articles in the area. Michael Stollberg is a
founding member of the WSMO working group and has
been as work package manager in the DIP project. He has
been responsible for a series of over 20 tutorials on
Semantic Web services, he has been the tutorial chair of
ESWC 2006, and is program committee member of several
related conferences and workshops.

Omair Shafiq is a researcher at the DERI institute in


Innsbruck, Austria. His research interests focus on Semantic
Web, Semantic Web Services, Semantic Grid, Peer-to-Peer
Computing and Distributed Systems Management, and
published over 20 articles in international journals,
conference and workshops. He is a project management
assistant of the Triple Space Computing project, and also
works in the projects Triple Space Communication
(TripCom), and Grid Semantics and Intelligent Objects
(GRISINO). He is member of OASIS technical committee
on Semantic Execution Environments. He has also been
involved in organization and program committee of a
number of international conferences and workshops.

Darko Anicic is a researcher at the DERI institute in


Innsbruck, Austria. His main research areas are rule-based
reasoning with large data sets, deductive database
algorithms and optimization techniques, reasoning in
distributed environments and Semantic Web. He is leading
the development of the Integrated Rule Inference System
(IRIS) - an open source reasoner engine for WSML. He was a
project management assistant of the Adaptive Services Grid
(ASG) project, and is currently working in the SUPER
project as well as in a number of other projects that use the
IRIS engine as an underlying inference system. He is
member of W3C and active participant in a number of
international conferences and workshops

3
Mission

The mission of the Digital Enterprise Research


Institute (DERI) is to establish semantics as a core
pillar of modern computer engineering

SESA Tutorial
1 Seoul, 10 - 14 September
2007

DERI International (Current Status)

SESA Tutorial
2 Seoul, 10 - 14 September
2007

4
DERI Partners

IFOMIS

SESA Tutorial
3 Seoul, 10 - 14 September
2007

Main Research Fields

Semantic Web & Ontologies


ontology languages
reasoning infrastructures
semantic data integration

Semantic Web Services


semantic WS annotation
SWS technologies: automated discovery, composition,
mediation, selection, compatibility analysis
automated WS execution
Web Services & SOA

=> Semantically Enabled Service-Oriented Architectures

SESA Tutorial
4 Seoul, 10 - 14 September
2007

5
The Web Service Modeling Ontology

Objectives that a client wants to


achieve by using Web Services

Semantic description of
Formally specified Web Services:
terminology used
by all other - Capability (functional)
components - Interfaces (usage)

Connectors between components


with mediation facilities for handling
heterogeneities

SESA Tutorial
5 Seoul, 10 - 14 September
2007

Day I
Introduction
Semantic Web
Semantic Web Services
WSMO

Michael Stollberg
SESA Tutorial
6
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

6
Agenda

The Vision
The Semantic Web
Web Services
Semantic Web Services

The Web Service Modeling Ontology WSMO


a comprehensive framework for SESA
elements & languages
central techniques

LUNCH BREAK

Other Approaches
OWL-S, SWSF, WSLD-S, SAWSDL

Outlook for Next Days


Logics & Reasoning
SESA Development Environments
SESA Tutorial
7 Seoul, 10 - 14 September
2007

Next Generation of the WWW

Dynamic Web Services Semantic Web


UDDI, WSDL, SOAP Services

Static
WWW Semantic Web
URI, HTML, HTTP RDF, RDF(S), OWL

SESA Tutorial
8 Seoul, 10 - 14 September
2007

7
The Semantic Web

next generation of the Internet (augmentation of the WWW)

information has machine-processable and machine-understandable


semantics

ontologies as base technology for semantic interoperability

semantic bridges

ontology ontology ontology

RDF OWL Web XML DB


Appl.

SESA Tutorial
9 Seoul, 10 - 14 September
2007

Ontology Definition

unambiguous conceptual model


terminology definitions of a domain
(ontological theory)

formal, explicit specification of a shared conceptualization

commonly accepted
machine-readability
understanding
with computational
semantics

SESA Tutorial
10 Seoul, 10 - 14 September
2007

8
Ontology Example

Concept name email

conceptual entity of the domain Person


student research
Property ID field

attribute describing a concept isA hierarchy


(taxonomy)
Relation Student Professor
relationship between concepts or attends holds
properties
Axiom Lecture
coherency description between lecture
topic
Concepts / Properties / Relations via no.
logical expressions
holds(Professor, Lecture) =>
Instance Lecture.topic = Professor.researchField
individual in the domain
Ann memberOf student
name = Ann Lee
studentID = 12345

SESA Tutorial
11 Seoul, 10 - 14 September
2007

Ontology Languages

Requirements
expressivity
reasoning support
web compliance

W3C Semantic Web Language Layer Cake


revised version, Tim-Berners-Lee 2005

SESA Tutorial
12 Seoul, 10 - 14 September
2007

9
Ontology Technology

Ontology Reasoning
+ advanced information processing
special requirements
large scale knowledge handling
fault-tolerant
stable & scalable inference machines

Ontology Management
(collaborative) editing and browsing
storage and retrieval
versioning and evolution support

SESA Tutorial
13 Seoul, 10 - 14 September
2007

Ontology-Based Data Integration

Ontology Integration Techniques

Ontology Mapping Ontology Alignment Ontology Merging

Mapping Ontology A is made


Rules compatible to ontology B

data integration on semantic level (domain independent)


semi-automatic
human intervention needed for integration decision
graphical support for ontology mapping as central technique

SESA Tutorial
14 Seoul, 10 - 14 September
2007

10
Web Services & SOA

Web Service = program accessible over the Web

Service-Oriented Architecture (SOA):


use Web services as basic building blocks
dynamically find & invoke those Web services
that allow to solve a particular request

Web Service Technologies:


1. WSDL Web Service Description Language
2. SOAP XML data exchange protocol for the Web
3. UDDI registry for Web Services

SESA Tutorial
15 Seoul, 10 - 14 September
2007

WSDL

Web Service Description Language


W3C effort, WSDL 2 final specification phase

describes interface for


consuming a Web Service:
- Interface: operations (in- & output)
- Access (protocol binding)
- Endpoint (location of service)

SESA Tutorial
16 Seoul, 10 - 14 September
2007

11
SOAP

Simple Object Access Protocol


W3C Recommendation

XML data transport:


- sender / receiver
- protocol binding
- communication aspects
- content

SESA Tutorial
17 Seoul, 10 - 14 September
2007

UDDI

Universal Description, Discovery, and Integration Protocol


OASIS driven standardization effort

Registry for
Web Services:
- provider
- service information
- technical access

SESA Tutorial
18 Seoul, 10 - 14 September
2007

12
The Web Service Usage Process

points to
Repository WSDL

find usable describes


Web Service

Web
Consumer SOAP
Service
WS usage via message exchange

SESA Tutorial
19 Seoul, 10 - 14 September
2007

Deficiencies of WS Technology

current technologies allow usage of Web Services


but:
only syntactical information descriptions
syntactic support for discovery, composition and execution
=> Web Service usability, usage, and integration needs to be
inspected manually
no semantically marked up content / services
no support for the Semantic Web

=> initial Web Service Technology Stack failed to


realize the SOA Vision

SESA Tutorial
20 Seoul, 10 - 14 September
2007

13
Semantic Web Services

automate Web Service technologies by


1. rich, formal annotation of Web Services
2. inference-based techniques for automated discovery,
composition, mediation, execution of Web Services
integration with the Semantic Web
ontologies as data model
Web Services as integral part
Semantically Enabled SOA (SESA):
also semantically describe client requests
mediation techniques as integral part
semantically enhance & automate the
complete SOA life cycle

SESA Tutorial
21 Seoul, 10 - 14 September
2007

Semantic Web Services

a) Web Service Description Structure b) Semantic Web Service Description Structure

Non-functional Functionality
Interface

Web Service Web Service


WS
Implementation Implementation
(not of interest in Web (not of interest in Web WS
Service Description) Service Description)

WS

Interface Aggregation

XML

Ontology Ontology Ontology

SESA Tutorial
22 Seoul, 10 - 14 September
2007

14
Goal-driven Web Service Usage

Client
objective / problem to be solved

client-system interaction

Goals
formal objective description

discovery, composition, mediation

Semantics / SWS
Ontology SWS description Mediator

execution

Web Services & Resources


Web Service Internet

SESA Tutorial
23 Seoul, 10 - 14 September
2007

SESA = Automated Goal Solving with WS

if: successful
GOAL
else:
submission not solvable
matchmaking
else: try other WS uses R with all WS
Discoverer
if: composition possible
Data if: usable
Mediator
Selection & uses Composer
Ranking
Service
Repository
Process uses Behavioral composition
Mediator Conformance (executable)

if: compatible
information lookup
for particular service
Executor
if: execution
error

SESA Tutorial
24 Seoul, 10 - 14 September
2007

15
The WSMO Framework

Michael Stollberg
SESA Tutorial
25
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

Web Service Modeling Ontology (WSMO)

Comprehensive Framework for SESA


top level notions = SESA core elements
conceptual model + axiomatization
ontology & rule language

International Consortium (mostly European)


started in 2004
78 members from 20 organizations
W3C member submission in April 2005

www.wsmo.org

SESA Tutorial
26 Seoul, 10 - 14 September
2007

16
WSMO Top Level Notions

Objectives that a client wants to


achieve by using Web Services

Formally specified Semantic description of Web


terminology used by all Services:
other components - Capability (functional)
- Interfaces (usage)

Connectors between components with


mediation facilities for handling
heterogeneities

W3C submission 13 April 2005

SESA Tutorial
27 Seoul, 10 - 14 September
2007

WSMO Working Groups

Conceptual Model & www.wsmo.org


Axiomatization for SWS

Formal Language for WSMO Execution Environment


for WSMO
Ontology & Rule Language
for the Semantic Web

SESA Tutorial
28 Seoul, 10 - 14 September
2007

17
The Web Service Modeling Ontology

Objectives that a client wants to


achieve by using Web Services

Semantic description of
Formally specified Web Services:
terminology used
by all other - Capability (functional)
components - Interfaces (usage)

Connectors between components


with mediation facilities for handling
heterogeneities

SESA Tutorial
29 Seoul, 10 - 14 September
2007

Ontology Usage & Principles

Ontologies are the data model throughout WSMO


all WSMO element descriptions rely on ontologies
all data interchanged in Web Service usage are ontologies
Semantic information processing & ontology reasoning

WSMO Ontology Language WSML


conceptual syntax for describing WSMO elements
logical language for axiomatic expressions (WSML Layering)

WSMO Ontology Design


Modularization: import / re-using ontologies, modular approach
for ontology design
De-Coupling: heterogeneity handled by OO Mediators

SESA Tutorial
30 Seoul, 10 - 14 September
2007

18
Ontology Specification

Non functional properties (see before)


Imported Ontologies importing existing ontologies
where no heterogeneities arise
Used mediators OO Mediators (ontology import with
terminology mismatch handling)

Ontology Elements:
Concepts set of concepts that belong to the ontology, incl.
Attributes set of attributes that belong to a concept
Relations define interrelations between several concepts
Functions special type of relation (unary range = return value)
Instances set of instances that belong to the represented ontology
Axioms axiomatic expressions in ontology (logical statement)

SESA Tutorial
31 Seoul, 10 - 14 September
2007

Specification Language: WSML

SESA Tutorial
32 Seoul, 10 - 14 September
2007

19
The Web Service Modeling Ontology

Objectives that a client wants to


achieve by using Web Services

Semantic description of
Formally specified Web Services:
terminology used
by all other - Capability (functional)
components - Interfaces (usage)

Connectors between components


with mediation facilities for handling
heterogeneities

SESA Tutorial
33 Seoul, 10 - 14 September
2007

WSMO Web Service Description

- complete item description


- quality aspects - Advertising of Web Service
- Support for WS Discovery
- Web Service Management

Non-functional Properties Capability

DC + QoS + Version + financial functional description

client-service realization of
interaction interface functionality by
for consuming WS Web Service WS
aggregation
- external visible Implementation - functional
WS
behavior (not of interest in Web decomposition
Service Description)
- communication WS
- WS composition
structure
- grounding
Choreography --- Service Interfaces --- Orchestration
SESA Tutorial
34 Seoul, 10 - 14 September
2007

20
Capability Specification

Non functional properties


Imported Ontologies
Used mediators
OO Mediator: importing ontologies with data level mismatch resolution
WG Mediator: link to a Goal wherefore service is not usable a priori
Shared Variables: scope is entire capability
Pre-conditions
what a web service expects in order to be able to
provide its service. They define conditions over the input.
Assumptions
conditions on the state of the world that has to hold before
the Web Service can be executed
Post-conditions
describes the result of the Web Service in relation to the input,
and conditions on it
Effects
conditions on the state of the world that hold after execution of the
Web Service (i.e. changes in the state of the world)

SESA Tutorial
35 Seoul, 10 - 14 September
2007

Example VTA Web Service

Web service for booking tickets or complete trips


capability precondition (WSML)
capability VTAcapability
sharedVariables {?item, ?passenger, ?creditCard, ?initialBalance, ?price}
precondition
definedBy
exists ?reservationRequest
(?reservationRequest[
reservationItem hasValue ?item,
passenger hasValue ?passenger,
payment hasValue ?creditcard]
memberOf tr#reservationRequest and
(?item memberOf tr#trip or ?item memberOf tr#ticket) and
?passenger memberOf pr#person and
?creditCard memberOf po#creditCard and
(?creditCard[type hasValue po#visa] or
?creditCard[type hasValue po#mastercard]) ) .
SESA Tutorial
36 Seoul, 10 - 14 September
2007

21
Example VTA Web Service

WSMO capability assumption:


the provided credit card is valid
the balance of the credit card before executing the service is higher
than the price of the reservation (= purchased item) that is retrieved
after executing the Web service.

assumption
definedBy
po#validCreditCard(?creditCard) and
?creditCard[balance hasValue ?initialBalance] and
(?initialBalance >= ?price) .

SESA Tutorial
37 Seoul, 10 - 14 September
2007

Example VTA Web Service

capability description (post-state)


postcondition
definedBy
exists ?reservation(?reservation[
reservationItem hasValue ?item,
price hasValue ?reservationPrice,
customer hasValue ?passenger,
payment hasValue ?creditcard]
memberOf tr#reservation and
?price memberOf tr#price) .

effect
definedBy
?creditCard[po#balance hasValue ?finalBalance] and
(?finalBalance = (?initialBalance - ?price)).

SESA Tutorial
38 Seoul, 10 - 14 September
2007

22
Choreography & Orchestration

Choreography = how to interact with the service to


consume its functionality
Orchestration = how service functionality is achieved
by aggregating other Web Services
When the service is When the service
requested requests

Date, Time
Date
Hotel
Hotel Service
Time

Error
Flight, Hotel
VTA
Date, Time
Error Service

Confirmation Flight
Flight Service
Error

SESA Tutorial
39 Seoul, 10 - 14 September
2007

Choreography Interface

interface for consuming Web Service

External Visible Behavior


those aspects of the workflow of a Web Service where Interaction is
required
described by workflow constructs: sequence, split, loop, parallel
Communication Structure
messages sent and received
their order (communicative behavior for service consumption)
Grounding
executable communication technology for interaction
choreography related errors (e.g. input wrong, message timeout, etc.)
Formal Model
reasoning on Web Service interfaces (service interoperability)
semantically enabled mediation on Web Service interfaces

SESA Tutorial
40 Seoul, 10 - 14 September
2007

23
Orchestration

interface for interaction with aggregated Web Services

Web Service Business Logic


State in Orchestration
Control Flow
1
WS Data Flow
Service Interaction

3
2

WS - decomposition of service
4 functionality
- other Web services
consumed via their
choreography interfaces

SESA Tutorial
41 Seoul, 10 - 14 September
2007

Ontologized Abstract State Machines

Description
Vocabulary:
ontology constructs used in service interface description
usage for information interchange: in, out, shared, controlled
States:
a stable status in the information space
defined by attribute values of ontology instances
Guarded Transition:
state transition
general structure: if (condition) then (update)
condition on current state, update = changes in state transition
all GT() whose condition is fulfilled fire in parallel

Usage:
partners A, B commence interaction with empty A, B
A, B are updated via Guarded Transitions in each state
interaction termination state when A, B have no further transition rules

SESA Tutorial
42 Seoul, 10 - 14 September
2007

24
Example Hotel Web Service

choreography interface (state signature)


interface htl#BookHotelInterface
choreography
stateSignature
importsOntology htl#simpleHotelOntology
in
htl#HotelRequest withGrounding _"http://...",
htl#HotelConfirm withGrounding _"http://...",
htl#HotelCancel withGrounding _"http://..."
out
htl#HotelNotAvailable withGrounding _"http://...",
htl#HotelOffer withGrounding _"http://..."
shared
htl#Hotel,
htl#HotelAvailable,
htl#HotelBooked

SESA Tutorial
43 Seoul, 10 - 14 September
2007

Example Hotel Web Service

choreography interface (transition rules)


ctl_state {htl#start,htl#offerMade,htl#noAvail,htl#confirmed,htl#cancelled}
transitionRules
if (ctl_state = htl#start) then
forall {?req,?date,?loc,?client} with
?req[trv#date hasValue ?date, trv#location hasValue ?loc,
htl#client hasValue ?client] memberOf htl#HotelRequest
do
add(htl#offer(?req)[trv#date hasValue ?date,
trv#hotelName hasValue ?name, trv#location hasValue ?loc,
htl#client hasValue ?client] memberOf htl#HotelOffer)
ctl_state := htl#offerMade
|
add(htl#notAvailable(?req)[trv#date hasValue ?date,
trv#location hasValue ?loc] memberOf htl#HotelNotAvailable)
ctl_state := htl#noAvail
endForall
endIf
SESA Tutorial
44 Seoul, 10 - 14 September
2007

25
The Web Service Modeling Ontology

Objectives that a client wants to


achieve by using Web Services

Semantic description of
Formally specified Web Services:
terminology used
by all other - Capability (functional)
components - Interfaces (usage)

Connectors between components


with mediation facilities for handling
heterogeneities

SESA Tutorial
45 Seoul, 10 - 14 September
2007

WSMO Goals

formal description of client objective


problem that a client wants to achieve by using WS
abstracting from technical details

purpose
1. facilitate problem-oriented WS usage
2. dynamic WS usage
central client side element for SESA

WSMO 1.2 Goal description:


requested capability (WHAT)
requested choreography (restrictions on comm. behavior)
requested orchestration (= goal decomposition)

SESA Tutorial
46 Seoul, 10 - 14 September
2007

26
Goal Model (Proposed Revision)

SESA Tutorial
47 Seoul, 10 - 14 September
2007

WSMO Goals

Client-Side Service-Side

Goal Template service detection


generic objective description functional
(Web) Service
behavioral

Client instantiates
Implementation
defines Goal Instance (not of interest here)
concrete input
service usage

Ontology Ontology Domain Knowledge Ontology Ontology

SESA Tutorial
48 Seoul, 10 - 14 September
2007

27
Basic Goal

Goal WG Mediator
DB
client interface
Ticketing
buy train ticket in Germany
- origion: o, destination: d
- date-time: dt
design time

instantiates
runtime

goal instance with inputs: executes


o = Munich, d = Berlin
dt = 20070319-1030

defines

Client
SESA Tutorial
49 Seoul, 10 - 14 September
2007

Composite Goal

Flight-hotel booking with desired workflow


Goal
Capability
Flight Request Interface (Chor.) Orch.
1) get request Flight WS ..
2) provide offer
if hotel = flight.outwardArrival 3) receive selection
= hotel.arrival 4) send confirmation

flight information
Hotel Request Capability

if flight = Interface (Chor.) Orch.


1) get request Hotel WS ..
2) provide offer
Book Flight hotel information 3) receive selection
4) send confirmation

Book Hotel

SESA Tutorial
50 Seoul, 10 - 14 September
2007

28
The Web Service Modeling Ontology

Objectives that a client wants to


achieve by using Web Services

Semantic description of
Formally specified Web Services:
terminology used
by all other - Capability (functional)
components - Interfaces (usage)

Connectors between components


with mediation facilities for handling
heterogeneities

SESA Tutorial
51 Seoul, 10 - 14 September
2007

Mediation

Heterogeneity
mismatches on structural / semantic / conceptual / level
occur between different components that shall interoperate
especially in distributed & open environments like the Internet
Concept of Mediation (Wiederhold, 94):
Mediators as components that resolve mismatches
declarative approach:
semantic description of resources
intelligent mechanisms resolve mismatches independent of
content
mediation cannot be fully automated (integration decision)
Levels of Mediation in WSMO:
Representation: heterogeneous Languages & Protocols
Data Level: heterogeneous Data Sources
Functional Level: heterogeneous Functionalities
Process Level: heterogeneous Communication Processes
SESA Tutorial
52 Seoul, 10 - 14 September
2007

29
Mediator Structure

Source
Mediator
Component
1 Target
1 .. n (1) has Mediation Definition Component
(2) uses Mediation Service
Source
Component

- indirectly (via a Goal)


- directly
Specification layer
Execution layer

Mediation
Services

SESA Tutorial
53 Seoul, 10 - 14 September
2007

WSMO Mediators Overview

data level
mediation terminology representation & protocol

1 .. n 1 ..n
1 .. n 1 G GG Mediator G
O O/G/
OO Mediator WS / M

-Relation
Mediation

1 1 ..n 1 .. n 1 ..n
WS WW Mediator WS G xor WS WG Mediator WS xor G

-Relation Process Level Process Level -Relation Process Level


Mediation (Communication) (Cooperation) Mediation (Communication)

Legend
technique used imports / reuses correlation

SESA Tutorial
54 Seoul, 10 - 14 September
2007

30
Central SESA Techniques

Michael Stollberg
SESA Tutorial
55
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

SESA Process

if: successful
GOAL
else:
submission not solvable
matchmaking
else: try other WS uses R with all WS
Discoverer
if: composition possible
Data if: usable
Mediator
Selection & uses Composer
Ranking
Service
Repository
Process uses Behavioral composition
Mediator Conformance (executable)

if: compatible
information lookup
for particular service
Executor
if: execution
error

SESA Tutorial
56 Seoul, 10 - 14 September
2007

31
Techniques

Discovery
find candidate WS to solve a Goal
Selection & Ranking
select best candidate / determine a priority list
Composition
combine several WS to solve a Goal
Behavioral Compatibility
ensure that interaction can take place
Mediation
resolve & handle possibly occurring heterogeneities
Execution
automatically invoke & consume WS to solve a Goal

SESA Tutorial
57 Seoul, 10 - 14 September
2007

Web Service Discovery

detect directly usable Web services


out of available ones

Techniques:
Key Word Matching
Attainable Accuracy

match natural language key words in resource


Ease of provision

descriptions
Controlled Vocabulary
ontology-based key word matching
Semantic Matchmaking
what Semantic Web Services aim at

SESA Tutorial
58 Seoul, 10 - 14 September
2007

32
Semantic Matchmaking

=G = WS
Exact Match:
G, WS, O, M x. (G(x) <=> WS(x) )
PlugIn Match:
G, WS, O, M x. (G(x) => WS(x) )
Subsumption Match:
G, WS, O, M x. (G(x) <= WS(x) )

Intersection Match:
G, WS, O, M x. (G(x) WS(x) )
Non Match: X

G, WS, O, M x. (G(x) WS(x) )

Keller, U.; Lara, R.; Polleres, A. (Eds): WSMO Web Service Discovery. WSML Working Draft D5.1, 12 Nov 2004.

SESA Tutorial
59 Seoul, 10 - 14 September
2007

Selection & Ranking

Selection
determine best candidate out of discovered WS
Ranking
determine a priority list of discovered WS

after functional discovery


Criteria:
Quality of Service (security, robustness, availability)
context (regional, business / social communities)
preferences and policies
financial

SESA Tutorial
60 Seoul, 10 - 14 September
2007

33
Web Service Composition

combine several Web services


Procedure:
for solving a request
directly usable WS
(discovery)?
applied if no directly usable Web service exists yes
to solve a goal no

Types of Composition Techniques: composition (functional)


(1) functional: sequence of WS a) b) no
(2) behavioral: interaction in composition is abort
possible composition
skeleton

Integrated Web Service Composition : composition (behavioral)


1. skeleton by functional composition no
2. refinement + executable code by behavioral yes
abort
composition
executable composition

SESA Tutorial
61 Seoul, 10 - 14 September
2007

Behavioral Compatibility

determine whether partners can interact successfully

internal internal
business logic business logic
CLIENT WS
(not of interest in Service (not of interest in Service
Interface Description) Interface Description)

a valid choreography exists if


1) Signature Compatibility
homogeneous ontologies
compatible in- and outputs
2) Behavior Compatibility
start state for interaction
a termination state can be reached without any additional input

SESA Tutorial
62 Seoul, 10 - 14 September
2007

34
Behavior Compatibility Example

Goal Behavior Interface VTA Behavior Interface


G() = {}
VTA() = {}
if then request Start
if request then offer
G(1) = {request(out)}
VTA(1) =
if cnd1(offer) then changeReq 1(C) {request(in), offer(out)}
G(2a) = if changeReq then offer
2(C)
{offer(in), changeReq(out)} VTA(2a) =
if cnd2(offer) then order 3(C) {changeReq(in),offer(out)}
G(2b) = if order then conf
4(C)
{offer(in), order(out)} VTA(2b) =
if conf then Termination {order(in), conf(out)}
G(3) = {offer(in), conf(in)}

valid choreography existent

SESA Tutorial
63 Seoul, 10 - 14 September
2007

Orchestration Validation Example

VTA Web Service Orchestration Flight WS Behavior Interface

if then (FWS, flightRequest) Start if request then offer


(VTA, FWS)
if order then confirmation
if flightOffer
Termination
then (HWS, hotelRequest) (VTA, FWS)

Hotel WS Behavior Interface


if selection Start
(VTA, HWS)
then (FWS, flightBookingOrder) if request then offer
Termination if order then confirmation
if selection, flightBookingConf (VTA, HWS)
then (HWS, hotelBookingOrder)

SESA Tutorial
64 Seoul, 10 - 14 September
2007

35
Mediation

Heterogeneity as inherent characteristic of the Web:


heterogeneous terminology
heterogeneous languages / formalisms
heterogeneous functionalities
heterogeneous communication protocols and business
processes

WSMO identifies Mediators as top level element


levels of mediation: data, functional, protocol, processes
WSMO Mediator types

Approach: declarative, generic mismatch resolution


classification of possible & resolvable mismatches
mediation definition language & mediation patterns
execution environment for mediation definitions

SESA Tutorial
65 Seoul, 10 - 14 September
2007

Data Mediation Techniques

Ontology Integration Techniques

Ontology Mapping Ontology Alignment Ontology Merging

Mapping Ontology A is made


Rules compatible to ontology B

semi-automatic
human intervention needed for integration decision
graphical support for ontology mapping as central technique

SESA Tutorial
66 Seoul, 10 - 14 September
2007

36
Mapping Language Example

Ontology O1 Ontology O2

Person
Human - name
- name - age

michael memberOf Person


Adult Child - name = Michael Stollberg
- age = 28

classMapping(unidirectional o2:Person o1.Adult


attributeValueCondition(o2.Person.age >= 18))

this allows to transform the instance michael of concept person in


ontology O2 into a valid instance of concept adult in ontology O1

SESA Tutorial
67 Seoul, 10 - 14 September
2007

Process Level Mediation

not a priori compatible behavior interfaces for


communication & information interchange
A E
Business Business
Partner1 B B Partner2

C C, D
D A

partially resolvable by process mediation patterns

SESA Tutorial
68 Seoul, 10 - 14 September
2007

37
Patterns for Resolvable Mismatches

SESA Tutorial
69 Seoul, 10 - 14 September
2007

Process Mediation Example

Processes Mediator origin


itinerary[origin, S
R destination
destination, date] E
E
itinerary[origin, R
Q
time destination] V
U
I
E
date C
S price
itinerary [route, E
T
date, time, price]

can resolve about 80 % of process level mismatches

SESA Tutorial
70 Seoul, 10 - 14 September
2007

38
Automated Web Service Execution

Interaction Execution
(semantic) (via grounding)

Web

Communication

WWW (SOAP)

WSDL
Service

Space
Client Web Service Web Service
Interface Interface Interface
(semantic) (semantic) (syntactic)

SESA Tutorial
71 Seoul, 10 - 14 September
2007

Other SWS Approaches

Michael Stollberg
SESA Tutorial
72
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

39
OWL-S

Upper Ontology for Web Service Descriptions


capability description (IOPE)
non-functional properties
usage: (1) WS advertisement, (2) WS
request formulation

specification of service access information


builds upon WSDL to define message structure and
physical binding layer
specifies communication protocols & language,
transport mechanisms, etc.

describes internal processes of the service


defines service interaction protocol for (a) consumption and (b) WS
interaction
process types: simple, atomic, composite
specifies: (1) abstract messages (ontological content), (2) control
flow constructs, (3) perform construct

SESA Tutorial
73 Seoul, 10 - 14 September
2007

OWL-S and WSMO

OWL-S = ontology and language to describe Web services


WSMO = ontology and language for core elements of
Semantic Web Service systems

Main Description Elements Correlation:

OWL-S Profile WSMO capability +


non-functional properties

OWL-S Process Model WSMO Service Interfaces

OWL-S Grounding current WSMO Grounding


Goals and Mediators not in scope
deficiencies in Service Model (process description model / language not
adequate) => SWSF

SESA Tutorial
74 Seoul, 10 - 14 September
2007

40
OWL and WSML

OWL Full WSML Full

full RDF(S) support First Order Logic

WSML Rule
OWL DL WSML DL

Description Logics WSML Flight


Description Logics
Logic Programming
OWL Lite subset
WSML Core

WSML aims at overcoming deficiencies of OWL

SESA Tutorial
75 Seoul, 10 - 14 September
2007

SWSF

Process Model for Web Services (FLOWS)


although self-contained, commonly understood as extension of
OWL-S / refinement of Service Model

SESA Tutorial
76 Seoul, 10 - 14 September
2007

41
WSDL-S

Semantic annotation of WSDL descriptions


1. annotate XML Schema with domain ontology
<xs:element name="processPOResponse type="xs:string
wssem:modelReference="POOntology#OrderConfirmation"/>

2. pre-conditions & effects for operations


<interface name="PurchaseOrder">
<operation name="processPurchaseOrder pattern=wsdl:in-out>
<input messageLabel=processPORequest element="tns:processPORequest"/>
<output messageLabel="processPOResponse element="processPOResponse"/>
<wssem:precondition name=AccExistsPrecond wssem:modelReference=onto#AccountExists">
<wssem:effect name="ItemReservedEffect wssem:modelReference=onto#ItemReserved"/>
</operation>
</interface>

3. WS categorization by ontology-based keywords


<wssem:category name= "Electronics"
taxonomyURI="http://www.naics.com/" taxonomyCode="443112" />

SESA Tutorial
77 Seoul, 10 - 14 September
2007

SAWSDL

Semantic Annotation for WSDL

Similar to WSDL-S:
semantic annotation of XML-Schema
semantic annotation of WSDL (interface & operations)

but more limited:


agnostic to ontology languages
references only to concepts

W3C Recommendation 28 August 2007


SESA Tutorial
78 Seoul, 10 - 14 September
2007

42
Commonalities & Differences

similar ontological structure for WS descriptions


Functional Descriptions (preconditions & effects)
Behavioral Descriptions (consumption and interaction)
Grounding to WSDL (automated execution)

central conceptual differences


formal models for capabilities
interfaces vs. business process
behavioral aspects:
state-based process models operation-level capabilities

WSMO defines core elements for SESA while all others are
only concerned with describing Web Services

SESA Tutorial
79 Seoul, 10 - 14 September
2007

Outlook Day 2:
WSML Language & Reasoning

Michael Stollberg
SESA Tutorial
80
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

43
The WSML Language

specification language for WSMO elements


ontology language with 5 varaints

WSML Full
WSML Rule WSML DL
WSML Core
RDF (S)
XML
Unicode URI

W3C Semantic Web Language Layer Cake WSML Language Family


revised version, Tim-Berners-Lee 2005
SESA Tutorial
81 Seoul, 10 - 14 September
2007

WSML Layering

SESA Tutorial
82 Seoul, 10 - 14 September
2007

44
WSML Reasoning Framework (API)

Result
Reasoning Task
(Variable Bindings)

WSML Reasoner Interface

Normalization Steps

Facades

WSML Full (FOL)


WSML DL WSML DL
WSML Flight WSML Rule WSML Flight

Theorem
Pellet KAON2 MINS IRIS
Prover

SESA Tutorial
83 Seoul, 10 - 14 September
2007

WSMO4J an API for WSMO

Discovery Composition Mediation Executor

WSMO4J (API)
1. WSMO data model (OGWM)
2. Getter & Setter Methods
3. WSML Parser & Serializer

WSML2Reasoner Resource Manager

Reasoner

SESA Tutorial
84 Seoul, 10 - 14 September
2007

45
Outlook Day 3:
The WSMX System
(WSMO Reference Implementation)

Michael Stollberg
SESA Tutorial
85
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

WSMX

WSMX - The Web Service Execution Environment


A Service Oriented Architecture
Reference implementation of SESA and WSMO
open source (LGPL): http://sourceforge.net/projects/wsmx/

SESA Tutorial
86 Seoul, 10 - 14 September
2007

46
Event-based Implementation

SESA Tutorial
87 Seoul, 10 - 14 September
2007

WSMX Architecture
Data and Communication Protocols Adapters
Adapter 1

System Interface
Adapter 2
...
Adapter n

SESA Tutorial
88 Seoul, 10 - 14 September
2007

47
WSMX Functionalities

Achieve a goal
parse goal
WS detection (all necessary functional components)
invoke WS

Get Web Services


find WS with respect to certain properties
for WS repository management

Get a Web Service


ranking / selection for get the best
non-functional aspects

Invoke a Web Service


grounding to WSDL
WS execution via SOAP

SESA Tutorial
89 Seoul, 10 - 14 September
2007

WSMT Developer Toolkit

SESA Tutorial
90 Seoul, 10 - 14 September
2007

48
Other WSMO Tools

WSMO Studio (DERI & OntoText)


form-based WSMO editing
integrated reasoners & repository
extensions, e.g. BPMO

WSML Validator
syntax validtor for WSML
Web Interface
provided as Web service

Ontology Technology
WSML Ontology Management Suite (DOME, OMS)
Data Mediator (stand-alone)

all open source (LGPL licence)


SESA Tutorial
91 Seoul, 10 - 14 September
2007

References

Michael Stollberg
SESA Tutorial
92
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

49
Book

SESA Tutorial
93 Seoul, 10 - 14 September
2007

References WSMO

The central location where WSMO work and papers can be found is
WSMO Working Group: http://www.wsmo.org

WSMO languages WSML Working Group: http://www.wsml.org

WSMO implementation
WSMX working group : http://www.wsmx.org
WSMX open source can be found at:
https://sourceforge.net/projects/wsmx/

SESA Tutorial
94
SUPER Seoul, 10 - 14 September
Semantic BPM Tutorial,
2007 ESWC 2007, Innsbruck, Austria, June 2007 94
03.09.2007

50
References Foundations

[Alonso et al., 2004] Alonso, G., Casati, F., Kuno, H., and Machiraju, V. (2004). Web Services: Concepts,
Architectures and Applications. Data-Centric Systems and Applications. Springer, Berlin, Heidelberg.

[Berners-Lee, 1999] Berners-Lee, T. (1999). Weaving the Web. Harper, San Francisco, USA.

[Berners-Lee et al., 2001] Berners-Lee, T., Hendler, J., and Lassila, O. (2001). The Semantic Web. Scientific
American, 284(5):34-43.

[Bussler, 2003] Bussler, C. (2003). B2B Integration: Concepts and Architecture. Springer, Berlin, Heidelberg.

[Fensel, 2003] Fensel, D. (2003). Ontologies: A Silver Bullet for Knowledge Management and E-Commerce.
Springer, Berlin, Heidelberg, 2 edition.

[Fensel et al., 2006] Fensel, D. et al: Enabling Semantic Web Services. The Web Service Modeling Ontology
WSMO. Springer, Berlin, Heidelberg, 2006.

[Gomz-Prez et al., 2003] Gomz-Prez, A., Corcho, O., and Fernandez-Lopez, M. (2003). Ontological
Engineering. With Examples from the Areas of Knowledge Management, E-Commerce and Semantic Web.
Series of Advanced Information and Knowledge Processing. Springer, Berlin, Heidelberg.

[Gruber, 1993] Gruber, T. R. (1993). A translation approach to portable ontology specifications. Knowledge
Acquisition, 5:199-220.

SESA Tutorial
95
SUPER Seoul, 10 - 14 September
Semantic BPM Tutorial,
2007 ESWC 2007, Innsbruck, Austria, June 2007 95
03.09.2007

References Semantic Web Services

[de Bruijn et al., 2006] de Bruijn, J., Fensel, D., Lausen, H., Polleres, A., Roman, D., and Stollberg, M. (2006).
Enabling Semantic Web Services. The Web Service Modeling Ontology. Springer.

[Fensel and Bussler, 2002] Fensel, D. and Bussler, C. (2002). The Web Service Modeling Framework WSMF.
Electronic Commerce Research and Applications, 1(2).

[McIlraith et al., 2001] McIlraith, S., Cao Son, T., and Zeng, H. (2001). Semantic Web Services. IEEE Intelligent
Systems, Special Issue on the Semantic Web, 16(2):46-53.

[Preist, 2004] Preist, C. (2004). A Conceptual Architecture for Semantic Web Services. In Proc. of the Int.
Semantic Web Conf. (ISWC 2004).

[Roman et al., 2005] Roman, D., Keller, U., Lausen, H., de Bruijn, J., Lara, R., Stollberg, M., Polleres, A., Feier,
C., Bussler, C., and Fensel, D. (2005). Web Service Modeling Ontology. Applied Ontology, 1(1):77-106.

[Stollberg et al., 2006] Stollberg, M., Feier, C., Roman, D., and Fensel, D. (2006). Semantic Web Services -
Concepts and Technology. In Ide, N., Cristea, D., and Tufis, D. (editors), Language Technology, Ontologies,
and the Semantic Web. Kluwer Publishers.

[Sycara et al. 2003] Katia Sycara, Massimo Paolucci, Anupriya Ankolekar and Naveen Srinivasan, "Automated
Discovery, Interaction and Composition of Semantic Web services," Journal of Web Semantics, Volume 1,
Issue 1, September 2003, pp. 27-46

SESA Tutorial
96
SUPER Seoul, 10 - 14 September
Semantic BPM Tutorial,
2007 ESWC 2007, Innsbruck, Austria, June 2007 96
03.09.2007

51
References SWS: W3C Submissions

OWL-S
[Martin, 2004] Martin, D. (2004). OWL-S: Semantic Markup for Web Services. W3C Member Submission 22
November 2004. online: http://www.w3.org/Submission/OWL-S/.

WSMO [see also www.wsmo.org]


[Lausen et al., 2005] Lausen, H., Polleres, A., and Roman (eds.), D. (2005). Web Service Modeling Ontology
(WSMO). W3C Member Submission 3 June 2005. online: http://www.w3.org/Submission/WSMO/.

SWSF
[Battle et al., 2005] Battle, S., Bernstein, A., Boley, H., Grosof, B., Gruninger, M., Hull, R., Kifer, M., D., M., S., M.,
McGuinness, D., Su, J., and Tabet, S. (2005). Semantic Web Services Framework (SWSF). W3C Member
Submission 9 September 2005. online: http://www.w3.org/Submission/SWSF/.

WSDL-S
[Akkiraju et al., 2005] Akkiraju, R., Farrell, J., Miller, J., Nagarajan, M., Schmidt, M.- T., Sheth, A., and Verma, K.
(2005). Web Service Semantics - WSDL-S. W3C Member Submission 7 November 2005. online:
http://www.w3.org/Submission/WSDL-S/.

SESA Tutorial
97
SUPER Seoul, 10 - 14 September
Semantic BPM Tutorial,
2007 ESWC 2007, Innsbruck, Austria, June 2007 97
03.09.2007

References Discovery

Stollberg, M. Stollberg, M.; Keller, U.; Lausen, H. and Heymans, S.: Two-phase Web Service Discovery based on
Rich Functional Descriptions. In Proc. of the 4th European Semantic Web Conference (ESWC 2007),
Innsbruck, Austria.

B. Benatallah, M. Hacid, C. Rey, F. Toumani Towards Semantic Reasoning for Web Services Discovery,. In Proc.
of the International Semantic Web Conference (ISWC 2003), 2003

Herzog, R.; Lausen, H.; Roman, D.; Zugmann, P.: WSMO Registry. WSMO Working Draft D10 v0.1, 26 April
2004.

Keller, U.; Lara, R.; Polleres, A. (Eds): WSMO Web Service Discovery. WSML Working Draft D5.1, 12 Nov 2004.

Keller, U.; Lara, R.; Lausen, H.; Polleres, A.; Fensel, D.: Automatic Location of Services. In Proc. of the 2nd
European Semantic Web Symposium (ESWS2005), Heraklion, Crete, 2005.

M. Kifer, R. Lara, A. Polleres, C. Zhao, U. Keller, H. Lausen and D. Fensel: A Logical Framework for Web Service
Discovery. Proc. 1st. Intl. Workshop SWS'2004 at ISWC 2004,Hiroshima, Japan, November 8, 2004, CEUR
Workshop Proceedings, ISSN 1613-0073

Lara, R., Lausen, H.; Toma, I.: (Eds): WSMX Discovery. WSMX Working Draft D10 v0.2, 07 March 2005.

Lei Li and Ian Horrocks. A software framework for matchmaking based on semantic web technology. In Proc. of
the Twelfth International World Wide Web Conference (WWW 2003), 2003.

SESA Tutorial
98
SUPER Seoul, 10 - 14 September
Semantic BPM Tutorial,
2007 ESWC 2007, Innsbruck, Austria, June 2007 98
03.09.2007

52
References Discovery

Lei Li and Ian Horrocks. A software framework for matchmaking based on semantic web technology. In Proc. of
the Twelfth International World Wide Web Conference (WWW 2003), 2003

Daniel J. Mandell and Sheila A. McIlraith. Adapting BPEL4WS for the Semantic Web: The Bottom-Up Approach to
Web Service Interoperation. In Proceedings of the Second International Semantic Web Conference
(ISWC2003),

Massimo Paolucci, Takahiro Kawamura, Terry R. Payne, Katia Sycara; Importing the Semantic Web in UDDI. In
Proceedings of Web Services, E-business and Semantic Web Workshop, 2002

Massimo Paolucci, Takahiro Kawamura, Terry R. Payne, Katia Sycara; "Semantic Matching of Web Services
Capabilities." In Proceedings of the 1st International Semantic Web Conference (ISWC2002), 2002

Preist, C.: A Conceptual Architecture for Semantic Web Services. In Proceedings of the 3rd International Semantic
Web Conference (ISWC 2004), 2004, pp. 395 - 409.

Stollberg, M.; Keller, U.; Fensel. D.: Partner and Service Discovery for Collaboration on the Semantic Web. Proc.
3rd Intl. Conference on Web Services (ICWS 2005), Orlando, Florida, July 2005.

SESA Tutorial
99
SUPER Seoul, 10 - 14 September
Semantic BPM Tutorial,
2007 ESWC 2007, Innsbruck, Austria, June 2007 99
03.09.2007

References Composition

[Berardi et al., 2003] Berardi, D., Calvanese, D., Giacomo, G. D., Lenzerini, M., and Mecella, M. (2003). Automatic
Composition of e-Services that Export their Behavior. In Proc. of First Int. Conference on Service Oriented
Computing (ICSOC).

[Martens, 2003] Martens, A. (2003). On Compatibility of Web Services. Petri Net Newletter, 65:12-20.

[Sirin et al., 2004] Sirin, E., Parsia, B., Wu, D., Hendler, J., and Nau, D. (2004). HTN Planning for Web Service
Composition Using SHOP2. Journal of Web Semantics, 1(4):377-396.

[Pistore and Traverso, 2006] Pistore, M. and Traverso, P. (2006). Theoretical Integration of Discovery and
Composition. Deliverable D2.4.6, Knowledge Web.

[Stollberg, 2005] Stollberg, M. (2005). Reasoning Tasks and Mediation on Choreography and Orchestration in
WSMO. In Proceedings of the 2nd International WSMO Implementation Workshop (WIW 2005), Innsbruck,
Austria.

[Traverso and Pistore, 2004] Traverso, P. and Pistore, M. (2004). Automatic Composition of Semantic Web
Services into Executable Processes. In Proc. 3rd International Semantic Web Conference (ISWC 2004),
Hiroshima, Japan.

SESA Tutorial
100
SUPER Seoul, 10 - 14 September
Semantic BPM Tutorial,
2007 ESWC 2007, Innsbruck, Austria, June 2007 100
03.09.2007

53
References Composition

[Cimpian and Mocan, 2005] Cimpian, E. and Mocan, A. (2005). WSMX Process Mediation Based on
Choreographies. In Proceedings of the 1st International Workshop on Web Service Choreography and
Orchestration for Business Process Management at the BPM 2005, Nancy, France.

[Mocan (ed.), 2005] Mocan (ed.), A. (2005). WSMX Data Mediation. WSMX Working Draft D13.3. available at:
http://www.wsmo.org/TR/d13/d13.3/v0.2/.

[Mocan et al., 2005] Mocan, A., Cimpian, E., Stollberg, M., Scharffe, F., and Scicluna, J. (2005). WSMO
Mediators. WSMO deliverable D29 nal draft 21 Dec 2005. available at: http://www.wsmo.org/TR/d29/.

[Scharffe and de Bruijn, 2005] Scharffe, F. and de Bruijn, J. (2005). A language to specify mappings between
ontologies. In Proc. of the Internet Based Systems IEEE Conference (SITIS05).

[Stollberg et al., 2006] Stollberg, M., Cimpian, E., Mocan, A., and Fensel, D. (2006). A Semantic Web Mediation
Architecture. In Proceedings of the 1st Canadian Semantic Web Working Symposium (CSWWS 2006),
Quebec, Canada.

[Wiederhold, 1994] Wiederhold, G. (1994). Mediators in the Architecture of the Future Information Systems.
Computer, 25(3):38-49.

SESA Tutorial
101
SUPER Seoul, 10 - 14 September
Semantic BPM Tutorial,
2007 ESWC 2007, Innsbruck, Austria, June 2007 101
03.09.2007

References Mediation

[Cimpian and Mocan, 2005] Cimpian, E. and Mocan, A. (2005). WSMX Process Mediation Based on
Choreographies. In Proceedings of the 1st International Workshop on Web Service Choreography and
Orchestration for Business Process Management at the BPM 2005, Nancy, France.

[Mocan (ed.), 2005] Mocan (ed.), A. (2005). WSMX Data Mediation. WSMX Working Draft D13.3. available at:
http://www.wsmo.org/TR/d13/d13.3/v0.2/.

[Mocan et al., 2005] Mocan, A., Cimpian, E., Stollberg, M., Scharffe, F., and Scicluna, J. (2005). WSMO
Mediators. WSMO deliverable D29 nal draft 21 Dec 2005. available at: http://www.wsmo.org/TR/d29/.

[Scharffe and de Bruijn, 2005] Scharffe, F. and de Bruijn, J. (2005). A language to specify mappings between
ontologies. In Proc. of the Internet Based Systems IEEE Conference (SITIS05).

[Stollberg et al., 2006] Stollberg, M., Cimpian, E., Mocan, A., and Fensel, D. (2006). A Semantic Web Mediation
Architecture. In Proceedings of the 1st Canadian Semantic Web Working Symposium (CSWWS 2006),
Quebec, Canada.

[Wiederhold, 1994] Wiederhold, G. (1994). Mediators in the Architecture of the Future Information Systems.
Computer, 25(3):38-49.

SESA Tutorial
102 Seoul, 10 - 14 September
Semantic BPM Tutorial,
2007 ESWC 2007, Innsbruck, Austria, June 2007

54
Acknowledgements

The WSMO working groups are funded by the European


Commission under the projects DIP, Knowledge Web,
SEKT, SWWS, ASG, and SUPER; by Science Foundation
Ireland under the DERI-Lion project; and by the Vienna city
government under the FIT-IT Programme in the projects
RW2 and TSC.

We dedicate thanks to all the members of the WSMO, WSML,


and WSMX working groups for their advice and input into this
tutorial.

SESA Tutorial
103 Seoul, 10 - 14 September
2007

55
Logics and Reasoning - SESA Tutorial

Darko Anicic
darko.anicic@deri.org

Digital Enterprise Research Institute (DERI)


Leopold-Franzens Universitt
Innsbruck, Austria

Seoul September 10-13, 2007

Introduction
Ontologies and Reasoning
Ontology Languages & WSML Agenda
IRIS Reasoner
Hands-on Session

Logics and Reasoning

Agenda for day 2nd: Logics and Reasoning


1 Ontologies and Reasoning
2 The WSML Language
3 IRIS Reasoner
4 Hands-on Session

DERI

56
Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction
Ontologies and Reasoning
Ontology Languages & WSML Introduction
IRIS Reasoner
Hands-on Session

Ontology Denition

Figure: Ontology Denition DERI

Darko Anicic SESA Tutorial - Logics and Reasoning

Introduction
Ontologies and Reasoning
Ontology Languages & WSML Introduction
IRIS Reasoner
Hands-on Session

Ontology Example

DERI

57
Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction
Ontologies and Reasoning
Ontology Languages & WSML Introduction
IRIS Reasoner
Hands-on Session

Reasoning

Reasoning is an act of deriving a conclusion from certain


premises.
The process of inferring implicit knowledge about some
domain of discourse from a given (formal) knowledge of
that domain.
Reasoning is a critical success factor for Semantic Web
applications.
Reasoning problems: satisfiability, model finding,
deduction... 58
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction
Ontologies and Reasoning
Ontology Languages & WSML Introduction
IRIS Reasoner
Hands-on Session

Practical Reasons
Given key role of ontologies in e-Science and Semantic Web, it is essential to
provide tools and services to help users:
Design and maintain high quality ontologies, e.g.:
Meaningful - all named classes can have instances
Correct - captured intuitions of domain experts
Minimally redundant - no unintended synonyms
Richly axiomatised - (sufficiently) detailed descriptions
Store (large numbers) of instances of ontology classes, e.g.:
Annotations from web pages (or gene product data)
Answer queries over ontology classes and instances, e.g.:
Find more general/specific classes
Retrieve annotations/pages matching a given description59
Integrate and align multiple ontologies DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Ontology Languages
Requirements:
- Expressivity
knowledge representation and ontology theory support
Dimensions to Consider: Open vs. Closed World
Semantics, Classical vs. Default neg, performance etc.
- Reasoning support
sound (unambiguous, decidable)
support reasoners / inference engines (query answering,
classification, logical ent., consistency check...)
Semantic Web languages:
- Web compatibility 60
- Existing W3C Recommendations: XML, RDF, OWL DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Layer Cake 2005

Figure: Tim Berners Lee, International Semantic Web Conference,61


2005 DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Simplified Stack (from a logicians point of view)

62
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Open-World Assumption vs. Closed-World


Assumption
Logic Programming

hasFather(peter,john)
hasFather(john,michael)
grandchild(x)hasFather(x,y), hasFather(y,z),
Person(x).
Every person is a grandchild is not deducible due to closed
domain of interpretation!
Domain bounded to known objects: peter is a grandchild.
63
No tree model property required
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Open-World Assumption vs. Closed-World


Assumption
Description Logic
Person(peter ) Peter is a person.
Person v father.Person Each person has a father
who is a person.
father.( father.Person) v Grandchild Things having a father of
a father who is a person are
grandchildren.
Every person is a grandchild is deducible due to open
domain of interpretation!
hasAunt(x,y) hasParent(x,z),
hasSibling(z,y), Female(y) 64
Arbitrary rule is not possible to express due to the need for
DERI

tree model property


Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Classical vs. Default Negation


Default Negation(i.e., negation as failure)

Rules:
male(x) :- father(x).
female(x) :- person(x), male(x).
grandchild(x)hasFather(x,y), hasFather(y,z),
Person(x).

Facts:
person(joe), person(bill), father(joe)

Value Computation:
65
male(joe)
DERI
female(bill)
Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Classical vs. Default Negation

Classical Negation

Rules:
male(x) :- father(x).
female(x) :- person(x), male(x).
grandchild(x)hasFather(x,y), hasFather(y,z),
Person(x).

Facts:
person(joe), person(bill), father(joe)

Value Computation: 66
male(joe) DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Basic Model of RDF (S)


RDF triples:

A model is a set of statements


Statement := (predicate,subject,object)
Predicate is a resource
Subject is a resource
67
Object is either a resource or a literal
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

RDF(S) - Core Classes and Properties


RDFS CLASS represents the generic concept of a type or category and
can be defined to represent almost everything, e.g. Web pages, people,
document types...
RDFS PROPERTY represents the subset of RDFS resources that are
properties
RDFS SubClassOf defines a subset or superset relation between
classes. This property is transitive!
RDFS SubPropertyOf is used to indicate that one property is a
specialization of another property
RDFS RANGE is used to define that the values of a property are
instances of one or more stated classes
RDFS DOMAIN is used to state that any resource that has a given 68
property is an instance of one or more classes DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

RDF(S) - Schema Example

69
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

RDF(S) - Summary

Simple Triple Data Model


Basic Ontology Modeling Primitives
URIs for Identification
RDFS too weak to describe resources in sufficient detail
No localised range and domain constraints
No existence/cardinality constraints
No transitive, inverse or symmetrical properties
Difficult to provide reasoning support (No "native"
reasoners for non-standard semantics)
70
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

OWL - DL based ontology language

DLs are a family of logic based KR formalisms


DLs - languages mainly characterised by:
Set of constructors for building complex concepts and roles
from simpler ones
Set of axioms for asserting facts about concepts, roles and
individuals
DL is a monotonic Logic
This is due to the open world assumption.
71
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

OWL - Language

Three species of OWL[3]


OWL full is union of OWL syntax and RDF
OWL DL restricted to DL fragment (1/4 DAML+OIL)
OWL Lite is "simpler" subset of OWL DL
Semantic layering
OWL DL based on OWL full within DL fragment
OWL DL based on SHOIN (D) Description Logic
OWL DL benefits from many years of DL research
Well defined semantics
Formal properties well understood (complexity, decidability)
Known reasoning algorithms 72
Implemented systems (highly optimized) DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

DL Concept and Role Constructors

Range of other constructors found in DLs, including:


Number restrictions (cardinality constraints) on roles, e.g.,
>3 hasChild
Qualified number restrictions, e.g., >2 hasChild.Female
Nominals (singleton concepts), e.g., Korea
Concrete domains (datatypes), e.g., hasAge.(21)
Inverse roles, e.g., hasChildp (hasParent)
Transitive roles, e.g., locatedIn
Role composition, e.g., hasParent o hasBrother (uncle) 73
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

OWL Class Constructors

74
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

OWL as DL: Axioms

Axioms (mostly) reducible to inclusion (v): 75


C D iff both C v D and D v C DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

OWL - Inference Tasks

Knowledge is correct (captures intuitions)


Does C subsume D w.r.t. ontology O? (in every model I
of O, C I D I )
Knowledge is minimally redundant (no unintended
synonyms)
Is C equivalent to D w.r.t. O? (in every model I of O, C I
= DI )
Knowledge is meaningful (classes can have instances)
Is C satisfiable w.r.t. O? (there exists some model I of O,
s.t. C I 6= )
76
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

OWL - Inference Tasks (2)

Querying knowledge
Is x an instance of C w.r.t. O? (in every model I of O, x I
CI )
Is <x,y> an instance of R w.r.t. O? (in every model I of O,
(x I , y I ) R I )
Knowledge base consistency
A KB K is consistent iff there exists some model I of K
All inference tasks reducible to KB satisfiability or concept
satisfiability w.r.t. a KB
77
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

OWL DL Architecture

78
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

First Order Logic - Basic Facts

In opposition to DLs and HLs it provides significant more


flexibility in writing down required axioms.
This language is not easy to support in terms of scalable
reasoning service
Many interesting theorems can be proven and the theorem
prover community has made significant progress over the
last years.
First order language could define the common umbrella,
where DLs and HLs are sublanguages and unified.
79
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Web Service Modeling Language (WSML)

1 Aims to provide a language (or a set of interoperable


languages) for representing the elements of WSMO:
Ontologies, Web services, Goals, Mediators

2 WSML provides a formal language for the conceptual


elements of WSMO, based on:
Description Logics
Logic Programming
First-Order Logic
F-Logic
80
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Rationale of WSML

1 Provide a Web Service Modeling Language based on the


WSMO conceptual model
Concrete syntax
Semantics
2 Provide a Rule Language for the Semantic Web
3 Many current Semantic Web languages have
undesirable computational properties
unintuitive conceptual modeling features
inappropriate language layering
81
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Variants of WSML

82
Figure: Variants of WSML
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Syntaxes for WSML


Human-readable syntax:
- Modular syntax
WSMO-syntax functions as "umbrella"
Modules for different WSML variants with clear layering
- Syntax:
Inspired by OIL/OWL and F-Logic
Conceptual syntax
Logical Expression Syntax
- Semantics is fixed in WSML variants
XML syntax
- provides syntax transport layer
RDF syntax 83
- provides basic relational language and simple ontological DERI

primitives
Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Syntaxes for WSML

84
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

WSML- Example

85
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

WSML Logical Expressions

Frame and first order based concrete syntax


Elements:
Function symbols (e.g. f())
Molecules (e.g. Human subClassOf Animal, John
memberOf Human, John[name hasValue "John Smith"]).
Predicates (e.g. distance(?x,?y,?z))
Logical connectives (or, and, not, implies, equivalent,
impliedBy, forall, exists)
Example: axiom WomanDefinition
definedBy ?x memberOf Woman equivalent
?x memberOf Female and ?x memberOf Human.86
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

WSML-Core
Intersection of Description Logics and Horn Logic:
description logic programs
Features:
classes
attributes
binary relations
instances
classes and relation hierarchies
datatype and datatype predicates
Compatible with OWL
Some limitations in conceptual modeling of Ontologies:
no cardinality constraints
87
only "inferring" range of attributes
DERI
no meta-modeling
Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Example WSML-Core

88
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Example WSML-Core (2)

89
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

WSML-DL
Extension of WSML-Core capturing the Description Logic SHIQ(D)
entailment is decidable
close to DL species of Web Ontology Language OWL
many efficient subsumption reasoners (FaCT++, Pellet,
Racer)
Some limitations in conceptual modeling of Ontologies:
no cardinality constraints
only "inferring" range of attributes
no meta-modeling
Limitations in logical expressions: -From Logic Programming
point-of-view, there is a lack of:
n-ary predicates 90
chaining variables over predicates
DERI
(default) negation
Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

WSML-Flight

Extension of WSML-Core, equivalent to Datalog with


inequality and (stratified) default negation
Features:
powerful rule-based language (n-ary predicates allowed)
meta-modeling
constraints
nonmonotonic negation (conclusions can be retracted at
later points of time)
Query answering supported by WSML2Reasoner and
underlying Datalog reasoner 91
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

Example WSML-Flight

92
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

WSML-Rule

Extension of WSML-Flight in the direction of Logic


Programming
Features:
function symbols
unsafe rules
Query answering is undecidable

93
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Ontology Languages
Ontologies and Reasoning RDF (S)
Ontology Languages & WSML OWL
IRIS Reasoner First Order Logic
Hands-on Session WSML

WSML-Full

WSML-Full unifies WSML-DL and WSML-Rule under a


First-Order umbrella
Very expressive
Query answering is undecidable
Specification of WSML-Full is now in progress

94
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Mission

WSML Goal
Efficient and extensible reasoning engine for expressive
rule-based languages: WSML Core/Flight/Rule.

Research Goal
Framework consisting of a collection of components which
cover various aspects of reasoning with formally represented
knowledge. Development of effective optimization algorithms as
well as memory and storage management strategies for
reasoning with large data sets. 95
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Mission

WSML Goal
Efficient and extensible reasoning engine for expressive
rule-based languages: WSML Core/Flight/Rule.

Research Goal
Framework consisting of a collection of components which
cover various aspects of reasoning with formally represented
knowledge. Development of effective optimization algorithms as
well as memory and storage management strategies for
reasoning with large data sets. 96
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Research Methodology

WSML Core/Flight Reasoner


Datalog extended with locally stratified negation.

1 Full Datalog support


2 Support for (stratifed) default negation
3 Built-in predicates
4 Integrity constraints (for checking datatypes)
97
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Architecture

98
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Integration of IRIS with WSML

99
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Query-Sub-Query Recursive Framework

1 Top-down, direct evaluation [1].


2 Avoid the calculation of tuples that are not used for deriving
answer.
3 Begin with constants in a query "pushing" them from goals
to subgoals.
4 Use "sideways information passing" to pass constant
binding information from one atom to the next in subgoals.

100
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Adornments

Consider the rule:


rsg(X,Y) :- up(X,X1 ), rsg(Y1 ,X1 ), down(Y1 ,Y).

Suppose that a subquery involving rsg bf is invoked (e.g.


rsg(a,Y)):

rsg bf (X,Y) :- up(X,X1 ), rsg fb (Y1 ,X1 ), down(Y1 ,Y).


rsg fb (X,Y) :- up(X,X1 ), rsg fb (Y1 ,X1 ), down(Y1 ,Y).

101
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Supplementary Relations

Goal: to store information during intermediate stages of


evaluation.

Consider the rule:


rsg bf (X,Y) :- up(X,X1 ), rsg fb (Y1 ,X1 ), down(Y1 ,Y).

Supplementary relations, for head adorned by rsg bf , are:


sup0 [X]
sup1 [X,X1 ]
sup2 [X,Y1 ]
sup3 [X,Y] 102
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

QSQR Evaluation - Example


rsg(X,Y) :- flat(X,Y).
rsg(X,Y) :- up(X,X1 ), rsg(Y1 ,X1 ), down(Y1 ,Y).
?- rsg(a,Y).

103
DERI
Figure: Program
Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

QSQR Evaluation - Example

104
DERI

Figure: QSQR evaluation


Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Magic Sets

Bottom-up technique whose efficiency rivals with top-down


approaches [1, 2].
Given a query, the magic set rewriting method generates a
modified program in order to take advantage of bound
variables from the query.
A bottom-up evaluation procedure is used to evaluate the
new program (e.g., seminaive evaluation).
The bottom-up evaluation produces only the set of facts
produced by the top-down approaches such as QSQ. 105
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Relational Algebra and Logical Rules

Relational algebra
Compute relations for logical rules and evaluate them using
relational algebra operations [4].
Relational algebra expressions:
1 Take given relations as arguments and produce relations
as results;
2 Can be combined to form complex expressions;
3 Can be efficiently evaluated using RDBMS.
106
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Computing the Relations

Input: Datalog rules


q(X,Y) :- p(X,b) & X=Y.
q(X,Y) :- p(X,Z) & s(Z,Y).

Output: Relational algebra expressions


X (Z =b (P(X,Z)))
X =Y (X (Z =b (P(X,Z))) Y (P(Y,W)))

Q(X,Y)=X =Y (X (Z =b (P(X,Z))) Y (P(Y,W)))


X ,Y (P(X,Z) ./ S(Z,Y))
107
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Rectification

Non-rectified rules:
q(a,X,Y) :- r(X,Y).
q(X,Y,X) :- r(Y,X).

Making heads equal:


q(U,V,W) :- r(X,Y) & U=a & V=X & W=Y.
q(U,V,W) :- r(Y,X) & U=X & V=Y & W=X.

Rectified rules:
q(U,V,W) :- r(V,W) & U=a.
q(U,V,W) :- r(V,U) & W=U. 108
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Semi-Naive Algorithm
Computes the least fixed point of the equations to which it is
applied, with respect to the given EDB relations [5]:

for i := 1 to m do
Pi := ;
repeat
for i := 1 to m do
Qi := Pi ; //save old values
for i := 1 to m do
Pi := EVAL(pi , R1 ,...,Rk ,Q1 ,...,Qm );
until Pi = Qi for all i, 1im;
109
output Pi s
DERI

Figure: Naive SESA


Darko Anicic
evaluation
Tutorial - Logics and Reasoning
Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Algorithm
Computes the least fixed point based on incremental relations
for the IDB predicates [5]:
for i := 1 to m do
Pi := EVAL(pi , R1 ,...,,...,);
Pi := Pi ;
end;
repeat
for i := 1 to m do
Qi := Pi ; //save old Ps
for i := 1 to m do begin
Pi := EVAL-INCR(pi ,R1 ,...,Rk ,P1 ,...,Pm ,Q1 ,Qm );
Pi := Pi - Pi // Removes "new" tuples that actually appeared before
end
for i := 1 to m do
Pi := Pi Pi ; 110
until Pi = for all i; output Pi s
DERI

Figure: Semi-Naive
Darko Anicic
evaluation
SESA Tutorial - Logics and Reasoning
Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Negation

Consider the rules:


p(X) :- r(X) & q(X).
q(X) :- r(X) & p(X).

For R={1} the least fixed point is not unique:


S1 : P=1, Q=
S2 : Q=1, P=

IRIS supports safe, stratified rules! Algorithms for checking


safeness and stratification are implemented.
111
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning


Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Handling Negation

Consider the rule:


trueCousin(X,Y) :- cousin(X,Y) & sibling(X,Y).

The rule may be evaluated as:


C(X,Y)  S (X,Y)

DOM - union of the symbols appearing in the EDB relations


and in the rules themselves.
DOM DOM - S(X,Y)

In general for s(X1 ,...,Xn ):


DOM ... DOM (n times) - S
DERI

Darko Anicic SESA Tutorial - Logics and Reasoning

Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

The IRIS Roadmap

1 Query optimization
2 Performance and scalability
3 Storage management
4 Support for function symbols
5 Wellfounded semantics implementation

DERI

112
Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Combining Reasoning with Search

1 Goal: Provide an infrastructure that scales for realistic


semantic computing applications
2 What: A plugable & distributed infrastructure for
Web-reasoning and search
3 Project: LarCK
4 Like: Search for Extraterrestrial Intelligence (SETI),
Folding@Home and Google techniques for large scale
parallelized computing

DERI

Darko Anicic SESA Tutorial - Logics and Reasoning

Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

IRIS Code Access

IRIS is an open source project developed under LGPL and


available at:

http://sourceforge.net/projects/iris-reasoner

DERI

113
Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Serge Abiteboul, Richard Hull, and Victor Vianu.


Foundations of Databases.
Addison-Wesley, 1995.
Y. Chen.
Magic sets and stratied databases.
Int. Journal of Intelligent Systems, 12(3):203231, 1997.
Ian Horrocks and Alan Rector.
The semantic web: Ontologies and owl.
Jeffrey D. Ullman.
Principles of Database and Knowledge-Base Systems,
Volume I.
Computer Science Press, 1988.
Jeffrey D. Ullman. DERI

Darko Anicic SESA Tutorial - Logics and Reasoning

Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Principles of Database and Knowledge-Base Systems,


Volume II.
Computer Science Press, 1989.

DERI

114
Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction Introduction
Ontologies and Reasoning Evaluation Techniques
Ontology Languages & WSML The Magic-Sets
IRIS Reasoner The Bottom-Up Evaluation in IRIS
Hands-on Session

Thank you!
Questions, comments, suggestions please...

DERI

Darko Anicic SESA Tutorial - Logics and Reasoning

Introduction
Ontologies and Reasoning
Ontology Languages & WSML
IRIS Reasoner
Hands-on Session

Examples Using WSMT

1 Set up WSMT;
2 Browsing ontologies using WSMT GUI
3 Editing ontologies using WSML Text Editor
4 Execute a query;

DERI

115
Darko Anicic SESA Tutorial - Logics and Reasoning
Introduction
Ontologies and Reasoning
Ontology Languages & WSML
IRIS Reasoner
Hands-on Session

Examples Using Java API

1 Set up required WSMO4J factories;


2 Parse and load an ontology (written in WSML) in the
reasoner;
3 Create a query;
4 Execute a query;
5 Print the loaded ontology and results after the query
execution.

DERI

Darko Anicic SESA Tutorial - Logics and Reasoning

116
SESA Tutorial

WSMO Reasoning Hands-on session

10-13 September 2007, Seoul, Korea.

www.deri.at www.wsmo.org/wsml

Prepared by: Darko Anicic, DERI Innsbruck, Austria.

117
1. Installations and Configurations

1.1. System Requirements

In order to run the software JDK 6 is required. For your convenience, the CD
includes the installation file in the handson-day2\Software\Software
Requirements\Java folder.
Additionally it is necessary to set the JAVA_HOME environment variable to
point to the folder where the JDK 6 is installed. This variable can be setup in
the System Properties (tip: right-click on My Computer and select properties)
under the Advanced tab, see Figure 1.

Figure 1. Environment Setup

1.2. WSMT Configuration:

Step 1. Copy and uncompress the archive wsmt-1.4-gpl.zip and add it to


your hard drive (say c:\wsmt); the archive is available in the folder handson-
day2\Software\WSMT on the tutorial CD.

Step 2. Go to c:\wsmt and run wsmt.exe

118
1.3. WSML2Reasoner Configuration:

Step 1. Create a project called wsml2reasoner (From "File" menu select


"New", select "Project...", select " Java Project", click "Next >", enter the
project name wsml2reasoner, and click "Finish").

Step 2. Select wsml2reasoner in "Package Explorer". Now from the "File"


menu select "Import...", select "File System", click "Next >" and browse to
the wsml2reasoner folder (on the CD) in the "From directory:" field (the
parent folder of the one containing the two java files)

You should see the dialog box:

119
Check the wsml2reasoner folder in the left panel as it is shown on the picture
and press finish.

120
2. Browsing and Editing Ontologies using WSMT

After the WSMT is started, on the left side of WSMT GUI, the Navigator
view shows all the projects in your workspace. For this tutorial session, the
WSMT contains a few examples (i.e. the WSMO Ontologies, Web Services and
Goals) that can be use for better understanding of the WSMT functionality.

There is couple of different editors for viewing and manipulating WSMO


descriptions in the WSMO Studio (some of them come from the Web Services
Modeling Toolkit). These are the WSML Visualizer and the WSML Text
Editor, the WSMO Editor Launcher, and standard Plain Text editor.

The WSML Visualizer provides a graphical representation of the information


contained within a WSML document, using a directed graph. The visualization
provided in this editor is fully interactive and allows the user to edit the
WSMO Ontology, Web Service, Goal or Mediator being visualized. We will
take a look first at some existing ontologies.
Step 1. Go to Examples project by clicking the plus on the left hand side of
the folder icon.

Step 2. Right click on the-simpsons-ontology.wsml in the navigator view;


choose Open With-> WSML Visualizer

In the visualizer you will see the blue node at the centre that represents the
ontology contained within this WSML file. The other nodes in the
representation are concepts (yellow) and instances (red). The graph is
automatically layed-out using a spring layout algorithm; however, the
representation is fully interactive and by clicking on a node and dragging it
the representation can be moved to obtain the best layout.

Step 3. Manipulate the graph using the dragging feature to get the best
representation. If you do similar actions for the Simpsons ontology, you will
notice the clustering feature which nicely groups similar entities making the
whole graph much more readable.

Step 4. The visualizer separates the complexities in the ontology into


multiple levels, in order to start manipulating the attributes of a concept we
need to step down to the concept semantic level. We do this by double
clicking on a concept.

The WSML Text Editor shows the contents of a WSML document, in the
WSML human readable syntax to the user with syntax highlighting, content
assistance and many other features that help advanced users who are
familiar with WSML to create and manage their WSML documents more
efficiently.

121
Step 1. Open the-simpsons-ontology.wsml with WSML Text Editor (right
click on the file and select Open with). Look into the structure of the files, all
keywords are highlighted. This editor comes with the auto-completion feature
which will suggest possible entries (press ctrl+space for suggestions).

Step 2. Open queries.txt with WSML Text Editor (right click on the file
and select Open with) where you can find a number of predefined queries for
the-simpsons-ontology.wsml.

Step 3. To find all the students and the principle of the school they attend,
copy a query no.1 from the file (or any other query you want to execute),
select the-simpsons-ontology.wsml in WSML Text Editor and paste it into
WSML-Reasoner View.

Step 4. Press Execute query button on the right-hand side of the WSML-
Reasoner View. You should see the following results:

122
3. Reasoning Examples Using Java API
(Creation and Execution)

In this section we will guide you through creation of an example which


demonstrates functionality of the reasoning service offered by IRIS and
WSML2Reasoner framework. More precisely, the example shows how to use
the WSML2Reasoner and WSMO4J API in order to:
Set up required WSMO4J factories;
Parse and load an ontology (written in WSML) in the reasoner;
Create a query;
Execute a query;
Print the loaded ontology and results after the query execution.

Step 1. Create a java class in the sesa_workshop package (in the test folder
of the wsml2reasoner project) which will be used to implement all steps
required for using the reasoning services in WSML2Reasoner framework with
IRIS reasoner. The code from steps 2-10 (below) should be placed in this
class.

Step 2. Create and set up required WSMO4J factories (used to create WSMO
entities/objects such as: ontologies, logical expressions, terms of different
data types etc.). The following code sequence creates required factories:

private LogicalExpressionFactory leFactory = null;


private WSMO4JManager wsmoManager = null;
private Parser wsmlparser = null;

/**
* Sets up factories for creating WSML elements
*/
private void setUpFactories() {
wsmoManager = new WSMO4JManager();
leFactory = wsmoManager.getLogicalExpressionFactory();
wsmlparser = Factory.createParser(null);
}

Step 2. The next step parses and loads an ontology to the reasoner. Once
the ontology is parsed, WSML2Reasoner creates WSMO4J representation of
the ontology and applies number of transformation and optimization steps.
Such ontology is stored in main memory of the entire system and is ready to
be used by IRIS for reasoning. Add the following code to load and parse an
ontology:

/**
* Utility Method to get the object model of a wsml ontology.
*
* @param ontologyFile
* location of source file (It will be attemted to be loaded from
* current class path)
* @return object model of ontology at file location

123
*/
private Ontology parseAndLoadOntology(String ontologyFile)
throws IOException, ParserException, InvalidModelException {
InputStream is = this.getClass().getClassLoader().getResourceAsStream(
ontologyFile);
try {
final TopEntity[] identifiable = wsmlparser
.parse(new InputStreamReader(is));
if (identifiable.length > 0 && identifiable[0] instanceof Ontology) {
System.out.println("Ontology parsed");
return (Ontology) identifiable[0];
} else {
System.out.println("First Element of file no ontology ");
return null;
}

} catch (Exception e) {
System.out.println("Unable to parse ontology: " +e.getMessage());
return null;
}
}

Step 3. In this step, a user may optionally print out the loaded ontology on
the console. Add the following java code to print an ontology out:

/**
* Prints out an ontology written in WSML
*
* @param o
* Ontology to be printed out
*/
private void printOntology(Ontology o) {
// Set up serializer
Serializer ontologySerializer = org.wsmo.factory.Factory
.createSerializer(null);
System.out.println("WSML Ontology:\n");
StringWriter sw = new StringWriter();
try {
ontologySerializer.serialize(new TopEntity[] { o }, sw);
} catch (IOException e) {
System.out.println("Unable to serialize ontology! ");
e.printStackTrace();
}
System.out.println(sw.toString());
System.out.println("--------------\n\n");
}

Step 4. WSML2Reasoner allows to use all the different inference engines


defined in the framework. Therefore a user needs to register a particular
reasoner which will be used for particular reasoning task. Apart from this, the
framework allows for an extended configuration of a number of different
parameters (see WSML2Reasoner API for further information on the
configuration). The following java code creates the IRIS reasoner, as an
underling engine to be used within the framework:

124
/**
* Get a reasoner
* @return Reasoner
*/
private WSMLReasoner getReasoner() {
Map<String, Object> params = new HashMap<String, Object>();
params.put(WSMLReasonerFactory.PARAM_BUILT_IN_REASONER,
WSMLReasonerFactory.BuiltInReasoner.IRIS);

WSMLReasoner reasoner = DefaultWSMLReasonerFactory.getFactory()


.createWSMLFlightReasoner(params);
return reasoner;
}
Step 5. In this step we need to register the loaded ontology within the
created reasoner. If the ontology is already registered, the framework will
only update the ontology content.

// Register ontology
reasoner.registerOntology(o);

Step 6. Once the framework is configured (i.e. an ontology is loaded and a


reasoner is created), a user may pose a query to be answered over the
ontology. The following method implements basic functionality for answering
a query in WSML2Reasoner framework:

/**
* Executes a query.
* @param reasoner
* Reasoner which will execute the query
* @param o
* Ontology over which the query will be answered
* @param queryString
* WSML query represented as a string
* @return Result after the query evaluation
* @throws Exception
*/
private Set<Map<Variable, Term>> performQuery(WSMLReasoner reasoner,
Ontology o, String queryString) throws Exception {
LogicalExpression query = this.leFactory.createLogicalExpression(
queryString, o);
// Executes query request
Set<Map<Variable, Term>> result = reasoner.executeQuery((IRI) o
.getIdentifier(), query);

return result;
}

Step 7. When the reasoner computes result of a query (see previous step),
this result is represented as a map of terms bound with corresponding
variables. The map contains as many variables as a user set in the query. In
order to see computed results in console, the user may print them out using
the following code sequence:

/**

125
* Utility method to print out the query result
* @param result
* The query result
* @param o
* Ontology from which the result has been derived.
*/
private void printOutResult(Set<Map<Variable, Term>> result, Ontology
o) {
for (Map<Variable, Term> vBinding : result) {
for (Variable var : vBinding.keySet()) {
System.out.print(var + ": "
+ termToString(vBinding.get(var), o) + "\t ");
}
System.out.println();
}
System.out.println("Number of Results: " + result.size());
}

The above java code uses the following utility method for conversion of
WSMO4J representation of term to a string:

/**
* Utility method to convert a term to string.
* @param t
* Term to be converted to string.
* @param o
* Ontology which is the source of the term
* @return String representation of the term.
*/
private String termToString(Term t, Ontology o) {
VisitorSerializeWSMLTerms v = new VisitorSerializeWSMLTerms(o);
t.accept(v);
return v.getSerializedObject();
}

Step 8. In this step we will create a method for the overall program
execution. The method demonstrates the order (chronology) in which the
code created through steps 2-7 should be used.

/**
* This method demonstrates all steps required for answering a query
* using WSML2Reasoner framework and IRIS.
*
* @param ontologyLocation
* Location of Ontology
* @param query
* Query to be answered.
* @throws Exception
*/
public void runProgram(String ontologyLocation, String query)
throws Exception {
long t0_start = System.currentTimeMillis();

// set up WSMO4J factories


setUpFactories();

126
// Parse and load ontology
Ontology o = parseAndLoadOntology(ontologyLocation);

// Print ontology
printOntology(o);

WSMLReasoner reasoner = getReasoner();


// Register ontology
reasoner.registerOntology(o);

// Execute query request


System.out.println("Query: " + query);
Set<Map<Variable, Term>> result = performQuery(reasoner, o,
query);

// print out the results:


printOutResult(result, o);

// Measure the time of execution


long t0_end = System.currentTimeMillis();
long t0 = t0_end - t0_start;
System.out.println("(" + t0 + "ms)");
System.out.println("Finished!");
}

Step 9. With the following method, we provide a few predefined queries to


be used in the Simpson and Nobel ontology respectively:

/**
* The method offers queries to be used with the nobel.wsml ontology.
*
* @param queryNo
* Number of a query to be executed
* @return WSML query represented as string
* @throws Exception
*/
private static String createQuery(int queryNo) throws Exception {
ontLoc = "examples/the-simpsons-ontology.wsml";
//ontLoc = "examples/nobel.wsml";

String queryString = null;

// Choose a query:
switch (queryNo) {
case 1:
// To find all the students and the principle of the
// school they
// attend:
queryString = "?child[attends hasValue ?school] and
?principle[principleOf hasValue ?school]";
break;
case 2:
// To find out who is the reverant of the church that
// each character
// attends:

127
queryString = "?worshiper[worshipsAt hasValue
?church] and ?reverant[reverantOf hasValue ?church]";
break;
case 3:
// To find all the characters that Dan Castellanata
// does the voices
// for on the simpsons:
queryString = "?character[hasActor hasValue
dan_castellanata]";
break;
case 4:
// To find all actors who play characters of the
// opposite sex:
queryString = "?actor[hasGender hasValue
?actorgender] memberOf actor and ?character[hasGender
hasValue ?charactergender] memberOf character and
?character[hasActor hasValue ?actor] and ?actorgender
!= ?charactergender";
break;

// Queries related to the Nobel ontology: change


// ontLoc to ontLoc =
// "sesa_workshop/nobel.wsml";

case 5:
// Retrieve all things that are memberOf some other
// things:
queryString = "?x memberOf ?y";
break;
case 6:
// Retrieve all subjects (research areas) for which
// the Nobel prize
// is awarded:
queryString = "?x memberOf nobel_prize";
break;
case 7:
// Retrieve a list of countries that Nobel prize
// winners come from:
queryString = "?x memberOf country";
break;
case 8:
// Retrieve IDs of Nobel prize winners from South
// Korea:
queryString = "?winner[hasCountry hasValue
South_Korea]";
break;
case 9:
// Retrieve names of Nobel prize winners from South
// Korea:
queryString = "?winner[hasCountry hasValue
South_Korea] and ?winner[hasName hasValue
?winnerName]";
break;
case 10:
// Retrieve all Nobel prize winners who got the prize
// after 1950:

128
queryString = "?winners[hasYear hasValue ?year] and
?year > 1950";
break;
case 11:
// Retrieve all names of Nobel prize winners who are
// from South
// Korea and got the prize after 1950:
queryString = "?winner[hasName hasValue ?winnerName]
and "
+ "?winner[hasCountry hasValue South_Korea] and "
+ "?winner[hasYear hasValue ?year] and ?year >
1950.";
break;
case 12:
// Retrieve all names of Nobel prize winners who got
// the prize after
// 1950:
queryString = "?winner[hasName hasValue ?winnerName]
and " + "?winner[hasYear hasValue ?year] and ?year >
1950.";
break;
default:
throw new IllegalArgumentException(
"Please specify query number between 1 and
12!");
}
return queryString;
}

Step 10. Finally a user may call the program execution from the main
method of a java class using the code below. Particularly for this example,
the code sequence will call a query with the order number 3, execute this
query and print results out.

/**
* Query execution
* @param args
* none expected
*/
public static void main(String[] args) {
Test1 ex = new Test1();

try {
String query = createQuery(3);
ex.runProgram(ontLoc, query);
System.exit(0);
} catch (Throwable e) {
e.printStackTrace();
}
}

--- END ---

129
Leopold Franzens
Universitt Innsbruck

Day 3: Semantically Enabled Service


Oriented Architectures (SESA)

Omair Shafiq
Digital Enterprise Research Institute (DERI)
Innsbruck, Austria.

Review computer science in InnsbruckSESA Tutorial,


Seoul, 10-14 September 2007.
Copyright 2007 DERI Innsbruck www.deri.at making semantics rea l.

Agenda

Introduction to SESA

Web Service Execution Environment (WSMX)


Technical Insights

Web Service Modeling Toolkit (WSMT)

Triple Space Computing (TSC)


TSC and WSMX

WSMX and WSMT Demo

Hands-on Session
Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
2 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

130
Semantic Execution Environment SEE
Mission

The technology of Semantic Web Services (SWS)


envisions:
Easy access to various systems
Seamless integration of heterogeneous entities
Ad-hoc cooperation between various business parties
Dynamic collaborations on the Web

SEE Vision:
Provide guidelines, justifications and implementation
directions for an execution environment for Semantic Web
Services

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
3 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Semantic Execution Environment SEE


Objectives

Goals:
Provide a WSMO testbed
Demonstrate the viability of using WSMO as a means to
achieve dynamic inter-operation of Web services

SEE Mission:
Create an execution environment capable of managing all
the aspects related to semantically enhanced Web
services, to enable their discovery, selection, mediation and
execution

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
4 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

131
Analogy - traditional software architecture versus
SOA

Traditional
Traditional approach
approach Service-Oriented
Service-Oriented
to
to software
software architecture
architecture Architecture
Architecture
Separate Specialist model Service-Oriented model

Mechanic does job


himself or asks other
mechanics to take care
In garage every of tasks he is not
mechanic capable to do
specialize only in
one type of car so it
does not matter You ask any
what you want to mechanic in a
repair you always garage to repair
have to wait for a your car
mechanic who model of your
knows your type of car does not
car; if he/she is sick matter
or on holiday you
cannot repair your
car at all

No Agility to repair your car even for trivial tasks Agility to repair cars quickly (next available
A Process that is duplicative and inefficient mechanic takes care)
Costly to operate and maintain keep many people A Process that is efficient
Cost effective to operate and maintain

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
5 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Why SOA?

In recent years, the decoupling of interface from


implementation at the programming level has become a
popular architectural approach
facilitates the creation of complex systems required by
today's business applications
interface of a service consumed by a service consumer is
loosely coupled with its implementation by a service
provider and the implementation is decoupled from its
binding.
this style has become the key characteristic of Service-
Oriented Architecture (SOA)
rather than the implementations, only the services provided
are published and consumers are insulated from the details
of the underlying implementation by a provider or broker.

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
6 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

132
SOA capabilities

As a flexible and extensible architectural framework, SOA has the


following unique capabilities:

Reduced cost. Provides the opportunity to consolidate redundant


application functionality and decouple functionality from obsolete and
increasingly costly applications while leveraging existing
investments.
Increased flexibility. Structures IT applications based on services in
such a way as to facilitate the rapid restructuring and reconfiguration
of the business processes and applications that consume them.
Increased revenue. Provides the opportunity to enter into new
markets and leverage existing business capabilities in new and
innovative ways using a set of loosely coupled IT services. Helps to
increase market share by offering new and better business services.
Added agility. Delivers business-aligned applications faster.
Increased consolidation. Integrates IT systems across siloed
applications and organizations.

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
7 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

SOA Reference Architecture

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
8 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

133
Message from the Future

In the year 2012 software has become a utility,


accessed like electrical power through a socket

How did this revolution happen and who were the


driving forces behind it?

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
9 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Major Objectives

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
10 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

134
Objective 1
Moving from Software to Serviceware

Abstracting from software:


All resources are services in a Service Oriented
Architecture

Users are only concerned with the services


and not with the software or hardware that
implements the service

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
11 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Objective 2
Moving from Syntax to Semantics

Add machine-processable semantics to bring


Services Oriented Architectures to their full
potential

Only with semantics can critical subtasks be


automated, leaving humans to focus on problem
solving

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
12 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

135
Central Hypothesis

Adding semantics to different layers of the SOA


will allow us to provide:

A worldwide networked economy, based on flexible


cooperation and outsourcing
A flexible service innovation and design (see
Research Manifesto for Services Science, CACM
49/7, July 2006)
A reduction of expensive IT maintenance and
enhancement of legacy solutions

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
13 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Scope of our Intervention

Service-oriented architectures will quickly become the


leading software paradigm
However, SOAs will not scale without significant
mechanization of
Service discovery, adaptation, negotiation, composition,
invocation, and monitoring; and
Data and process mediation
Therefore, machine processable semantics will need to be
added to bring SOAs to their full potential
We are faced with the challenge to move from
Software to serviceware and
From syntax to semantics

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
14 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

136
Leopold Franzens
Universitt Innsbruck

The Web Service Execution


Environment

WSMX

Review computer science in InnsbruckSESA Tutorial,


Seoul, 10-14 September 2007.
Copyright 2007 DERI Innsbruck www.deri.at making semantics rea l.

WSMX Introduction

Software framework for runtime binding of service


requesters and service providers
WSMX interprets service requesters goal to
discover matching services
select (if desired) the service that best fits
provide mediation (if required)
make the service invocation
Is based on the conceptual model provided by WSMO
Has a formal execution semantics
Service Oriented and event-based architecture
based on microkernel design using technologies as J2EE,
Hibernate, Spring, JMX, etc.

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
16 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

137
WSMX Motivation

Middleware glue for Semantic Web Services


Allow service providers focus on their business
Reference implementation for WSMO
Eat our own cake
Environment for goal based discovery and invocation
Run-time binding of service requester and provider
Provide a flexible Service Oriented Architecture
Add, update, remove components at run-time as needed
Keep open-source to encourage participation
Developers are free to use in their own code
Define formal execution semantics
Unambiguous model of system behaviour

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
17 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

WSMX Usage Scenario

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
18 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

138
WSMX Usage Scenario - P2P

A P2P network of WSMX nodes


Each WSMX node described as a SWS
Communication via WSML over SOAP
Distributed discovery first aim
Longer term aim - distributed execution environment
Internet Internet

Message Message
WSMX SWS
ARCHITECTURE
Peer Peer
Message Message

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
19 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

WSMX Usage Scenario - P2P

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
20 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

139
Design Principles

Strong Decoupling & Strong Mediation


autonomous components with mediators for interoperability

Interface vs. Implementation


distinguish interface (= description) from implementation
(=program)

Peer to Peer
interaction between equal partners (in terms of control)

WSMO Design Principles == WSMX Design Principles


== SOA Design Principles
Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
21 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Benefits of SOA

Better reuse
Build new functionality (new execution semantics) on top of
existing Business Services
Well defined interfaces
Manage changes without affecting the Core System
Easier Maintainability
Changes/Versions are not all-or-nothing
Better Flexibility

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
22 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

140
Service Oriented State

The interface to the service is implementation-


independent
The service can be dynamically invoked
Runtime binding
The service is self-contained
Maintains its own state

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
23 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Messaging

Messaging is peer-to-peer facility


Distributed communication
Loosely coupled
Sender does not need to know receiver (and vice
versa)
Asynchronous mechanism to communicate between
software applications

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
24 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

141
WSMX Architecture

Service
Service
Oriented
Oriented Messaging
Messaging
Architectures
Architectures

Application
Application
Management
Management

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
25 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Selected Components

Adapters
Parser
Invoker
Choreography
Process Mediator
Discovery
Data Mediator
Resource Manager
Reasoning
Vertical Services e.g. Security
Execution Management

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
26 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

142
Life cycle

1. Publishing Create & publish Web service description


2. Discovery Determine usable services for a request
3. Composition Combine services to achieve a goal
4. Selection Choose most appropriate service among the
available ones
5. Mediation Solve mismatches (data, protocol, process) that
hamper interoperation
6. Execution Invoke Web services following programmatic
conventions

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
27 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Adapters

To overcome data representation mismatches on the communication layer


Transforms the format of a received message into WSML compliant format
Based on mapping rules

Validator (Message, Protocol)


WSMX

Adapter Manager/Selector
Protocol Handler (Sync, Async)

Adapter Pool
Communication Manager
Security Manager

Inward Outward

UBL2WSML WSML2UBL
Listener

EDI2WSML WSML2EDI

RosettaNet2WSML WSML2RosettaNet

...2WSML WSML2 ...


...2WSML WSML2 ...
Application
Backend

...2WSML WSML2 ...

Metadata
Repository

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
28 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

143
Parser

WSML compliant parser


Code handed over to wsmo4j initiative
http://wsmo4j.sourceforge.net/
Validates WSML description files
Compiles WSML description into internal memory model
Stores WSML description persistently
(using Resource Manager)

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
29 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Communication Mgr Invoker

WSMX uses
The SOAP implementation from Apache AXIS
The Apache Web Service Invocation Framework (WSIF)
WSMO service descriptions are grounded to WSDL
Both RPC and Document style invocations possible
Input parameters for the Web Services are translated from
WSML to XML using an additional XML Converter component.

Network

SOAP
XML XML Web
Mediated Invoker
Apache
AXIS Service
WSML Data Converter

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
30 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

144
Choreography

Requester and provider have their own observable communication


patterns
Choreography part of WSMO
Choreography instances are loaded for the requester and provider
Both requester and provider have their own WSMO descriptions
Choreography Engine
Evaluation of transition rules - prepares the available data

Sends data to the Process Mediator - filters, changes or replaces data

Receives data from PM and forwards it to the Communication


manager - data to be finally sent to the communication partner

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
31 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Discovery

Responsible for finding appropriate Web Services to achieve a


goal (discovery)
Discovery component started with providing simple matching
Keywords identified in the NFP of the goal
Matched against NFPs of the published WSs
Variable set of NFPs to be considered for this process
Using Theorem Prover for Discovery
using Theorem Prover such as Vampir, SPASS or Paradox has the advantage
of enforcing less restriction during modeling and to support more reasoning
tasks compared to Logic Programming Systems
Discovery Ontology
allows more fine grained control over the behavior of the discovery engine
specifies that only matches are desired that do not deliver more objects as
specified in the goal
specifies that if no matches could be found that satisfy the desired logical
relationship, that also keyword based matches are accepted

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
32 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

145
Discovery

Keyword-/ Classification-based
retrieve Service Filtering
Descriptions
efficient narrowing
Controlled Vocabulary of search space
Filtering
(relevant services
Resource Repository to be inspected)
(UDDI or other)
Semantic
Matchmaking

invoke Web Service


usable Web Service

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
33 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Data Mediator

Ontology-to-ontology mediation
A set of mapping rules are defined and then executed
Initially rules are defined semi-automatic
Create for each source instance the target instance(s)

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
34 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

146
Design-time

Inputs
Source Ontology and Target Ontology
Features
Graphical interface
Set of mechanism towards semi-automatic creation of mappings
Capturing the semantic relationships identified in the process
Storing these mappings in a persistent storage
Output
Abstract representation of the mappings

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
35 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Design-time Phase

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
36 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

147
Design-time Phase - Approach, Decomposition and Mapping Context

Bottom-up -> training set


Top-down -> decomposition, context

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
37 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Run-Time Data Mediator

Main Mediation Scenario: Instance Transformation

Inputs
Incoming data
Source ontology instances
Features
Completely automatic process
Grounding of the abstract mappings to a concrete language
WSML
Uses a reasoner to evaluate the mapping rules
MINS

Outputs
Mediated data
Target ontology instances

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
38 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

148
Ontology Mapping Language

Language Neutral Mapping Language


mapping definitions on meta-layer (i.e. on generic ontological
constructs)
independent of ontology specification language
Grounding to specific languages for execution (WSML, OWL, F-
Logic)
Main Features:
Mapping Document (sources, mappings, mediation service)
direction of mapping (uni- / bidirectional)
conditions / logical expressions for data type mismatch handling,
restriction of mapping validity, and complex mapping definitions
mapping constructs (ex: classMapping, classAtrributeMapping,
instanceMapping)
mapping operators

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
39 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Mapping Language Example

Ontology O1 Ontology O2

Person
Human - name
- name - age

michael memberOf Person


Adult Child - name = Michael Stollberg
- age = 28

classMapping(unidirectional o2:Person o1.Adult


attributeValueCondition(o2.Person.age >= 18))

this allows to transform the instance michael of concept person in


ontology O2 into a valid instance of concept adult in ontology O1

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
40 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

149
Process Mediator

Requester and provider have their own communication patterns


Only if the two match precisely, a direct communication may take
place
At design time equivalences between the choreographies
conceptual descriptions is determined and stored as set of rules
The Process Mediator provides the means for runtime analyses
of two choreography instances and uses mediators to
compensate possible mismatches

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
41 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Process Mediator Addressed mismatches

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
42 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

150
Resource Manager

Stores internal memory model to a data store


Decouples storage mechanism from the rest of WSMX
Data model is compliant to WSMO API
Independent of any specific data store implementation i.e.
database and storage mechanism
Maintains six repositories to store
WSMO top level entities, i.e.
Goals
WS descriptions
Mediators
Ontologies
Event data and intermediate messages
WSDL descriptions

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
43 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Reasoner

WSMO4J
validation, serialization and parsing
WSML2Reasoner
Reasoning API
mapping fromWSML to a vendor-neutral rule
representation
Contains:
Common API for WSML Reasoners
Transformations of WSML to tool-specific input data
(query answering or instance retrieval)
WSML-DL-Reasoner
Features:
T-Box reasoning (provided by FaCT++)
Querying for all concepts
Querying for the equivalents, for the children, for the
descendants, for the parents and for all ancestors of a
given concept
Mins Testing the satisfiability of a given concept with respect to
the knowledge base
Datalog + Negation + Function
Symbols Reasoner Engine Subsumption test of two concepts with respect to the
knowledge base
Features
Wrapper of WSML-DL to the XML syntax of DL used in the
Built-in predicates DIG interface
Function symbols
Stratified negation

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
44 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

151
System Entry Points

achieveGoal (WSMLDocument): Context

getWebServices (WSMLDocument): Context

invokeWebService (WSMLDocument, Context): Context

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
45 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Define Business Process

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
46 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

152
Generate Wrappers for Components

Registry of known
components

Discovery Choreography
Wrapper Wrapper

Communication
Manager
Wrapper

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
47 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Context Data
PROCESS CONTEXT

Registry of known
components

Discovery Data Mediator Choreography


Wrapper Wrapper

Communication
Manager
Wrapper

Choreography object
Mediated objects ,
Web Services entities

Errors
Exceptions

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
48 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

153
Event-based Implementation

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
49 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Execution Semantics

WSMT Web Services Modelling Toolkit

WSMX Managment WSMX Monitor WSML Editor Choreography Editor Mediator Editor

Service WSMX Service


Administration Framework Interface
Requesters Providers
WSMX Manager
Data and Communication Protocols Adapters
Adapter 1

System Interface

WSMX Manager Core


Back-End CM RM Parser Discovery Selector DM PM Choreography
Application Wrapper Wrapper Wrapper Wrapper Wrapper Wrapper Wrapper Wrapper
Web
Service 1
Adapter 2

Agent Interface Interface Interface Interface Interface Interface Interface Interface


Web
acting on Service 2
behalf of Communication Resource Data Process
Parser Discovery Selector Choreography
service Manager Manager Mediator Mediator ...
requester Invoker Receiver Web
Service p
...

Grounding
Component
Wrapper
Resource Manager Interface Reasoner Interface
Adapter n

WSMO Objects Non WSMO Reasoner


Interface
Objects
New
Component

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
50 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

154
Leopold Franzens
Universitt Innsbruck

Web Service Modeling Toolkit

WSMT

Review computer science in InnsbruckSESA Tutorial,


Seoul, 10-14 September 2007.
Copyright 2007 DERI Innsbruck www.deri.at making semantics rea l.

Web Services Modeling Toolkit

The aim of the Web Services Modeling Toolkit


(WSMT) is to provide high-quality tools for
designing, mediating and using Semantic Web
Services, through the WSMO paradigm.

The focus is currently on the following areas:


Creation of ontologies, web services, goals and mediators in
WSMO
Creation of mappings between pairs of ontologies to allow
runtime instance transformation
Management of Execution Environments for Semantic Web
Services like WSMX and IRSIII

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
52 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

155
WSML Perspective

Perspectives in the Eclipse framework allow for a


number of Editors and views to be grouped and
positions.
The WSML perspective offers editors and views
related to engineering of semantic descriptions in
WSMO through the WSML language.
Other General features include:
WSML file validation
Problems view (errors and warnings on files in the
workspace)
Label highlighting (marking of errors and warnings in
navigator view)

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
53 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

WSML Perspective: Editors & Views

Editors
WSML Text Editor
WSML Conceptual Editor
WSML Visualizer

Views
Navigator view
Problems view
WSML Reasoner

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
54 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

156
WSML Perspective: Editors & Views

Editors
WSML Text Editor
WSML Conceptual Editor
WSML Visualizer

Views
Navigator view
Problems view
WSML Reasoner

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
55 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

WSML Perspective: Editors & Views

Editors
WSML Text Editor
WSML Conceptual Editor
WSML Visualizer

Views
Navigator view
Problems view
WSML Reasoner

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
56 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

157
WSML Perspective: Editors & Views

Editors
WSML Text Editor
WSML Conceptual Editor
WSML Visualizer

Views
Navigator view
Problems view
WSML Reasoner

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
57 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

WSML Perspective: Editors & Views

Editors
WSML Text Editor
WSML Conceptual Editor
WSML Visualizer

Views
Navigator view
Problems view
WSML Reasoner

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
58 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

158
WSML Perspective: Editors & Views

Editors
WSML Text Editor
WSML Conceptual Editor
WSML Visualizer

Views
Navigator view
Problems view
WSML Reasoner

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
59 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

WSML Perspective: Editors & Views

Editors
WSML Text Editor
WSML Conceptual Editor
WSML Visualizer

Views
Navigator view
Problems view
WSML Reasoner

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
60 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

159
Abstract Mapping Language: Editors & Views

Editors
AML Text Editor
AML Conceptual Editor
AML View Based Editor

Views
Concept 2 Concept View
Attribute 2 Attribute View
Concept 2 Attribute View
Attribute 2 Concept View
Status View

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
61 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Abstract Mapping Language: Editors & Views

Editors
AML Text Editor
AML Conceptual Editor
AML View Based Editor

Views
Concept 2 Concept View
Attribute 2 Attribute View
Concept 2 Attribute View
Attribute 2 Concept View
Status View

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
62 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

160
Abstract Mapping Language: Editors & Views

Editors
AML Text Editor
AML Conceptual Editor
AML View Based Editor

Views
Concept 2 Concept View
Attribute 2 Attribute View
Concept 2 Attribute View
Attribute 2 Concept View
Status View

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
63 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Abstract Mapping Language: Editors & Views

Editors
AML Text Editor
AML Conceptual Editor
AML View Based Editor

Views
Concept 2 Concept View
Attribute 2 Attribute View
Concept 2 Attribute View
Attribute 2 Concept View
Status View

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
64 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

161
Abstract Mapping Language: Editors & Views

Editors
AML Text Editor
AML Conceptual Editor
AML View Based Editor

Views
Concept 2 Concept View
Attribute 2 Attribute View
Concept 2 Attribute View
Attribute 2 Concept View
Status View

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
65 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Abstract Mapping Language: Editors & Views

Editors
AML Text Editor
AML Conceptual Editor
AML View Based Editor

Views
Concept 2 Concept View
Attribute 2 Attribute View
Concept 2 Attribute View
Attribute 2 Concept View
Status View

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
66 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

162
Abstract Mapping Language: Editors & Views

Editors
AML Text Editor
AML Conceptual Editor
AML View Based Editor

Views
Concept 2 Concept View
Attribute 2 Attribute View
Concept 2 Attribute View
Attribute 2 Concept View
Status View

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
67 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Abstract Mapping Language: Editors & Views

Editors
AML Text Editor
AML Conceptual Editor
AML View Based Editor

Views
Concept 2 Concept View
Attribute 2 Attribute View
Concept 2 Attribute View
Attribute 2 Concept View
Status View

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
68 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

163
Conclusions

Conceptual model is WSMO


End to end functionality for executing SWS
Has a formal execution semantics
Real implementation
Open source code base at SourceForge
http://sourceforge.net/projects/wsmx/
Event-driven component architecture
WSMT emerging tool to handle semantics

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
69 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Leopold Franzens
Universitt Innsbruck

Triple Space Computing

Review computer science in InnsbruckSESA Tutorial,


Seoul, 10-14 September 2007.
Copyright 2007 DERI Innsbruck www.deri.at making semantics rea l.

164
Triple Space Technology

Triple Space Computing results from the


integration of three existing and well known
technologies
Triple Spaces shall embody a communication
paradigm for anonymous, asynchronous,
scalable information exchange through
publication that ensures persistency and unique
identification (URI) of the communicated semantic
data

Triple Space shall become the web for machines


as the web based on HTML became the Web for
humans"
Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
71 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Triple Space Technology

Space Based
Tuple Space Semantic Web (Triple) Web Service
Computing
Technology Technology + Ontologies Technology

Triple Space Service Technology

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
72 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

165
Decoupling of Interaction

SBC decouples interaction in three dimensions


Time
Applications can read and write data whenever
they want to
Space
Applications only need to access the same
space in order to communicate
Reference Time

Applications communicating with


each other do not need to know
explicitly from each other
Reference
Space

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
73 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Technology Facts and Figures: TS Kernel

write, read, take, query,


update, subscribe,
advertise based on
URIs
Templates
(cf. SPARQL, N3QL)
Named Graphs

setPermissions,
createUser, deleteUser,
add, remove mediation rules createRole, deleteRole,
based on addUserToRole based on
- RDF Triples Named Graphs
- URIs Meta Graph
Mediation-check based on
- Templates

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
74 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

166
Triple Space Computing for Semantic Web Services

Triple Space Computing for Semantic Web Services


Dynamic Components Management in WSMX using
Triple Space
Inter-WSMX communication and coordination using
Triple Space
Resource Management in WSMX using Triple Space
External Communication with WSMX using Triple
Space

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
75 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Message based coordination of components in WSMX


Reviver

Reviver

Reviver

Reviver

Reviver
Reviver

Reviver

Proxies Proxies Proxies Proxies Proxies Proxies Proxies

Wrapper Wrapper Wrapper Wrapper Wrapper Wrapper Wrapper

Interface Interface Interface Interface Interface Interface Interface



WSMX Data Process
Communication
Discovery Selection Composition
Manager Mediation Mediation
Manager

Web Service Execution Environment (WSMX)

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
76 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

167
Components Management of WSMX using TSC
Web Service Execution Environment (WSMX)

WSMX Data Other


Discovery Selection Composition Parser
Manager Mediation Components


Interface Interface Interface Interface Interface Interface Interface

Wrapper Wrapper Wrapper Wrapper Wrapper Wrapper Wrapper

TS Proxy TS Proxy TS Proxy TS Proxy TS Proxy TS Proxy


TS Proxy

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
77 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Components Management of WSMX using TSC


Web Service Execution Environment (WSMX)

WSMX Data Other


Discovery Selection Composition Parser
Manager Mediation Components


Interface Interface Interface Interface Interface Interface Interface

Wrapper Wrapper Wrapper Wrapper Wrapper Wrapper Wrapper

TS Proxy TS Proxy TS Proxy TS Proxy TS Proxy TS Proxy


TS Proxy

Triple Space Computing Middleware

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
78 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

168
TSC for inter-connecting multi WSMXs

Inter-connecting different WSMX instances running at


different places
Triple Space as global communication middleware

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
79 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

TSC based Resource Management in WSMX

Interfacing WSMX resource


manager with Triple Space
Kernel
Passing the data received by
Resource Manager Layer to TS
Kernel
Bringing TSC based Resource
Management for WSMX
Reduced complexity for WSMX
resource manager to contains
internal repositories
Help in Distribution of Resources
for other WSMXs
Improving time to access the
required resources

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
80 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

169
TSC based External Communication in WSMX

Service Requestor submitting Goal to WSMX


Web Service end-points
Providing additional communication channel
Submitting Goal via Triple Space
Decoupling external applications
and WSMX
Grounding Goals to
Triple Space
Interfacing
Communication
Manager with
TS Kernel

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
81 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

TSC WSMX integration: Overall scenario

Goal
User
Web End User Execution
Service Tools Manager

SO
TS Kernel AP
c all
Composition Discovery
T ri
co ple S
ord pa
ina ce
tio
n
Communication
Selection
Manager

Other
Semantic Web
Applications

Triple Space Triple Space Triple Space


coordination coordination coordination
TS Kernel TS Kernel TS Kernel TS Kernel

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
82 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

170
Leopold Franzens
Universitt Innsbruck

Hands-on Session

Review computer science in InnsbruckSESA Tutorial,


Seoul, 10-14 September 2007.
Copyright 2007 DERI Innsbruck www.deri.at making semantics rea l.

Use Case

Virtual Travel Agency


Provides flight and train services

Service Provider
Austrian Air
US Air
Oebb (Austrian Railways)

WSMX
Acting as middleware to bring together Clients and the
Virtual Travel Agency to find the best combination of
services for clients

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
84 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

171
Usecase Scenario

Austrian
Air

US
VTA
Virtual Travel Agency Air

OeBB
Austrian
Passenger Train

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
85 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Why WSMX ?

Discovery
Client/Passenger does not know which airline goes to his/her
destination
Which is the suitable option (i.e. train or flight)
Client/Passenger does not want to bound to one provider

Mediation
Client uses a different format of data than that of Airlines and
Train reservation Web Services
Client does not want to change the data format

WSMX acts as middleware between the client and end-


point Web Services

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
86 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

172
Discovery Scenario

Searching All possible services


Providing train based travel
Providing flights based travel
Traveling to US
Traveling to EU
Traveling from Innsbruck (Austria) to Vienna
(Austria)

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
87 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

Mediation Scenario

Heterogeneity between the user and service provider


data

User Service Provider


Cost Payment
Ticket Travel Voucher
Currency Payment
Train direction and time table Trip points
Terms (payment method) Payment type

Review computer science in InnsbruckTutorial on Semantically Enabled Service making semantics rea l.
88 Oriented Architectures (SESA)
10-14 September 2007, Seoul, Korea.

173
SESA Tutorial

WSMX Hands-on session

10-13 September 2007, Seoul, Korea.

www.deri.at www.wsmx.org

Prepared by: Omair Shafiq: DERI Innsbruck, Austria.

174
Installations and Configurations

1. WSMX installation:

In this section we explain a step by step WSMX installation on a Windows operating


system. Get the WSMX from the tutorial CD at location CD:\handson-
day2\software\wsmx.

1.1. Pre-installation:

Following software is necessary to run WSMX:

1.1.1. J2SE SDK

Step 1. Go to the java directory (CD:\handson-day2\software\java) in tutorial CD to


install Java(TM) 2 SDK, Standard Edition 1.5.0.

Step2. Setup the environment variable JAVA_HOME and point it to where the java
has been installed (say c:\java).

Step 3. Run the installer j2sdk-1_5_0-windows-i586-p.exe

1.1.2. Tomcat

Step 1. Go to the tomcat directory in the tutorial CD (CD:\handson-


day2\software\tomcat) to get tomcat.zip file. Unzip the file in your hard drive (say at
c:\tomcat) and setup the environment variable CATALINA_HOME to c:\tomcat

Step 2. Run the startup.bat to start Tomcat and the shutdown.bat to stop Tomcat.
These files can be run from the command line or found at; C:\tomcat\bin

Step 3. Open internet browser and type URL http://localhost:8080

1.2. WSMX configuration:

Step 1. Go to the wsmx directory in the tutorial CD (CD:\handson-


day2\software\wsmx) to get the wsmx.zip file. Unzip it in your hard drive (say
c:\wsmx)

Step 2. Go to PATH\wsmx (where you have placed the extracted files)

Step 3. Run the start.bat to run wsmx

Step 4. Open internet browser and type URL http://localhost:8081

If the WSMX server page is visible, WSMX has been installed and running
successfully.

175
Note: WSMX is an ongoing development will have many updated versions in near
future. The latest versions of the WSMX can be downloaded from
http://www.wsmx.org/downloads.html

1.3. WSMT configuration:

Step 1. The WSMT folder (CD:\handson-day2\software\wsmt) in tutorial CD contains


the WSMT in a zip file. Unzip it in your hard drive (say c:\wsmt).

Step 2. Go to c:\wsmt and run wsmt.exe

Step 3. Open SEE perspective of WSMT.

Step 4. On the left panel, right click on the server and open properties to set the
IP and ports. In this case, IP is localhost, HTTPport is 8080 and servlet port is 8050

Note: WSMT is an ongoing development will have many updated versions in near
future. The latest versions of the WSMT can be downloaded from
http://sourceforge.net/projects/wsmt

2. Deploying end-point services:

The end-point Web Services provides the implementation of Service Provider. We are
focusing the description and matchmaking of services. Therefore, the implementation
details of the end-point service as this is not our focus in this tutorial.

These implementation files are to be deployed on the tomcat server. Following steps
are to be followed:

Step 1. Go to \TOMCAT_HOME\webapps\axis\

Step 2. Put the end point web service code in the form of a java class in
CLASSNAME.jws file

Step 3. Start the tomcat server using \TOMCAT_HOME\bin\startup.bat

Step 4. Open internet browser and type http://localhost:8080 (Please make sure
that tomcat is started on port 8081 to avoid any conflict with wsmx running). The
Apache tomcat server web console should be visible.

Step 5. Go to the URL http://localhost:8080\axis\CLASSNAME.jws. If it shows a


valid web page with an option to view the corresponding WSDL file, it means the
end-point service has been deployed successfully on the tomcat web server.

Running WSMX and its use-case

176
3. Browsing ontologies, goals and Web Service Descriptions in
WSMT

After the WSMT is started, on the left side of WSMT GUI, the Navigator view shows
all the projects in your workspace. For this tutorial session, the WSMT contains all
the WSMO Ontologies, Web Services and Goals needed to execute the use case in
the project called WSMO Tutorial. The workspace also contains some other WSML
examples that you can use to understand the WSMT functionality.

There are two main editors for viewing and manipulating WSMO descriptions in the
WSML formalism. These are the WSML Visualizer and the WSML Text Editor
and instructions for using them are provided in sections 3.1 and 3.2.

3.1 WSML Visualizer

The WSML Visualizer provides a graphical representation of the information


contained within a WSML document, using a directed graph. In this part of the
tutorial we will look at the Simpsons ontology, which is a schema and some instances
related with the Simpsons television show.

Step 1. Open The Simpsons project by clicking the plus on the left hand side of the
folder icon.

Step 2. Right click on the-simpsons-ontology.wsml in the navigator view, choose


Open With WSML Visualizer

In the visualizer you will see the blue node at the centre that represents the ontology
contained within this WSML file. The other nodes in the representation are concepts
(yellow) and instances (red). The graph is automatically layed-out using a spring
layout algorithm however the representation is fully interactive and by clicking on a
node and dragging it the representation can be moved to obtain the best layout.

Step 3. Manipulate the graph using the dragging feature to get the best
representation.

The visualization provided in this editor is fully interactive and allows the user to edit
the WSMO Ontology, Web Service, Goal or Mediator being visualized. In the
following steps we will add a new concept, some attributes and an instance to the
Simpsons ontology. The concept that we shall add will represent the concept of a
public park and the instance will represent the park located in Springfield.

Step 4. Right click on the yellow concept node called place and choose Add Sub
Concept

Step 5. In the New Concept ID dialog enter public_park and select OK (NOTE: a
new concept node is added to the visualization).

The visualizer separates the complexities in the ontology into multiple levels, in order
to start manipulating the attributes of a concept we need to step down to the
concept semantic level. We do this by double clicking on a concept.

177
Step 6. Double click on the public_park concept node (NOTE: the view is
constrained to information about the selected concept).

Step 7. Right click on the public_park concept node and choose Add Attribute

Step 8. In the New Attribute ID dialog enter hasLocation and select OK (NOTE:
we now have an error in our ontology as the attribute hasLocation has no range).

Step 9. Right click on the brown hasLocation attribute node and choose Add
Attribute Range (Concept)

Step 10. In the Select a Concept dialog, expand the place concept in The
Simpsons Ontology, choose town and select OK. (NOTE: the error in the ontology
is now removed.

Now that we have created our concept and added an attribute we can create an
instance of that concept. Note that there are two attributes available for use on the
instance. The first is the hasLocation that we just created and the second is the
hasName attribute inherited from the place super concept of public park.

Step 11. Right click on the public_park concept again and choose Add
Instance

Step 12. In the New Instance ID dialog enter springfield_public_park and select
OK

Step 13. Double click on the new springfield_public_park instance node to move
to the instance semantic level.

We have created our instance, but we still need to assign values to the attributes of
the instance.

Step 14. Right click on springfield_public_park and choose Add Attribute

Step 15. Choose the hasLocation attribute from the public_park concept and
select OK. (NOTE: You will automatically be shown the Select an Instance dialog).

Step 16. Choose the Springfield instance from the town concept and select OK.

Step 17. Right click on springfield_public_park and choose Add Attribute

Step 18. Choose the hasName attribute from the place concept and select OK
(NOTE: You will automatically be shown the Specify a Data Value dialog).

Step 19. In the Data Value text field enter Springfield Public Park and select OK.

Step 20. Save the ontology by using the Ctrl-S shortcut or File Save.

3.2 WSML Text Editor

The WSML Text Editor shows the contents of a WSML document, in the WSML human
readable syntax, to the user with syntax highlighting, content assistance and many

178
other features that help advanced users who are familiar with WSML to create and
manage their WSML documents more efficiently.

Step 21. Right click on the-simpsons-ontology.wsml in the navigator view, choose


Open With WSML Text Editor

Step 22. Use the Ctrl-F shortcut to bring up the find dialog

Step 23. In the find enter public_park and click Find.

You can now see the human readable syntax of the concept that we created in the
visualizer.

Step 24. In the find dialog click Find again.

You can now see the human readable syntax of the instance that we created in the
visualizer.

Step 25. Browse the files located in the Examples project with the editor of your
choice and become familiar with the Ontologies, Web Services and Goals.

4. Getting familiarized with WSMX

4.1 WSMXs web based console

Step 1: Go to PATH\wsmx (where you have placed the WSMX files)

Step 2: Run the start.bat to run WSMX

Step 3: Open internet browser and go to URL http://localhost:8081. If you see a


page named WSMX management console. It means WSMX has started successfully.

Step4: Go to Main view tab from the main menu of the web page. This page shows
the general system information like name of host computer, network IP address,
space address, information about other federated WSMX peers, startup time and
WSMX system uptime duration. It also provides the information about the underline
JVM being used, processor information as well as operating system details.

Step 5: Go to Service view from the main menu of the web page. Here it provides
different set of information.

1. Information about the Class loaders, management interface of the Mbean


implementation (listing all the attributes, constructor, destructor and methods
with corresponding input and return types).
2. Component view (listing all the methods with corresponding input and return
types).

179
3. Core listing provides the information about the attributes and methods of the
core services of WSMX, i.e. AxisAdapter, HTTP Adapter, SSHDaemon, WSMX
Kernel (the micro kernel) and XSLT Processor.

Step 6: Go to Component view from the main menu of the web page. Here it
provides the components deployed on the WSMX. In order to see the method listings
of the components, please revise the previous step (i.e. by going to the Server
view on the main menu of the page) and click on the component (in
Domain:component section).

4.2. Data Mediation

Mappings are to be created between source ontology and target ontology.

Mapping process description:

Step 1: Open the WSMX Data Mediator tool


o As the WSMX Data Mediator tool is deployed as an Eclipse plug-in, you
might need to activate the WSMX Mapping perspective. You can do this by
going to: Window -> Open perspective -> Other and choosing Mapping
from the list

Step 2: Load the two ontologies into the mapping tool, i.e. source ontology and
target ontology by clicking on in the Tool bar corresponding to the Source
ontology view and Target ontology view, respectively.

Step 3: Meaning of graphical symbols:


o - compound concept
- the compound target concept the selected source is mapped to
- the compound target concept that is suggested by the tool as
a good mapping candidate for the selected source
o - primitive concept (concept having no attributes)
- the primitive target concept the selected source is mapped to
- the primitive target concept that is suggested by the tool as a
good mapping candidate for the selected source
o - data type
- the target data type the selected source is mapped to
- the target data type that is suggested by the tool as a good
mapping candidate for the selected source
o - attribute
- the target attribute the selected source is mapped to
- the target attribute that is suggested by the tool as a good
mapping candidate for the selected source

Select an item in source ontology. Please observe the suggestion made by the
tool. Go to the Status View situated in the bottom part of the application and
study the bases of this suggestion.

180
Map one item from the source with an item of the target by pressing in the Tool
bar. Please observe the updates in the view (either Concept2Concept,
Attribute2Attribute, Concept2Attribute, Attribute2Concept situated in the
bottom part of the application).

4.3 WSMX Discovery (Keyword based discovery)

Step 1: Run the Web Service Execution Environment (WSMX) by going to the
WSMX-HOME and executing start.bat file. If WSMX is already running, this step is
not required.

Step 2: Open the web console of WSMX by going to URL http://localhost:8081.

Step 3: Click on the Server view tab from the main menu of the web page. Click on
the components:name=Keyword Discovery which shows the manageability
wrapper view of the component.

Step 3: In the tutorial CD, there is a directory named Keyword Discovery.


Open that folder and copy the files into your hard drive.

Step 4: Open the text from the WebServiceA.wsml and paste it in the input text box
of addWebServiceByContent method, and click its Invoke button. If you see the
message Web Service successfully registered means the test Web Service
description has been registered and stored in the WSMX.

Step 5: Repeat the above step with WebServiceB.wsml and WebServiceC.wsml to


register it in the WSMX.

Step 6: From Keyword Discovery directory, copy the content of Goal.wsml and paste
it into the input text box of discoverByGoalContent method, and press its invoke
button.

5. Running the use-case:

Step 1: Run the WSMX (not required if WSMX is already running)

Step 2: Run the WSMT (not required if WSMT is already running)

Step 3: Interconnect the WSMT with WSMX. In WSMT, go to SEE perspective. On


the left sub-window, right click and select new -> WSMX server.

Step 4: A new window will open. Provide the host as localhost if WSMX is running
at the same machine. Provide HTTP port as 8081 and Axis port as 8050.

Step 5: A tree will appear with name of the WSMX server. Open that tree and
browse through the already stored Web Service descriptions, goals, mapping rules
and ontologies.

181
LightWeight DL (Description Logics) Discovery:

Step 6: Go to WSML perspective. On the navigation bar at left side, open the folder
Examples and sub folder Lightweight DL Discovery. Browse the .wsml files inside
the folder.

Step 7: Browse the Web Services descriptions. In the Lightweight DL Discovery,


there are three web service descriptions that have been provided, i.e.

aua.wsml (Austrian Airlines) that is assumed to fly from one European


Country to another European Country.

usair.wsml (US airways) that is assumed to fly from one US state to another
US state.

oebb.wsml (Austrian Railways) that is assumed to operate within Austria.

Step 8: Browse the goal description. In the Lightweight DL Discovery, the


goal.wsml file contains different set of goals that provide different possible inputs for
the relevant services to be discovered.

Step 9: Browse the ontology. In the Lightweight DL Discovery, the trip.wsml file
contains the ontology description. Analyze the ontology description.

Step 10: Observe the lower part of the right frame of WSML perspective. Open the
Discovery-View tab.

Step 11: In the section Included Web Services, open the tree root node named
example and tick the LightWeight DL Discovery node of the tree.

Step 12: On the top most part under the Discovery-View, a combo box is given that
contains the goals that are present in LightWeight DL Discovery folder.

Step 13: Select the Goal from the Combo Box titled as Choose Goal.

Step 14: Choose the Trip Goal and select DL as formalism, and press Discover.
You will see in the result table, all three Web Services, i.e. aua, usair and oeeb, as
the Goal Trip asks for all the services that are related to travel.

Step 15: Choose the TrainTrip Goal and select DL as formalism, and press
Discover. You will see in the result table, only the Web Service that is related to
train travel (i.e. oeeb) will be shown, as the Goal TrainTrip asks for all the services
that are related to travel by train only.

Step 16: Choose the PlainTrip Goal and select DL as formalism, and press
Discover. You will see in the result table, only the Web Service that is related to Air
travel (i.e. aua and usair) will be shown, as the Goal PlainTrip asks for all the
services that are related to travel by plain/air only.

182
Step 17: Choose the TrainTripIBK2VIE Goal and select DL as formalism, and press
Discover. You will see in the result table, only the Web Service that is related to
train travel (i.e. oeeb) will only be shown, as the selected Goal asks for all the
services that are related to train trip and from one Austrian location to another
Austrian location (i.e. within Austria), which are further sub-concepts of European
Places (ref. see Trips.wsml ontology).

Step 18: Choose the EUTrip Goal and select DL as formalism, and press Discover.
You will see in the result table, only the Web Service that is related to air travel and
travel within European Destinations (i.e. aua) will only be shown, as the selected
Goal asks for all the services that are related to air travel and within Europe.

Step 19: Choose the USTrip Goal and select DL as formalism, and press Discover.
You will see in the result table, only the Web Service that is related to air travel and
travel within US Destinations (i.e.usair) will only be shown, as the selected Goal asks
for all the services that are related to air travel and within US/NorthAmerica.

Step 20: Similarly, in the directory tree of Discovery-view, if you select the
LightWeight Rule Discovery, you can see the goals in the combo box (labeled with
Choose Goal) related to Rule based discovery only.

LightWeight Rule-based Discovery:

Step 21: Select the goals and click on Discover button, and see the results in the
table below there. On the left hand side frame of WSMT, see the folder named
LightWeight Rule Discovery and open, browse and analyze the simple Goal, Web
Service descriptions and Ontologies mentioned there, in order to under stand the
process of discovery.

Data Mediation:

Step 22: On the left frame the WSMT, open the folder named Virtual Travel Agency
Example. There are two ontologies related to model the travel from different
perspectives (i.e. users and service providers), have been provided, called as
travel1.wsml and travel2.wsml.

Step 23: Open the file mappings_demo.map in the same directory. When you
double-click on it, Data Mediator interface will be opened on the right side frame of
the WSMT.

Step 24: Observed already performed mappings between the source schema and
target schema, according to the guidelines provided above in the document, section
4.2 (getting familiarized with Data Mediator).

Step 25: You can select, update or delete the mappings by simply selecting the link
(line), source or target element.

183
Step 26: Select a source entity from the left side of the mapper and a destination

entity from the right side of the mapper. Click on the button in between the
source and target ontology trees, to perform the mapping.

Step 27: On top of both the source and target ontology trees, a set of two buttons

has been provided. The left button is used to go to view the higher level of
ontology, whereas the right button is used for viewing the selected concept only.

Step 28: Select a mapping rule and go to the Mapping perspective of WSMX.
Observe the concept2concept attribute2attribute concept2attribute attribute2concept
in the lower frame. Each of the view shows source attributes, target attributes and
condition (conditional expression) applied on the mapping.

--- END ---

184
Leopold Franzens
Universitt Innsbruck

SESA Tutorial
Day 4 Applications
& SUPER project

DERI Innsbruck

SESA Tutorial
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September 2007

Agenda

Application Areas of SESA

The SUPER Project


Aims & Project Structure
Business Process Management (BPM)
Semantic Enhancements for BPM
SUPER Architecture
Demonstration Use Case

SESA Tutorial
2 Seoul, 10 - 14 September
2007

185
SESA Application Areas

Michael Stollberg
SESA Tutorial
3
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

SESA Application Areas

Several Application Areas


Data & Knowledge Management
Enterprise Application Integration (EAI)
E-Commerce (B2B and B2C)

Common Benefits of SESA


advanced information processing
semantic interoperability
bridging the human system gap
more flexible Web Service usage via Goals
handling & resolution of heterogeneities
and reduction of development & maintenance costs

SESA Tutorial
4 Seoul, 10 - 14 September
2007

186
Example 1
Virtual Internet Service Provider
a Virtual Internet Service Provider (VISP)
provides customized product bundles for specific client requests
chooses & aggregates offers from different suppliers

Aims
for cost efficiency, the operational workflow shall be automated
automation of supplier selection and product bundling

Problems
distributed actors (communication over the Web)
environment:
many suppliers
highly dynamic environment (new suppliers, changing offers)
heterogeneous I&C technologies in supply chain
different back-end systems (SAP, Biztalk, etc.)
heterogeneous information (ontology, data formats, etc.)

SESA Tutorial
5 Seoul, 10 - 14 September
2007

VISP Scenario Overview

Client
VISP workflow
1. VISP receives client request
for specific product bundle
1. 3. 5. 2. best offer detection
o searches for adequate
offers from suppliers
VISP
o chooses and bundles best
offers
2. 4.
3. customer notification, product
selection, purchase order
Supplier Supplier 4. VISP executes purchase
order by interacting with
suppliers
5. purchase confirmation to
client
SESA Tutorial
6 Seoul, 10 - 14 September
2007

187
WSMO enabled Solution
Client

VISP as Web service


1. Goal 3. 5. Goal client request as goal
Formulation Resolution suppliers provide offers via
WS Web services
WSMX
VISP automated offer detection and
WSMO
bundling via Web service
2. discovery / 4. automated
composition Goals execution
discovery & composition
automated execution via VISP
WS WS WS orchestration
Supplier Supplier ontologies serve as semantic
data model
Domain Heterogeneity
(semi-) automated
Mediator
Ontology
Knowledge Handling heterogeneity handling by
mediators

SESA Tutorial
7 Seoul, 10 - 14 September
2007

Example 2
EAI in Telecommunications (BT)
Wholesales B2B Gateway
Web-based gateway for integration of suppliers
aim: automation of supply chain management

Background in Telco Domain:


Enterprise Application Integration is a largely manual process
costs are high (between 30% & 50% of all IT spend is on
integration)
time and costs involved make some propositions commercially
unviable
trend towards Service Orientated Architecture
but will this be enough? Doubts about levels of scalability and
automation achievable

SESA Tutorial
8 Seoul, 10 - 14 September
2007

188
BT Wholesales B2B Gateway

ebXML Messaging
conforming to BT Wholesale
Trading Partner ebXML BPSS
Testing

Trading Partner
Provisioning
B2B Gateway

Repair

Trading Partner
Billing

UK ISPs

SESA Tutorial
9 Seoul, 10 - 14 September
2007

Problems with Existing System

Many service providers have little experience with


B2B integration technology
Large resource investment required for realizing the
BT Wholesale (over 150 UK ISPs are integrated)
XML messages can be complex
Semantics expressed in documents and
spreadsheets
Whole process can take several months

SESA Tutorial
10 Seoul, 10 - 14 September
2007

189
WSMO-enabled Architecture

Trading Partner X Message


Message BT Wholesale
Ontology
Ontology Data
Data
Mediator Data

<wsml>
<wsml>
</>
Chor. Chor. </>
<wsml/>
Ontology Ontology <wsml/>
Process
Choreography Mediator Choreography

Adapter Adapter

<order> Domain Domain


Ontology Ontology <order>
</>
</>
<order/>
<order/>

SESA Tutorial
11 Seoul, 10 - 14 September
2007

Benefits from WSMO

Trading partner effort significantly reduced


Can communicate with own data/process
representations
Semantic data mappings defined once.
mediators automatically convert.
=> No need for extra internal programming or glue

Linking to Telco Domain ontologies


enables BT to provide a standardised interface without
need to change internal systems.

SESA Tutorial
12 Seoul, 10 - 14 September
2007

190
Economical Results

Existing System:
current costs approximately 4 Person Months per partner for
integration
150 partners added to wholesale gateway in past 4 years
current costs approximately 1 million ( 1.45 million) per year

Gained Cost Efficiency (estimated):


integration effort reduced by 40-60% per partner
potential savings of up to 600,000 ( 840,000)

[assessment by BT Wholesaler team]

SESA Tutorial
13 Seoul, 10 - 14 September
2007

The SUPER Project

Michael Stollberg
SESA Tutorial
14
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

191
Acknowledgement & Copyrights

This material is based upon works supported by the EU


under the SUPER project (FP6 - 026850)

Material Preparation
KMI: John Domingue, Carlos Pedrinaci, Barry Norton
Poznan University: Agata Filipowska
IAAS (University of Stuttgart): Dimka Karastoyanova, Jrg
Nitzsche, Tammo van Lessen, Zhilei Ma, Frank Leymann,
Branimir Wetzstein
IDS Scheer: Sebastian Stein
DERI Austria: Michael Stollberg
DERI Ireland: Maciej Zaremba

by the SUPER project consortium

SESA Tutorial
15
SUPER Seoul, 10 - 14 September
2007 15
03.09.2007

Project Information

SUPER stands for


Semantics Utilized for Process Management
with and between Enterprises
EU FP6 Integrated Project (IP)
Duration:
36 months
April 2006 2009
Overall Budget: ca 9 Mio
19 Partners
Website: http://www.ip-super.org/
SESA Tutorial
16
SUPER Seoul, 10 - 14 September
2007 16
03.09.2007

192
The Consortium

1. SAP AG, Germany (Coordinator)


2. ETEL AUSTRIA AG, Austria
3. IBIS PROF. THOME AG IBIS, Germany
4. IBM RESEARCH GMBH, Switzerland
5. IDS SCHEER AG, Germany
6. INTELLIGENT SOFTWARE COMPONENTS S.A., Spain
7. LEOPOLD-FRANZENS UNIVERSITAET INNSBRUCK, Austria
8. MIP Consorzio per l'Innovazione nella Gestione delle Imprese e della PA, Italy
9. NATIONAL UNIVERSITY OF IRELAND GALWAY, Ireland
10. NEXCOM BULGARIA EAD, Bulgaria
11. NIWA-WEB SOLUTIONS NIEDERACHER and WAHLER OEG, Austria
12. SIRMA GROUP CORP., Bulgaria
13. THE OPEN UNIVERSITY, UK
14. Telefnica Investigacin y Desarrollo Sociedad Annima Unipersonal, Spain
15. AKADEMIA EKONOMICZNA W POZNANIU, Poland
16. TECHNISCHE UNIVERSITEIT EINDHOVEN, Netherlands
17. UNIVERSITT STUTTGART, Germany
18. TELEKOMUNIKACJA POLSKA S.A., Poland
19. CEFRIEL - Societ consortile a Responsabilit Limitata, Italy

SESA Tutorial
17 Seoul, 10 - 14 September
2007

Problem Setting

Business Process Management (BPM)


management, implementation, and monitoring of processes in
enterprises
many BPM technologies exists
SOA as new principle

BUT: several insufficiencies


Business IT Divide (different worlds)
incompatible modelling languages
Business Process Modeling & Execution
syntactic process specification languages
hard-wired Web Service Execution (inflexible)

Aim of the SUPER project:


(1) ontologize the BPM Life Cycle
(2) enhance BPEL with WSMO

SESA Tutorial
18
SUPER Seoul, 10 - 14 September
2007 18
03.09.2007

193
Problem Setting

SESA Tutorial
19
SUPER Seoul, 10 - 14 September
2007 19
03.09.2007

Problem Setting

SESA Tutorial
20
SUPER Seoul, 10 - 14 September
2007 20
03.09.2007

194
Problem Setting

SESA Tutorial
21
SUPER Seoul, 10 - 14 September
2007 21
03.09.2007

Semantic Matching of Activities and Services

Semantic Web Services


SESA Tutorial
22
SUPER Seoul, 10 - 14 September
2007 22
03.09.2007

195
Better Support Business Users

SESA Tutorial
23
SUPER Seoul, 10 - 14 September
2007 23
03.09.2007

Matching Model Representations & Semantics

SESA Tutorial
24
SUPER Seoul, 10 - 14 September
2007 24
03.09.2007

196
The Critical IT / Process Divide

SESA Tutorial
25
SUPER Seoul, 10 - 14 September
2007 25
03.09.2007

Aim of SUPER

SESA Tutorial
26
SUPER Seoul, 10 - 14 September
2007 26
03.09.2007

197
SUPER Technology Stack
Making sense of a domain\problem Solution maps
Communication tool Mind maps
What is it all about? Ad-hoc modelling
techniques
...

Booking
Receipt
Visualizing\specifying business process Business Scenario Maps
Service booking

Focus: Business Problem Event-driven process


form
request

Check
Call
Flight data booking Mrs. Miller
center

Who does what, when, how and why? chains


request

Booking
request
checked

Service
Booking
request
Alternative
flight Service
Usually multiple layers Flowchart techniques
offer

Flight
disposition
Mrs. Walker
Create
flight
booking
Client data
Offer
alternative
flight
Mr. Green
Flight
disposition
BPMN
Service
Plane
ticket
Flight
booking
created
Alternative
flight
offered
...

<process name="Mediation Example - Ordering BPEL Snippet - 1" suppressJoinFailure="yes" targetNamespace="...">


<sequence>
<receive name="Initial_Receive" createInstance="true"/>
Process execution specification BPEL
Formal, clearly specified grammar ...
<invoke name="Invoke_Check_Order_Consistency"/>
<switch>
<case condition="bpws:getVariableData('consistency', '') = 'OK'">
<flow>
<invoke name="Invoke_Update_Provisioning_Systems_Subprocess"/>
<invoke name="Invoke_CustomerReply_Confirmation_Note"/>
</flow>
</case>
Focus: Implementation
<otherwise>
<invoke name="Invoke_CustomerReply_Rejection_Note"/>
</otherwise>
</switch>
Which component is called when, how, by
<reply name="Final_Reply"/>
</sequence>
</process> whom with which data?

Web service encapsulation WS*


Focus: Implementation ...
Which components can and should be
exposed how as services?

Implementation of components Programming languages


...

SESA Tutorial
27
SUPER Seoul, 10 - 14 September
2007 27
03.09.2007

Business Process
Management
Overview

Michael Stollberg
SESA Tutorial
28
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

198
BPMs Parents and Definition

Office Automation
(since 1980)
SOA CSCW / Groupware /
(since 2000) Workgroup Systems

Business Objects Workflow Systems


(since 2000) (since 1985)
Business
Process
Business Process Mngt. Management EAI
(since 2000) (BPM) (since 1990)

Business Process Modelling Business Reengineering


(since 1990) (since 1990)
Continuous Improvements
(since 1990)
Sebastian Stein
SESA Tutorial
29 Seoul, 10 - 14 September
SUPER 03.09.2007 2007 29

BPMs Parents and Definition

there are several competing definitions


focus of different BPM approaches:
focus on documentation
focus on process and execution
focus on IT architecture
focus on costs and risks
focus on business strategy
etc.

Sebastian Stein
SESA Tutorial
30
SUPER Seoul, 10 - 14 September
2007 30
03.09.2007

199
BPM Enterprise Modeling

model of an enterprise
organisational structure
business functions
business processes
information
IT applications

model is an abstraction of reality


used by many different stakeholders
views needed
abstraction levels needed
lifecycle concept needed
different languages, notations and formalisms needed
SESA Tutorial
31 Seoul, 10 - 14 September
2007

Enterprise Model

Get License License


Available
SYS

Purchase Get Purchase Send Content Purchase


Order PurchaseOrder Order & License Order
Received Extracted Satisfied
SYS SYS

Content
Load Content Ready for
Download
SYS

Sebastian Stein
SESA Tutorial
32
SUPER Seoul, 10 - 14 September
2007 32
03.09.2007

200
Enterprise Model

Get License License


Available
SYS

Purchase Get Purchase Send Content Purchase


Order PurchaseOrder Order & License Order
Received Extracted Satisfied
SYS SYS

Content
Load Content Ready for
Download
SYS

Cell Phone Cell Phone

Sebastian Stein

SESA Tutorial
33
SUPER Seoul, 10 - 14 September
2007 33
03.09.2007

Enterprise Model

Customer License

Content Get License License


Customer
Identifier Available Digital
License
SYS Content

Purchase Get Purchase Send Content Purchase


Order PurchaseOrder Order & License Order
Received Extracted Satisfied
SYS SYS

Content
Load Content Ready for
Download
SYS

Cell Phone Cell Phone


Content Digital
Identifier Content
Sebastian Stein

SESA Tutorial
34
SUPER Seoul, 10 - 14 September
2007 34
03.09.2007

201
Enterprise Model

Customer License

License
Service

Content Get License License


Customer
Identifier Available Digital
License
SYS Content

Purchase Get Purchase Send Content Purchase


Order PurchaseOrder Order & License Order
Received Extracted Satisfied
SYS SYS

Cell Phone Content Cell Phone


Interface Load Content Ready for Interface
Service Download Service
SYS

Content
Library
Service

Cell Phone Cell Phone


Content Digital
Identifier Content
Sebastian Stein

SESA Tutorial
35
SUPER Seoul, 10 - 14 September
2007 35
03.09.2007

Enterprise Model

Sales
Customer License
Department

License
Service

Content Get License License


Customer
Identifier Available Digital
License
SYS Content

Purchase Get Purchase Send Content Purchase


Order PurchaseOrder Order & License Order
Received Extracted Satisfied
SYS SYS

Cell Phone Content Cell Phone


Interface Load Content Ready for Interface
Service Download Service
SYS

Content
IT Department Library IT Department
Service

Cell Phone Cell Phone


Content Digital Content
Identifier Content Provider
Sebastian Stein

SESA Tutorial
36
SUPER Seoul, 10 - 14 September
2007 36
03.09.2007

202
Enterprise Model

Sales
Customer License
Department

License
Service

Content Get License License


Customer

too complex
Identifier Available Digital
License
SYS Content

Purchase Get Purchase Send Content Purchase


Order PurchaseOrder Order & License Order
Received Extracted Satisfied
SYS SYS

Cell Phone Content Cell Phone


Interface Load Content Ready for Interface
Service Download Service
SYS

Content
IT Department Library IT Department
Service

Cell Phone Cell Phone


Content Digital Content
Identifier Content Provider
Sebastian Stein

SESA Tutorial
37
SUPER Seoul, 10 - 14 September
2007 37
03.09.2007

Enterprise Model

possible abstraction layers are:


requirements definition
design specification
implementation specification
execution and run-time models
possible views are:
organisational view
product view
data view (information architecture)
function and IT view
process view
Sebastian Stein
SESA Tutorial
38
SUPER Seoul, 10 - 14 September
2007 38
03.09.2007

203
Business Process
Modeling & Execution

Michael Stollberg
SESA Tutorial
39
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

Business Process Lifecycle

1. Analysis
gather requirements
document current state (as-is)
2. Design
document to-be
specify how to get there
3. Implementation/Execution
implement to-be in organisation and IT
change management
4. Control and Monitoring
monitor execution
measure outcome and analyse it
Sebastian Stein
SESA Tutorial
40
SUPER Seoul, 10 - 14 September
2007 40
03.09.2007

204
BPM Languages & Technologies

many different frameworks for enterprise architecture:


Zachman Framework (very comprehensive)
ArchiMate (simplified version of Zachman)
ARIS (promoted by IDS Scheer)
TOGAF (strong IT focus)
IAF (promoted by Cap Gemini)

process design & execution technologies:


BPMN (notation for (IT oriented) business processes)
EPC (notation for business processes)
Petrinets (formalism often used for workflow modelling)
UML Activity diagrams
XPDL (execution language for process definitions)
BPEL (execution language for process definitions)
XLANG (execution language promoted by Microsoft)
...

SESA Tutorial
41 Seoul, 10 - 14 September
2007

Two Level Programming

Two-Level Programming
Approach = Separation of
Control/business logic
discrete functionalities

Relies on earlier
Workflow Technology

Dimka Karastoyanova

SESA Tutorial
42
SUPER Seoul, 10 - 14 September
2007 42
03.09.2007

205
Dimensions in Workflow

Workflows have minimum 3


dimensions:
(1) What? = control logic
which tasks
(2) Who? = organization
who must execute which task
(3) What with? = infrastructure
which tool must be used to
execute a task

There are multiple notations and


languages for workflows

Dimka Karastoyanova
SESA Tutorial
43
SUPER Seoul, 10 - 14 September
2007 43
03.09.2007

Workflow Languages

Industry has tried to get an agreement on a common Workflow language since early 1990s
Now the industry agreed on BPEL (thats why its interesting)
Portability
Interoperability
Frank Leymann, Joerg Nitzsche
SESA Tutorial
44 Seoul, 10 - 14 September
SUPER 03.09.2007 2007 44

206
SOA in BPM

Use Web Services as


Infrastructure
what?
Benefits:
data exchange over the Web
A2 A3 integration on interface level
A1
A5
A4 BPEL as quasi standard
No direct support for
people/organizational dimension
yet, but efforts towards this
(e.g. BPEL4People)
(what) with?

Dimka Karastoyanova

SESA Tutorial
45 Seoul, 10 - 14 September
SUPER 03.09.2007 2007 45

Why Web Services?

Web service technology provides a virtual


component model for using components in a
loosely coupled manner

When using a Web service the supporting container


hides its middleware idiosyncrasies
(component model behind the implementation of
the Web service, the invocation protocol etc.)

Web service technology does not require a new


component model for implementing components
(well, except for BPEL )
Frank Leymann
SESA Tutorial
46 Seoul, 10 - 14 September
2007

207
Virtualizing Components

Virtual Component

Web
Service

implements implements implements

(E)JB StP
... Assembly

J2EE DBMS .NET

Concrete Component

SESA Tutorial
Frank Leymann
47
SUPER Seoul, 10 - 14 September
2007 47
03.09.2007

Ingredients Of WSDL
Interface (What)

Supports
Port Type Operation

e )
Transport: ok pc Input, Output
o inv e, r
Formats & t g & Faults
w an
Protocols Ho xch
ce
(do
Hosts & How to encode Message
Binding (serialization)
Implements
Access
Specification
(How)
Implements

Provides
Port Service
Frank Leymann
Endpoints (Where)
SESA Tutorial
48
SUPER Seoul, 10 - 14 September
2007 48
03.09.2007

208
The Role of Bindings

SOAP/HTTP Port1

POJO/JMS Port2

Port

Binding
Client Type Port3
ASCII/SMTP

RDF/TSpace Port4

Portk
/

Frank Leymann, Joerg Nitzsche


SESA Tutorial
49
SUPER Seoul, 10 - 14 September
2007 49
03.09.2007

What is BPEL?

A language to specify behaviour of business processes


Between Web services
and as Web service
Same language to define
Executable processes
Can be performed within all compliant environments (portability)
Interoperability between heterogeneous environments
Abstract processes
Specify constraints of message exchange
Are views on internal processes
Combination of graph-based language (IBM WSFL) and
calculus-based language (Microsoft XLANG)

Frank Leymann
SESA Tutorial
50
SUPER Seoul, 10 - 14 September
2007 50
03.09.2007

209
BPEL Processes Use Web Services

Frank Leymann

SESA Tutorial
51 Seoul, 10 - 14 September
SUPER 03.09.2007 2007 51

Business Processes as Web Services


A BPEL Process is also a Web Service
Provides functionality in terms of WSDL port types and operations

Frank Leymann
SESA Tutorial
52
SUPER Seoul, 10 - 14 September
2007 52
03.09.2007

210
Aggregating Web services

BPEL provides a recursive aggregation model for Web services

Frank Leymann
SESA Tutorial
53 Seoul, 10 - 14 September
SUPER 03.09.2007 2007 53

Example

Frank Leymann

SESA Tutorial
54 Seoul, 10 - 14 September
2007

211
BPEL Elements

BPEL Process Partner Links specify the roles of all


external partners involved in the
Partner Links process as well as the role(s) of the
process itself
Variables can be defined either in the
Variables process or in a scope
used as input- and output-containers of
interaction activities & to assign activities
Correlation Sets Correlation Sets are used to
correlate messages that belong to the
same process instance
Handlers Handlers can be used to define
exception handling and compensation
Activities define the actual control
Activities
logic
Joerg Nitzsche
SESA Tutorial
55 Seoul, 10 - 14 September
SUPER 03.09.2007 2007 55

Control Logic

Sequential execution sequence


Parallel execution of tasks Flow, links
Branching if then else
Loops: while, repeat until

Sequence Flow Loops Branching


Condition1 Condition2 Otherwise

Link Activity

Zhilei Ma

SESA Tutorial
56
SUPER Seoul, 10 - 14 September
2007 56
03.09.2007

212
Data Manipulation

Data Flow in BPEL


No explicit data flow modelled
Data flow implicit via global/scoped variables, access via name
Variables can be defined as
WSDL message type
XML Schema type (simple or complex)
XML Schema element
Data Manipulation
BPEL Assign activity
Allows copying (parts of) variables
XPath can be used to identify these parts
Example

<assign>
<copy>
<from>$po/lineItem[@prodCode=$myProd]/amt * $exchangeRate</from>
<to>$convertedPO/lineItem[@prodCode=$myProd]/amt</to>
</copy>
</assign>

Tammo van Lessen


SESA Tutorial
57
SUPER Seoul, 10 - 14 September
2007 57
03.09.2007

Architecture of a BPEL Engine

Process Engine

Deployment
Component
Navigator
Build Time Data
Monitoring

(Process models)
API

Instance Data
(Process Instances)
Event Manager
Execution Communication
History Manager

Invocation and Management Framework

Dimka Karastoyanova, Tammo van Lessen, Joerg Nitzsche


SESA Tutorial
58
SUPER Seoul, 10 - 14 September
2007 58
03.09.2007

213
Process Lifecycle within the Engine

Receive*

Process
Instantiation

Invocation and Manage-


Instance

ment Framework
Process ...
Deployment
Definition

Execution via the


Navigator
BPEL
Document
Reply

BPEL Engine

* Receive may cause an Instantiation of a Process

Joerg Nitzsche
SESA Tutorial
59
SUPER Seoul, 10 - 14 September
2007 59
03.09.2007

Semantic BEPL
Enhancing BPEL with WSMO

Michael Stollberg
SESA Tutorial
60
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

214
Idea & Approach

Make BPEL able to deal with SWS


better flexibility
ensure semantic interoperability

Use WSMO Framework & Technologies to:


1. semantically describe process data on the basis of
ontologies
2. flexible Web Services invocation via Goals
BPEL activity realized as WSMO Goal
dynamic discovery / composition / execution of
necessaty Web services at runtime
3. use WSMO mediators to resolve heterogeneities

SESA Tutorial
61 Seoul, 10 - 14 September
2007

SUPER Ontology Stack

SESA Tutorial
62 Seoul, 10 - 14 September
2007

215
From Syntactic to Semantic BPEL

a) BPEL Process b) Semantic BPEL Process

sBPEL
Process SESA WS
BPEL Environment
Process WSMO discovery
WS
Goal composition
WS mediation
execution WS
WS Goal

WS Goal dynamic detection at runtime

XML
Ontology Mediator

SESA Tutorial
63
SUPER Seoul, 10 - 14 September
2007 63
03.09.2007

BPEL Business Protocols

Partner
Links
Partner 1 Partner 2

W 1
A

X 3
B C
2
Y
D
4
Z

SESA Tutorial
64
SUPER Seoul, 10 - 14 September
2007 64
03.09.2007

216
Semantic BPEL Business Protocols

Goal
Sets
Partner 1 Partner 2

W
{ } { } A

X
{ } B C

Y
{ } { } D

SESA Tutorial
65
SUPER Seoul, 10 - 14 September
2007 65
03.09.2007

Benefits

Higher Flexibility for Web service usage

Explicate Semantic Meaning of Data

Automated Handling of Potential Heterogeneities

Make process definitions better understandable

SESA Tutorial
66 Seoul, 10 - 14 September
2007

217
SUPER Architecture

Michael Stollberg
SESA Tutorial
67
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

Architecture Overview

Semantic Semantic
BPEL Execution
Execution Environment Modelling Monitoring Mining
Engine Tool Tool Tool

SUPER Execution
Environment SUPER Tooling

Semantic Service Bus Deployment Component

Composition
Semantic Business
Execution
Web Process
Discovery History
SUPER Services Library
platform
Mediation services
SUPER Repositories

Translation

SESA Tutorial
68
SUPER Seoul, 10 - 14 September
2007 68
03.09.2007

218
Deployment Process: Semantic Process
Artefacts Bundle (SPAB)

BPEL4SWS
WSDL
WSMO
WSDL

WSMO Mediators

WSMO
Goals

Deployment
descriptor

SESA Tutorial
69
SUPER Seoul, 10 - 14 September
2007 69
03.09.2007

Deployment Process

Semantic Semantic
BPEL Execution
Modelling Monitoring Mining
S PAB Execution Environment
Tool Tool Tool
Engine
SUPER Execution
Environment SUPER Tooling

BPEL4SWS WSDL Bus WSMO


Semantic Service WSMO WSMO Deployment
Deployment Component
WSDL Mediators Goals Descriptor

Composition SUPER
platform Semantic Business
Discovery Execution
services Web Process
History
Mediation Services Library

Translation SUPER Repositories


SESA Tutorial
70 Seoul, 10 - 14 September
2007

219
Semantic Business Process Execution

SUPER Web
Mediation platform Service
services

4 Invoke Service
Request to
Service
1 6 Return Result

2 Achieve Goal

5 Return result to engine


3 Discover Service
Semantic Semantic
BPEL Execution
Execution Environment SWS Execution
Engine History
SUPER Repositories
SUPER Execution Environment
SESA Tutorial
71
SUPER Seoul, 10 - 14 September
2007 71
03.09.2007

Demonstration Example

Michael Stollberg
SESA Tutorial
72
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

220
Content On Demand Scenario

a client wants to purchase on-demand digital content


the provider defines a sBPEL business process

Client Web Interface


(1) request (5) result

Provider
sBEPL Process
(2) WSMO goals (4) execution
results

SESA Exec Environments

(3) execution over the Web

WS WS WS

SESA Tutorial
73 Seoul, 10 - 14 September
2007

Web-based Client Interface

SESA Tutorial
74
SUPER Seoul, 10 - 14 September
2007 74
03.09.2007

221
The Content Purchase Process

SESA Tutorial
75
SUPER Seoul, 10 - 14 September
2007 75
03.09.2007

BPMO plug-in

SESA Tutorial
76 Seoul, 10 - 14 September
2007

222
TIDs Purchase Digital Content Process

SESA Tutorial
77 Seoul, 10 - 14 September
SUPER 03.09.2007 2007 77

Content Purchase Process - Details

Web
Client

SESA Tutorial
78 Seoul, 10 - 14 September
SUPER 03.09.2007 2007 78

223
Content Purchase Process - Details

BPEL4SWS
Process

SESA Tutorial
79 Seoul, 10 - 14 September
SUPER 03.09.2007 2007 79

Content Purchase Process - Details

SWS

SWS

SESA Tutorial
80 Seoul, 10 - 14 September
SUPER 03.09.2007 2007 80

224
Representation in BPMO

SESA Tutorial
81 Seoul, 10 - 14 September
2007

Process Execution in SUPER

SUPER Web
Mediation platform Service
services

4 Invoke Service
Request to
Service
1 6 Return Result

2 Achieve Goal

5 Return result to engine


3 Discover Service
Semantic Semantic
BPEL Execution
Execution Environment SWS Execution
Engine History
SUPER Repositories
SUPER Execution Environment
SESA Tutorial
82
SUPER Seoul, 10 - 14 September
2007 82
03.09.2007

225
Process Execution in SUPER

1 6

2 5

2 5 3 4

SESA Tutorial
83
SUPER Seoul, 10 - 14 September
2007 83
03.09.2007

Process Description in BPEL4SWS

<b4s:conversations>
<b4s:conversation b4s:name="Packager" b4s:goalURI="http://www.ip-super.org/ontologies/prereview#goalGetURL" />
<b4s:conversation b4s:name="LicenseServer" b4s:goalURI="http://irs.open.ac.uk/superPrereview#goalGetLicense" />
</b4s:conversations>

<sequence sa:modelReference="http://www.ip-super.org/ontologies/prereview#actServiceProvision">
<receive name="receiveContentRequest
sa:modelReference="http://www.ip-super.org/ontologies/prereview#recContentRequest"
partnerLink="ServiceProvider"
portType="spwsdl:ServiceProviderPortType" operation="requestContent"
variable="contentRequest" createInstance="yes" />

<flow sa:modelReference="http://www.ip-super.org/ontologies/prereview#actFlow_1">
<extensionActivity>
<b4s:invoke name="invokeGoalGenerateLicense"
modelReference="http://www.ip-super.org/ontologies/prereview#actInvokeGoalGenerateLicense"
b4s:inputVariable="contentRequest" b4s:outputVariable="contentURL"
b4s:conversation="Packager" />
</extensionActivity>
<extensionActivity>
<b4s:invoke name="invokeGoalGenerateURL"
modelReference="http://www.ip-super.org/ontologies/prereview#actInvokeGoalGenerateURL"
b4s:inputVariable="contentRequest"
b4s:outputVariable="contentLicense"
b4s:conversation="LicenseServer" />
</extensionActivity>
</flow>
<reply> </reply>
</sequence>

SESA Tutorial
84 Seoul, 10 - 14 September
2007

226
Process Description in BPEL4SWS

<b4s:conversations>
<b4s:conversation b4s:name="Packager" b4s:goalURI="http://www.ip-super.org/ontologies/prereview#goalGetURL" />
<b4s:conversation b4s:name="LicenseServer" b4s:goalURI="http://irs.open.ac.uk/superPrereview#goalGetLicense" />
</b4s:conversations>

<sequence sa:modelReference="http://www.ip-super.org/ontologies/prereview#actServiceProvision">
<receive name="receiveContentRequest
sa:modelReference="http://www.ip-super.org/ontologies/prereview#recContentRequest"
partnerLink="ServiceProvider"
portType="spwsdl:ServiceProviderPortType" operation="requestContent"
variable="contentRequest" createInstance="yes" />

<flow sa:modelReference="http://www.ip-super.org/ontologies/prereview#actFlow_1">
<extensionActivity>
<b4s:invoke name="invokeGoalGenerateLicense"
modelReference="http://www.ip-super.org/ontologies/prereview#actInvokeGoalGenerateLicense"
b4s:inputVariable="contentRequest" b4s:outputVariable="contentURL"
b4s:conversation="Packager" />
</extensionActivity>
<extensionActivity>
<b4s:invoke name="invokeGoalGenerateURL"
modelReference="http://www.ip-super.org/ontologies/prereview#actInvokeGoalGenerateURL"
b4s:inputVariable="contentRequest"
b4s:outputVariable="contentLicense"
b4s:conversation="LicenseServer" />
</extensionActivity>
</flow>
<reply> </reply>
</sequence>

SESA Tutorial
85 Seoul, 10 - 14 September
2007

Process Execution Monitoring

SESA Tutorial
86
SUPER Seoul, 10 - 14 September
2007 86
03.09.2007

227
Process Response

Result of the Execution of the Purchase Content Process

SESA Tutorial
87
SUPER Seoul, 10 - 14 September
2007 87
03.09.2007

References

Michael Stollberg
SESA Tutorial
88
Copyright 2007 DERI Innsbruck www.deri.at Seoul, 10 - 14 September
2007

228
References BPM Foundations

[Herzum and Sims 2000] Herzum, P.; Sims, O. (2000): Business Component Factory. John Wiley
& Sons.

[McGovern et al. 2006] McGovern, J.; Sims, O.; Jain, A.; Little, M. (2006): Enterprise Service
Oriented Architectures. Springer, Dordrecht, Netherlands.

[Scheer et al. 2005] Scheer, A.-W.; Thomas, O.; Adam, O. (2005): Process modelling using
event-driven process chains. In: Dumas, M.; van der Aalst, W. M. P.; ter Hofstede, A. H. M.
(Eds.): Process-Aware Information Systems. Wiley, Hoboken, New Jersey, USA, pp. 119146.

[Smith and Fingar 2003] Smith, H.; Fingar, P. (2003): Business Process Management: The Third
Wave. Meghan-Kiffer Press, Tampa, FL, USA, 1st edition.

[Specht et al, 2005] T. Specht, J. Drawehn, M. Thrnert, and S. Khne. Modeling cooperative
business processes and transformation to a service oriented architecture. In 7th International
IEEE Conference on E-Commerce Technology, 2005.

[Teboul 2006] Teboul, J. (2006): Service Is Front Stage: Positioning Services for Value
Advantage. Palgrave Macmillan, New York, USA.

SESA Tutorial
89 Seoul, 10 - 14 September
2007

References BPEL & BPM Technologies

[BEPL 1.1] Andrews, T.; Curbera, F.; Dholakia, H.; Goland, Y.; Klein, J.; Leymann, F.; Liu, K.; Roller, D.; Smith,
D.; Thatte, S.; Trickovic, I.; Weerawarana S.: Business Process Execution Language for Web Services
(BPEL4WS) 1.1. Technical Report, OASIS, 2003.

[OASIS SOA] MacKenzie, C. M.; Laskey, K.; McCabe, F.; Brown, P. F.; Metz, R. : Reference Model for Service
Oriented Architecture 1.0. Technical Report, OASIS. 2006.

[Aalst et al., 2003] Wil M. P. van der Aalst, A. H. M. ter Hofstede, B. Kiepuszewski, and A. P. Barros: Workflow
Patterns. In Distributed and Parallel Databases, 14(3):551, July 2003.

[Mendling and Nttgens, 2006] J. Mendling and M. Nttgens. EPC Markup Language (EPML) - an xml-based
interchange format for event-driven process chains (EPC). In International Journal Information Systems and e-
Business Management (ISeB), 4(3):245263, July 2006.

[Wohed et al, 2002] P. Wohed, Wil M. P. van der Aalst, M. Dumas, and A. H. M. ter Hofstede. Pattern-based
analysis of BPEL4WS. Technical Report FIT-TR-2002-04, Queensland University of Technology, Brisbane,
Australia, 2002.

[Kopp et al, 2006] Oliver Kopp, Tobias Unger, and Frank Leymann. Nautilus event-driven process chains: Syntax,
semantics, and their mapping to bpel. In Proceedings of the 5th GI Workshop on Event-Driven Process
Chains (EPK 2006), pages 85104, Vienna, Austria, 2006.

[Manddell and McIllraith, 2003] Daniel J. Mandell and Sheila A. McIlraith. Adapting BPEL4WS for the Semantic
Web: The Bottom-Up Approach to Web Service Interoperation. In Proceedings of the Second International
Semantic Web Conference (ISWC2003)

SESA Tutorial
90 Seoul, 10 - 14 September
2007

229

You might also like