Semantic Web Services-based Reasoning in the Design of Software Product Lines J. Jeffrey Rusk Research Goals • Encode product configurations from SPL as compositions of Web Services • Enable reasoning approaches to facilitate higher automation of: o Service Discovery o Service Composition o Service Invocation • Evaluation of Web Service Modeling Ontology (WSMO) for the above purposes 2 Motivation • The need to manage variability in SOA designs • Impediments to SPL when considering SOA • Improve Web service discovery, composition, and invocation while retaining the benefits of the SPL approach 3 Presentation Outline • Background o Software Product Lines and Feature Models o Semantic Web Services and WSMO o Orchestration and Choreography • Design and Implementation o Summary of Mappings o Structure of Feature Model o Transformation in ATL o Manual Intervention o Reasoning in WSMX • Running Case and Demonstration • Results • Conclusions 4 Background An approach to integrate the typically non-related fields of: • Software Product Lines • Service Oriented Architecture Leveraging a number of existing approaches: • Feature Modeling • Ontologies (Web Service Modeling Ontology) • Model Driven Development 5 Software Product Lines • The concept of software product line (SPL). • Exploitation of commonality and management of variability • SPL practices, methodologies, and key features 6 Feature Models • Feature diagram and types of features • Relationships and Constraints • Attributes Feature Model Example Feature Model Metamodel Adapted from Kim and Czarnecki (2005) 7 Semantic Web Services • Web Services and Semantic Descriptions • Relation to Ontologies and Reasoning • (Semi-)Automated discovery, composition, invocation, and monitoring • Semantic Descriptions vs. WSDL-based Descriptions • The “Semantic Web” (Berners-Lee et al. 2001) 8 Web Service Modeling Ontology (WSMO) • Semantically describes all relevant aspects of Semantic Web Services (Roman et al. 2005) • Four top-level elements: o Ontologies, Web Services, Goals, and Mediators Abbreviated WSMO Metamodel 9 Choreography and Orchestration • Orchestration: overall executable business process defined through interaction between Web services • Choreography: sequencing of messaging between such executable business processes • • • • Suitability of Orchestration Use of choreography to achieve orchestration Invoking Web services through grounding in choreography Examples in the literature (Gone and Schade 2008; Brambilla et al. 2007) 10 Design and Implementation 11 Summary of Mappings 12 Structure of Feature Models Basic rules from Montero et al. (2008) allow business process information to be represented in the feature model. 13 Transformation in ATL • • • • Creation and loading of source and target metamodels Creation of textual concrete syntax for WSML Navigation of feature model using ATL Output of partial WSML Web service description 14 Manual Intervention importsOntology _"http://io.acad.athabascau.ca/~jeffr#virtual" // TODO: Import Any Domain Ontologies Used ______________________________________________________________________ capability VirtualWholesaleCompositionCapability sharedVariables {} // TODO: Any Shared Variables of Capability precondition definedBy.// TODO: Preconditions of First Service postcondition definedBy.// TODO: Postcondition of Final Service ______________________________________________________________________ transitionRules VirtualWholesaleCompositionTrules // AtlanticTech Web Service forall {?controlstate} with( ?controlstate[oasm#value hasValue oasm#InitialState] memberOf oasm#ControlState) do forall with() do // TODO: AtlanticTech Related Transition Rules endForall delete(?controlstate[oasm#value hasValue oasm#InitialState] memberOf oasm#ControlState) add(?controlstate[oasm#value hasValue oasm#State1] memberOf oasm#ControlState) 15 endForall Sources of Executable WSML WSMO Component Source wsmlVariant and namespace Transformation (+ constants) webService Transformation nfp Transformation and Manual Intervention importsOntology Transformation and Manual Intervention capability Transformation sharedVariables Manual Intervention precondition Manual Intervention postcondition Manual Intervention interface Transformation choreography Transformation stateSignature Transformation transitionRules Transformation and Manual Intervention OASM Ontology Transformation and Manual Intervention Reasoning in WSMX Service Invocation by WSMX ---------Outgoing SOAP message--------<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAPENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <atl:returnPrice xmlns:atl="http://atlantictech.wsmo/"> <arg0>1</arg0> </atl:returnPrice> </SOAP-ENV:Body> </SOAP-ENV:Envelope> ----------End of SOAP message------------------Incoming SOAP message--------<?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:returnPriceResponse xmlns:ns2="http://atlantictech.wsmo/"> <return>545.32</return> </ns2:returnPriceResponse> </S:Body> </S:Envelope> ----------End of SOAP message---------- Process Mediation in WSMX (Choreography) INFO Machine : STEP 1 INFO Machine : Executing forall {?controlstate} with (?controlstate[_"http://www.wsmo.org/ontologies/choreog raphy/oasm#value" hasValue _"http://www.wsmo.org/ontologies/choreography/oasm#I nitialState"] memberOf _"http://www.wsmo.org/ontologies/choreography/oasm#C ontrolState") do add(?controlstate [_"http://www.wsmo.org/ontologies/choreography/oasm# value" hasValue _"http://io.acad.athabascau.ca/~jeffr#State1"]) forall {?input,?request} with (?request[_"http://io.acad.athabascau.ca/~jeffr#quantity" hasValue ?input] memberOf _"http://io.acad.athabascau.ca/~jeffr#ProducerRequest") do add(_# memberOf _"http://io.acad.athabascau.ca/~jeffr#ProducerResponse ") add(_# [_"http://io.acad.athabascau.ca/~jeffr#quantity" hasValue ?input] memberOf _"http://io.acad.athabascau.ca/~jeffr#ShipperRequest") endForall delete(?controlstate [_"http://www.wsmo.org/ontologies/choreography/oasm# 17 value" hasValue Running Case and Demonstration • Hypothetical B2B “Virtual Wholesale” Scenario • 4 producer, 4 shipment, 3 insurance, 2 credit card SOAPbased Web services • Feature Model used to manage the variability • Product configuration represents a potential composition 18 19 20 Results INFO WSMXExecution : Retrieved Goal: http://io.acad.athabascau.ca/~jeffr#VirtualWholesaleGoal INFO WSMXExecution : Retrieved Goal Ontology: http://io.acad.athabascau.ca/~jeffr#VirtualWholesaleGoal INFO AchieveGoalChor : Discovering suitable webservices for: http://io.acad.athabascau.ca/~jeffr#VirtualWholesaleGoal INFO KeywordDiscovery : Keyword discovery - operating on 42 services. INFO LightweightDiscovery : Testing Web service http://io.acad.athabascau.ca/~jeffr#VirtualWholesale INFO AchieveGoalChor : --- Performing Data Mediation; direction: GOAL_TO_WEBSERVICE INFO AchieveGoalChor : ----------- Mediated instances ----------INFO AchieveGoalChor : http://io.acad.athabascau.ca/~jeffr#myCompositionProduct memberOf http://io.acad.athabascau.ca/~jeffr#ProducerRequest INFO Radex : Registering requester choreography INFO Radex : Registering provider choreography INFO LogicalState : Initializing state http://www.wsmx.org/choreography/state_id-0at3062331014347694380#onto _____________________________________________________________________________________________________ INFO AchieveGoalChor : ----------- Final response to requestor ----------namespace { wsml _"http://www.wsmo.org/wsml/wsml-syntax#" } ontology _"http://wsmx.org//responseOntology1783308446288430806" instance _"http://wsmx.org//responseOntology1783308446288430806#tempInst1249566819733_-731343865" memberOf _"http://io.acad.athabascau.ca/~jeffr#PaymentResponse" _"http://io.acad.athabascau.ca/~jeffr#value" hasValue "true" INFO AchieveGoalChor: --- Performing Data Mediation; direction: WEBSERVICE_TO_GOAL INFO AchieveGoalChor: ----------- Mediated instances ----------INFO AchieveGoalChor: http://wsmx.org//responseOntology1783308446288430806#tempInst1249566819733_-731343865 memberOf http://io.acad.athabascau.ca/~jeffr#PaymentResponse INFO WSMXExecution : TIME TAKEN: 3362 ms. 21 INFO WSMXExecution : FINISHED AT 10:53:39 Analysis • Provision of semantic reasoning-based information • WSMX output, while verbose, returns significant reasoning-based information to the developer • Results of keyword-based and lightweight discovery, data mediation, and process mediation • Information not available in the feature modeling environment alone 22 Evaluation • • • • Productivity Ease of Use Scalability Performance Average Percentage of Automation WSML Component Web Service Description Percentage Automatically Generated 76% Capability 47% Interface 82% Goal Description 74% 23 Comparisons • Automation compared to Brambilla et al. (2007) • Focus of reasoning compared to Wang et al. (2007) • Opportunity to annotate feature model with additional information to improve automation; comparisons to Kaviani et al. (2008) and Mohabbati et al. (2009) • Other comparisons 24 Contribution and Uses • Set of mappings and an ATL transformation between feature model and WSMO formalisms. • KM3 metamodel of the WSML language (WSML-Flight variant) • Textual concrete syntax for WSML • Files available to be used as is, improved, or extended for other MDD purposes involving the WSMO language • Further example how SOA and SPL approaches can be integrated to achieve greater results 25 Conclusion • Review of objectives • Proof of concept demonstrating that it is possible to integrate feature model and WSMO formalisms • Ability to facilitate Semantic Web-based reasoning in the design of software product lines, specifically those comprised of Web services 26 Future Research • Contributions to tool support and specifications. • Revise transformation upon completion of WSMO Orchestration specification. • Combine transformation with access to a discovery engine to feature model Goals instead of known Web services. 27 Thank you! Questions? Jeff Rusk MSc Candidate, Athabasca University jrusk2006@hotmail.com More information, including all source code, can be found at the following Website: http://io.acad.athabascau.ca/~jeffr/webdoc.html Acknowledgements The author acknowledges the support of the Alberta Ingenuity Fund as well as Athabasca University through the Graduate Student Research Fund. 28