restful web service composition with jopera process modeling languages have been applied with...
TRANSCRIPT
![Page 1: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/1.jpg)
128 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
RESTful Web Service Compositionwith JOpera
Cesare PautassoFaculty of Informatics
University of Lugano (USI), Switzerlandhttp://www.pautasso.info
![Page 2: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/2.jpg)
©2008 Cesare Pautasso2
• Faculty of Informatics (Opened 2004)• 15 Professors• 63 PhDs & Post-docs
• Excellence in Research• Innovative Teaching
University of Lugano, Switzerland
![Page 3: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/3.jpg)
©2008 Cesare Pautasso3
My Research Interests
Web 2.0Mashups
BusinessProcess
Management
AutonomicComputing
ScientificWorkflow
Management
ServiceOriented
Architectures
SoftwareComposition
CesarePautasso
![Page 4: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/4.jpg)
428 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
RESTful Web Service Compositionwith JOpera
Cesare PautassoFaculty of Informatics
University of Lugano (USI), Switzerlandhttp://www.pautasso.info
![Page 5: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/5.jpg)
528 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
The WS-BPEL process model is layered on top of the service model defined by WSDL 1.1. […] Both the process and its partners are exposed as WSDL services
[BPEL 2.0 Standard, Section 3]
Web Service Composition Today
WSDL 1.1
WS-BPEL 2.0
![Page 6: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/6.jpg)
628 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
RESTful Web Services APIs…
WSDL 1.1
…do not use WSDL 1.1
![Page 7: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/7.jpg)
728 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Compose RESTful Web Services
Compose WSDL Web Services
Use Business Process Modeling Languages
The Goal
Visual Flow Language with Abstract Service Model
Extensible Autonomic Engine Architecture
JOpera
![Page 8: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/8.jpg)
828 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Motivation
REST Introduction
Composing RESTful servicesAbstract Workflows
Concrete Workflows
RESTful Workflows
JOpera Example: Doodle Map Mashup
Discussion, Conclusion, Outlook
Agenda
![Page 9: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/9.jpg)
928 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Web Sites (1992)
HTTP
HTMLWeb Browser
Web Server
(HTTP)
SOAP
ServerClient XMLWSDL
WS-* Web Services (2000)
![Page 10: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/10.jpg)
1028 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
RESTful Web Services (2007)
Client HTTP
PO-XM
L
RSS
JSON
Web Server
WADL
(HTTP)
SOAP
ServerClient XMLWSDL
WS-* Web Services (2000)
![Page 11: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/11.jpg)
1128 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
File Transfer
Shared Data
Remote Procedure CallMessage Bus
Events
Stream
REpresentationalState Transfer
Application Integration Styles vs. REST
![Page 12: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/12.jpg)
1228 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Web Services expose their data and functionality trough resources identified by URI
Uniform Interface Principle: Clients interact with the state of resources through 4 verbs: GET (read), POST (create), PUT (update), DELETE
Multiple representations for the same resource
Hyperlinks model resource relationships and valid state transitions
REST in one slide
R
PUT
DELETE
GET
POST
![Page 13: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/13.jpg)
1328 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Resource addressing through URIHow to interact with dynamic, variable set of URI?
Uniform Interface (GET, POST, PUT, DELETE)Does it help to make the verbs explicit in the workflow?
Multiple resource representationsHow to negotiate the most appropriate representation?
HyperlinksCan the workflow implement state transition logic of a resource and generate new URIs dynamically as processes run to guide the clients invoking them?
Challenges for Composition Languages
![Page 14: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/14.jpg)
1428 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
BPMWorkflow
Languages
RESTfulWeb ServiceComposition
![Page 15: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/15.jpg)
1528 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
1. Abstract WorkflowService invocation technology does not matter
2. Concrete WorkflowExpose service invocation technologies as explicit constructsin the workflow language
3. RESTful WorkflowWorkflow as one kind of resource exposed by a RESTful service
Solution Space BPMWorkflow
Languages
RESTfulWeb ServiceComposition
BPMWorkflow
Languages
RESTfulWeb ServiceComposition
BPMWorkflow
Languages
RESTfulWeb ServiceComposition
![Page 16: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/16.jpg)
1628 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
WSDL 2.0 HTTP Binding can wrap RESTful Web Services
1. Abstract Workflow Example: BPEL/WSDL
R
WSDL 2.0BPEL PUT
DELETE
GET
POST
Operations
HTTP Binding
Op_1Op_2Op_3Op_4
...
<Invoke Op_1>
<Invoke Op_2>
...
<Invoke Op_3>
<Invoke Op_4>
...
Op_1 R PUTOp_2 R GETOp_3 R POSTOp_4 R DELETE
Op URI Method
R PUTR GETR POSTR DELETE
(WS-BPEL 2.0 does not support WSDL 2.0)
![Page 17: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/17.jpg)
1728 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Idea: Make REST interaction primitives first-class language constructs
2. Concrete Workflow: BPEL for REST
R
BPEL for REST PUT
DELETE
GET
POST
...
<Put R>
<Get R>
...
<Post R>
<Delete R>
...
<Put R>
<Get R>
<Post R>
<Delete R>
![Page 18: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/18.jpg)
1828 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
BPEL for REST – New Activities/Handlers
WebService<invoke>
WebService
<invoke>
<receive><reply>
<receive>
R esource
PUT
DELETE
GET
POST
<put><get><post><delete>
<onPut><onGet><onPost>
<onDelete>
![Page 19: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/19.jpg)
1928 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Dynamically publish resources from BPEL processes and handle client requests
BPEL for REST<Resource P>
<onGet>
<Put R>
<Get S>
</onGet>
<Post R>
<Delete S>
</onDelete>
</Resource>
<onDelete>
R
PUT
DELETE
GET
POST
S
PUT
DELETE
GET
POST
P
PUT
DELETE
GET
POST
BPEL for REST – Resource Block
![Page 20: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/20.jpg)
2028 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
3. RESTful WorkflowsP
R
PUT
DELETE
GET
POST
R
PUT
DELETE
GET
POST
Use the resource interface abstraction to publish the state of the workflow
![Page 21: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/21.jpg)
2128 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Publish workflows as resources identified by the URIs:
/package/process
/package/process/version
/package/process/version/instance
/package/process/version/instance/task
/package/process/version/instance/task/parameter
Workflows as Resources – URI
![Page 22: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/22.jpg)
2228 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
GET /package/processEnumerate deployed process versions
GET /package/process/versionEnumerate active instances of a given process version
GET /package/process/version/instanceRead the current state of a workflow instance
GET /package/process/version/instance/taskRead the current state of a workflow instance task
GET /package/process/version/instance/task/paramRead the current value of a workflow instance parameter
Reading the state of the workflow resources
![Page 23: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/23.jpg)
2328 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
POST /packageDeploy new process template into package
POST /package/processDeploy new version of a process
POST /package/process/versionCreate new process instance
Creating new workflow resources
![Page 24: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/24.jpg)
2428 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
PUT /package/process/version/instance/taskUpdate the state of a workflow task (e.g., finished, failed)
PUT /package/process/version/instance/task/paramWrite into task parameters some values
Updating the workflow resource
![Page 25: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/25.jpg)
2528 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
DELETE /package/processUndeploy all versions of a process (and all the corresponding process instances)
DELETE /package/process/versionUndeploy a version of a process (and all of its instances)
DELETE /package/process/version/instanceRemove the state of a specific process instance only
Deleting workflow resources
![Page 26: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/26.jpg)
2628 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Motivation
REST Introduction
Composing RESTful servicesAbstract Workflows
Concrete Workflows
RESTful Workflows
JOpera Example: Doodle Map Mashup
Discussion, Conclusion, Outlook
Agenda
![Page 27: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/27.jpg)
2728 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
JOpera Example: Doodle Map MashupSetup a Doodle with Yahoo! Local search and visualize the results of the poll on Google Maps
![Page 28: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/28.jpg)
2828 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Doodle Map Mashup Architecture
Web Browser WorkflowEngine
RESTfulWeb Services
APIsGET
POST
GET
RES
Tful
API
![Page 29: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/29.jpg)
2928 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
![Page 30: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/30.jpg)
3028 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Why should a workflow engine care about REST? Use workflows to compose RESTful Web services
Implement RESTful services with a workflow
Should a process explicitly include RESTful activities?Or it is better/enough to model REST implicitly?
How much of the state of a process instance should be exposed as a resource?
How to control which “parts” are visible?
Discussion
![Page 31: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/31.jpg)
3128 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Business Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL)
Business Process Modeling Languages should also be applied to compose RESTful Web Services
JOpera for Eclipse is a visual process modeling tool with an extensible engine for composing both kinds of services (and many more)
Conclusion
![Page 32: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/32.jpg)
3228 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
R. Fielding, Architectural Styles and the Design of Network-based Software Architectures, PhD Thesis, University of California, Irvine, 2000
C. Pautasso, O. Zimmermann, F. Leymann, RESTful Web Services vs. Big Web Services: Making the Right Architectural Decision, Proc. of the 17th International World Wide Web Conference (WWW2008), Bejing, China, April 2008
C. Pautaso, BPEL for REST, Proc. of the 7th International Conference on Business Process Management (BPM 2008), Milano, Italy, September 2008
References
![Page 33: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/33.jpg)
©2008 Cesare Pautasso33
PhD positions available!
Prof. Cesare PautassoUniversity of Lugano, Switzerland
[email protected]://www.pautasso.info
![Page 34: RESTful Web Service Composition with JOpera Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process](https://reader034.vdocuments.us/reader034/viewer/2022042223/5ec9834438af8c096868ef88/html5/thumbnails/34.jpg)
3428 November 2008 ©2008 Cesare Pautasso | www.pautasso.info
Second International Workshop on Web APIs and Services Mashups
(Mashups'08)http://icsoc-mashups.org/
Monday, December 1, 2008ICSOC 2008, Sydney, Australia