wscomp An Approach for the Automated Composition of BPEL Processes Annapaola Marconi ITC–irst / University of Trento Joint work with: P. Bertoli, M. Pistore and P. Traverso wscomps05 – Compiegne -19 September 2005
wscomp Outline Web Service composition Our automated composition framework Experimental evaluation Conclusions
wscomp Web Service Composition End user New Executable Composite Process Combine existing services, available on the Web, to define higher level functionalities. Web Service Protocols reqs...
wscomp Web Service Composition Combine existing services, available on the Web, to define higher level functionalities. End user New Executable Composite Process Web Service Protocols... CUSTOMER FLIGHT HOTEL VIRTUAL TRAVEL AGENCY
wscomp Automated Web Service Composition Component Web Services Composition requirements AUTOMATED COMPOSITION Executable Composite Service The main idea: o Exploit and extend advanced planning techniques to support the automated composition of composite web services planning goal planning domain Plan Planning
wscomp Automated Web Service Composition The planning challenges: o Non-atomic services (complex control flow), nondeterministic domain request (Time, Loc) offer(Time, Cost) cancel FLIGHT register (UserID) confirm ok invalid not-avail
wscomp Automated Web Service Composition The planning challenges: o Non-atomic services (complex control flow), nondeterministic domain o Managing exchanged data (complex data flow)
wscomp Automated Web Service Composition The planning challenges: o Non-atomic services (complex control flow), nondeterministic domain o Managing exchanged data (complex data flow)
wscomp Automated Web Service Composition The planning challenges: o Non-atomic services (complex control flow), nondeterministic domain o Managing exchanged data (complex data flow)
wscomp Automated Web Service Composition The planning challenges: o Non-atomic services (complex control flow), nondeterministic domain o Managing exchanged data (complex data flow)
wscomp Automated Web Service Composition The planning challenges: o Non-atomic services (complex control flow), nondeterministic domain o Data modeling and reasoning, complex data flow o Complex composition requirements: temporal + preferences try to “sell holiday packages” upon failure, do “never a single commit”
wscomp Automated Web Service Composition The planning challenges: o Non-atomic services (complex control flow), nondeterministic domain o Data modeling and reasoning, complex data flow o Complex composition requirements: temporal + preferences try to “sell holiday packages” upon failure, do “never a single commit”
wscomp Automated Web Service Composition The planning challenges: o Non-atomic services (complex control flow), nondeterministic domain o Data modeling and reasoning, complex data flow o Complex composition requirements: temporal + preferences try to “sell holiday packages” upon failure, do “never a single commit”
wscomp Outline Web Service composition Our automated composition framework Experimental evaluation Conclusions
wscomp State Transition Systems WS2STS Σ W1 Σ Wn.. Our service composition framework AUTOMATED COMPOSITION Executable Composite Service ρ Σ || W STS2WS Σ C Planning domain Synthesized plan Component Web Services.. W1 Wn Component services: abstract BPEL4WS + semantic annotations Composite service: executable BPEL4WS Composition requirements: EaGLe requirements language Composition requirements
wscomp Abstract BPEL4WS + Semantic Annotations BPEL4WS: complete and detailed description of the WS protocol Automated composition task: needs a semantic description of the interactions Semantic annotations: o define the outcome of the interaction
wscomp Abstract BPEL4WS + Semantic Annotations BPEL4WS: complete and detailed description of the WS protocol Automated composition task: needs a semantic description of the interactions Semantic annotations: o define the outcome of the interaction o add semantic relations among the exchanged data
wscomp Abstract BPEL4WS + Semantic Annotations BPEL4WS: complete and detailed description of the WS protocol Automated composition task: needs a semantic description of the interactions Semantic annotations: o define the outcome of the interaction o add semantic relations among the exchanged data
wscomp EaGLe requirements language EaGle (Dal Lago, Pistore, Traverso 2002) o a language for temporally extended planning goals in non-deterministic domains o many similarities with CTL o + recovery conditions, second-preference goals
wscomp EaGLe requirements language try to “sell holiday packages” upon failure, do “never a single commit” TryReach C.booked H.booked F.booked C.cost = F.costOf(C.time, C.loc) + H.costOf(F.time, C.loc) Fail DoReach C.not_booked H.not_booked F.not_booked EaGLe formalization
wscomp State Transition Systems WS2STS Σ W1 Σ Wn.. Our service composition framework AUTOMATED COMPOSITION Executable Composite Service ρ Σ || W STS2WS Σ C Planning domain Synthesized plan Component Web Services.. W1 Wn Component services: abstract BPEL4WS processes Composite service: executable BPEL4WS process Composition requirements: EaGLe requirements language Composition requirements
wscomp Our service composition framework AUTOMATED COMPOSITION Σ || STS2WS Σ C Planning domain Synthesized plan Component Web Services.. W1 Wn WS2STS Σ W1 Σ Wn.. State Transition Systems WS2STS – from web services to formal models: o support all BPEL4WS basic and structured activities o !!! deal with DATA (knowledge level planning) Composition requirements ρ Executable Composite Service W
wscomp Knowledge Level Planning Reasoning on the data values exchanged by the web services participating to the composition Remark: neither actual data values nor actual definition of functions are important! Key challenge: define a suitable knowledge base s.t.: o KL models can be automatically extracted from BPEL processes o automated composition can be done for a relevant set of realistic problems o composite BPEL process can be automatically extracted from the plan o efficient composition
wscomp Knowledge Level Planning Knowledge Base Propositions: o KV(x) “we know the value of x” o K(x = y) “we know that x and y have the same value” o K(x = f (y 1,.., y n )) “we know that x has the value of f applied to y 1,.., y n ” where x, y, y 1,.., y n are BPEL variables and f is a user defined function. Knowledge Base Actions: o del (KB, p 1,.., p n ) is the knowledge base KB \ {p 1,.., p n } o add (KB, p 1,.., p n ) is the knowledge base KB U {p 1,.., p n } o close (KB) is the knowledge base containing all propositions that can be deduced from the propositions in KB
wscomp Knowledge Level Planning KB evolution: a simple example Suppose that: o r, v, z : Request and o, w : Offer are BPEL variables o costOf(Request, Offer) is a BPEL function (of the Hotel WS) o KB 0 = { KV(v), K(r = z)} is the ‘current’ knowledge base Are executed the following actions: o request (r v) o o : = costOf (r) o offer(o w)
wscomp Knowledge Level Planning KB evolution: a simple example request(r v) on KB 0 preconditions: o KV(v) effects: o KB’ 0 = del (KB 0,..all props on r) = { KV(v) } o KB’’ 0 = add (KB’0, K(r = v)) = { KV(v), K(r = v)} o KB 1 = close (KB’’ 0 ) = { KV(v), K(r = v), KV(r)} KB 0 = { KV(v), K(r = z)}
wscomp Knowledge Level Planning KB evolution: a simple example o := costOf(r) on KB 1 preconditions: o none effects: o KB’ 1 = del (KB 1,..all props on o) = { KV(v), K(r=v), KV(r) } o KB’’ 1 = add (KB’ 1, K(o = costOf(r))) = { KV(v), K(r=v), KV(r), K(o=costOf(r))} o KB 2 = close (KB’’ 1 ) = { KV(v), K(r=v), KV(r), K(o=costOf(r)), K(o=costOf(v))} KB 1 = {KV(v), K(r = v), KV(r)}
wscomp Knowledge Level Planning KB evolution: a simple example offer(o w) on KB 2 preconditions: o none effects: o KB’ 2 = del (KB 2,..all props on w..) = { KV(v), K(r=v), KV(r), K(o=costOf(r)), K(o=costOf(v)) } o KB’’ 2 = add (KB’ 2, K(w = o), KV(w)) = { KV(v), K(r=v), KV(r), K(o=costOf(r)), K(o=costOf(v)), K(w=o), KV(w)} o KB 3 = close (KB’’ 3 ) = { KV(v), K(r=v), KV(r), K(o=costOf(r)), K(o=costOf(v)), K(w=o), KV(w), KV(o), K(w=costOf(r), K(w=costOf(v)} KB 2 = {KV(v), K(r = v), KV(r), K(o=costOf(r)), K(o=costOf(v))}
wscomp Our service composition framework AUTOMATED COMPOSITION Σ || STS2WS Σ C Planning domain Synthesized plan Component Web Services.. W1 Wn WS2STS Σ W1 Σ Wn.. State Transition Systems WS2STS – from web services to formal models: o support all BPEL4WS basic and structured activities o !!! deal with DATA (knowledge level planning) Composition requirements ρ Executable Composite Service W
wscomp Our service composition framework AUTOMATED COMPOSITION STS2WS Σ C Synthesized plan Component Web Services.. W1 Wn WS2STS Σ W1 Σ Wn.. State Transition Systems Obtaining the planning domain: o Σ ║ is a STS representing all the possible behaviors of the component services Composition requirements ρ Executable Composite Service W Σ || Planning domain
wscomp Our service composition framework AUTOMATED COMPOSITION STS2WS Σ C Component Web Services.. W1 Wn WS2STS Σ W1 Σ Wn.. State Transition Systems Composition requirements ρ Executable Composite Service W Σ || Planning domain Synthesizing the plan: o Planning via Symbolic Model Checking (MBP Planner - NuSMV) Synthesized plan
wscomp Our service composition framework Composition requirements AUTOMATED COMPOSITION Executable Composite Service ρ Σ || W STS2WS Σ C Planning domain Synthesized plan Component Web Services.. W1 Wn WS2STS Σ W1 Σ Wn.. State Transition Systems STS2WS – Obtaining the executable composite process: o ready for deployment and run o particular care to code quality
wscomp Outline Web Service composition Our automated composition framework Experimental evaluation Conclusions
wscomp Experiment set 1: Atomic WS Composition
wscomp Experiment set 2: More complex WS Composition
wscomp Experimenting with realistic applications Number of ComponentsComposition Time H&F H&F&C secs 75.0 secs WMO1 WMO2 WMO secs secs secs On the H&F problem: o Time: automated composition: 10 secs manual coding: 1 hour o Quality automated composition: 22K bytes manual coding: 11K bytes
wscomp Outline Web Service composition Our automated composition framework Experimental evaluation Conclusions
wscomp Conclusions The proposed composition framework has been implemented within the ASTRO toolset:
wscomp Conclusions The proposed composition framework has been implemented within the ASTRO toolset: ASTRO toolset supports:.. of composite business processes AUTOMATED COMPOSITION FORMAL VERIFICATION RUN-TIME MONITORING
wscomp Some publications Planning Framework for Web Service Composition o M. Pistore, P. Traverso, P. Bertoli Automated Composition of Web Services by Planning in Asynchronous Domains International Conference on Automated and Planning Sheduling (ICAPS) 2005 Managing exchanged data o M. Pistore, A. Marconi, P. Bertoli, P. Traverso Automated Composition of Web Services by Planning at the Knowledge Level International Joint Conference on Artificial Intelligence (IJCAI) 2005 Semantic Web Service Composition o P. Traverso, M. Pistore Automatic Composition of Semantic Web Services into Executable Processes International Semantic Web Conference (ISWC) 2004 Composition Verification o R. Kazhamiakin, M. Pistore A Parametric Communication Model for the Verification of BPEL4WS Compositions 2nd International Workshop on Web Services and Formal Methods (WS-FM)
wscomp Q Q A A & & An Approach for the Automated Composition of BPEL Processes
wscomp COMPOSITE WS VERIFICATION o R. Kazhamiakin, M. Pistore A Parametric Communication Model for the Verification of BPEL4WS Compositions 2nd International Workshop on Web Services and Formal Methods (WS-FM) 2005 o R. Kazhamiakin, M. Pistore, M. Roveri A framework for integrating Business Processes and Business Requirements 9th International IEEE Enterprise Distributed Object Computing Conference (EDOC) 2004 o M. Pistore, M. Roveri, P. Busetta Requirements-Driven Verification of Web Services 1st International Workshop on Web Services and Formal Methods (WS-FM) 2004 o R. Kazhamiakin, M. Pistore, M. Roveri Formal Verification of requirements using SPIN: A Case Study on Web Services 3rd IEEE International Conference on Software Engineering and Formal Methods (SEFM) 2004
wscomp SERVICE SYNTHESIS AND COMPOSITION o M. Pistore, A. Marconi, P. Bertoli, P. Traverso Automated Composition of Web Services by Planning at the Knowledge Level International Joint Conference on Artificial Intelligence (IJCAI) 2005 o M. Pistore, P. Traverso, P. Bertoli, A. Marconi Automated Synthesis of Composite BPEL4WS Web Services 3rd IEEE International Conference on Web Services 2005 o M. Pistore, P. Traverso, P. Bertoli, A. Marconi Automated Synthesis of Executable Web Serivce Compositions from BPEL4WS Processes Poster presentation at the International World Wide Web Conference (WWW) 2005 o M. Pistore, P. Traverso, P. Bertoli Automated Composition of Web Service by Planning in Asynchronous Domains International Conference on Automated and Planning Sheduling (ICAPS) 2005 o M. Pistore, F. Barbon, P. Bertoli, D. Shaparau, P. Traverso Planning and Monitoring Web Service Composition Artificial Intelligence: Methodology, Systems, Application (AIMSA) 2004 Also: ICAPS'04 Workshop on Planning and Scheduling for Web and Grid Services
wscomp SEMANTIC WEB SERVICES o M. Pistore, P. Roberti, P. Traverso Process-Level Composition of Executable Web Services: "On-the-fly" Versus "Once-for-all" Composition European Semantic Web Conference (ESWC) 2005 o P. Traverso, M. Pistore Automatic Composition of Semantic Web Services into Executable Processes International Semantic Web Conference (ISWC) 2004