- From: Chris Parish <chris.parish@oxfordcc.co.uk>
- Date: Mon, 9 Jan 2006 12:14:39 -0000
- To: <marco.sbodio@hp.com>, "Battle, Steven Andrew" <steve.battle@hp.com>
- Cc: <public-sws-ig@w3.org>
Marco & Steve, Thanks for your comments, these look to be pointing me in the right direction and I now need to get familiarised in more detail with SWRL. A couple of issues though: 1) Do you know of any tools which exist which will help in processing the SWRL rules? For any rule engine I use I believe I need to see the detailed derivation of the automatically composed process so I can identify all the stages of the web composition. Currently I am using such a derivation to build a BPEL process. 2) Once web services have multiple inputs/outputs, I can see in general terms how the use of preconditions/results can be used to define similar constraints for each of the inputs/outputs, but I am not clear how I can then identify which precondition relates to which input. Is there anything specifically in OWL-S to providing this link, or is it just a matter of using then label? Chris -----Original Message----- From: public-sws-ig-request@w3.org [mailto:public-sws-ig-request@w3.org]On Behalf Of Marco Luca Sbodio Sent: 08 January 2006 15:16 To: Battle, Steven Andrew Cc: Chris Parish; public-sws-ig@w3.org Subject: RE: Web Service Composition using OWL-S Hi Steve and Chris, I write some ideas below. Your comments are very welcome. marcos On Thu, January 5, 2006 9:28, Battle, Steven Andrew said: > > Chris, I've suggested a few ideas inline. Hope this helps. > Take with a pinch of salt as nothing is tested. > Steve. > >> -----Original Message----- >> From: public-sws-ig-request@w3.org >> [mailto:public-sws-ig-request@w3.org] On Behalf Of Chris Parish >> Sent: 04 January 2006 13:20 >> To: public-sws-ig@w3.org >> Subject: Web Service Composition using OWL-S >> >> >> I am currently attempting to describe web services using >> OWL-S in such a way that I can perform automatic web service >> composition. >> >> Consider the following simple example. >> >> Ontology >> -------- >> Ontology has a class Person with properties ID1, ID2, Name, >> where ID1/ID2 are integer values and Name is a string. >> >> Web Services >> ------------ >> Two web service operations exist which obtain ID2 given ID1 >> and Name given ID2, ie: >> >> int ID1toID2(int ID1) >> String ID2toName(int ID2) >> >> Composition >> ----------- >> I want to generate a composition which given a person's ID1 >> returns their Name. >> >> >> Currently I am using a custom format to describe the web >> services using the following rules: >> >> (?person hasData ID1) -> (?person hasData ID2) >> (?person hasData ID2) -> (?person hasData Name) >> > > I assume that ID1, ID2, Name here aren't variables but a convention for > asserting that fact that you have ID1, ID2... > You probably need to quote those values and place hasData in a suitable > namespace. :) > Incidentally, you really only need to make a unary assertion about > person here eg. (?person rdf:type eg:hasID1). I think that things are slightly different. Chris writes that he has an Ontology defining Person: [[ Ontology has a class Person with properties ID1, ID2, Name, where ID1/ID2 are integer values and Name is a string. ]] so, it should be something like the following: <ex:Person> <rdf:type> <owl:Class> . <ex:ID2> <rdf:type> <owl:DatatypeProperty> . <ex:ID2> <rdfs:domain> <ex:Person> . <ex:ID2> <rdfs:range> <xsd:int> . <ex:Name> <rdf:type> <owl:DatatypeProperty> . <ex:Name> <rdfs:range> <xsd:string> . <ex:Name> <rdfs:domain> <ex:Person> . <ex:ID1> <rdf:type> <owl:DatatypeProperty> . <ex:ID1> <rdfs:domain> <ex:Person> . <ex:ID1> <rdfs:range> <xsd:int> . The two web services are therefore expressing "mapping of one DatatypeProperty of class Person to another": (WS1): ID1 to ID2 (WS2): ID2 to Name (to be more concrete, you may think of ID1 as the "Passport Number" and ID2 as the "Social Security Number", assuming that both can be expressed as xsd:int). In my understanding, the issue is "how to express in OWL-S the above mappings", or, more explicitly, "how to express in OWL-S the following": - for WS1: given a value of DatatypeProperty ID1 of a Person ?p, then WS1 returns the corresponding value of DatatypeProperty ID2 of the same Person ?p - for WS2: given a value of DatatypeProperty ID2 of a Person ?p, then WS2 returns the corresponding value of DatatypeProperty Name of the same Person ?p My attempt for WS1 is the following: [[ <process:hasInput> <process:Input rdf:ID="ID1in"> <process:parameterType rdf:datatype="&xsd;#anyURI">&xsd;#int</process:parameterType> </process:Input> </process:hasInput> <process:hasLocal> <process:Local rdf:ID="Person"> <process:parameterType rdf:datatype="&xsd;#anyURI">&ex;#Person</process:parameterType> </process:Local> </process:hasLocal> <process:hasPrecondition> <expr:SWRL-Condition> <rdfs:label>ID1(Person, ID1in)</rdfs:label> <expr:expressionLanguage rdf:resource="&expr;#SWRL"/> <expr:expressionBody rdf:parseType="Literal"> <ruleml:_body> <swrlx:datavaluedPropertyAtom swrlx:property="ID1"> <ruleml:var>&thisNamespace;#Person</ruleml:var> <ruleml:var>&thisNamespace;#ID1in</ruleml:var> </swrlx:datavaluedPropertyAtom> </ruleml:_body> </expr:expressionBody> </expr:SWRL-Condition> </process:hasPrecondition> <process:hasOutput> <process:Output rdf:ID="ID2out"> <process:parameterType rdf:datatype="&xsd;#anyURI">&xsd;#int</process:parameterType> </process:Output> </process:hasOutput> <process:hasResult> <process:Result rdf:ID="SuccessfulResult"> <process:inCondition> <expr:SWRL-Condition> <rdfs:label>ID2(Person, ID2out)</rdfs:label> <expr:expressionLanguage rdf:resource="&expr;#SWRL"/> <expr:expressionBody rdf:parseType="Literal"> <ruleml:_body> <swrlx:datavaluedPropertyAtom swrlx:property="ID2"> <ruleml:var>&thisNamespace;#Person</ruleml:var> <ruleml:var>&thisNamespace;#ID2out</ruleml:var> </swrlx:datavaluedPropertyAtom> </ruleml:_body> </expr:expressionBody> </expr:SWRL-Condition> </process:inCondition> <process:withOutput> <process:OutputBinding> <process:toParam rdf:resource="#ID2out"/> <process:valueSource> <process:ValueOf> <process:theVar rdf:resource="#ID2out"/> </process:ValueOf> </process:valueSource> </process:OutputBinding> </process:withOutput> <!-- IMHO there is no effect, so I skip process:hasEffect --> </process:Result> </process:hasResult> ]] What do you think? .................................................................................................. This message and any attachments may contain OCC confidential or proprietary information. If you are an unintended recipient: (i) immediately delete the information contained herein and contact the author; and (ii) do not disclose, distribute, or duplicate any information from this message or any of its attachments.
Received on Monday, 9 January 2006 12:17:18 UTC