INT-9: Implementing ESB Processes with OpenEdge ® and Sonic
Download
Report
Transcript INT-9: Implementing ESB Processes with OpenEdge ® and Sonic
INT-9: Implementing ESB Processes
with OpenEdge® and Sonic™
David Cleary
Principal Software Engineer
Agenda
Developing Business Processes
Technology Overview
Developing a Business Process from Start to
Finish
2
INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Audience Expectations
Understanding of tools and technologies used
Familiarity of thought process in creating a
3
business process
Complete script of the demo shown
INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Products Used
OpenEdge 10.1B01
•
•
•
•
OpenEdge Architect
ProxyGen
OpenEdge Adapter for Sonic ESB®
OpenEdge Adapter for SonicMQ®
Sonic Workbench 7.5
• SonicMQ
• Sonic ESB
4
INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Sonic and the OpenEdge Adapter for Sonic
ESB
ESB
Process
Partner
System
Packaged
Application
Enterprise Service Bus
ESB
Adapter
OpenEdge
AppServer™
5
INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Why Sonic ESB and the OpenEdge
Application Server
AppServer Web Service interface is not what you
want
• Transformation
Need to route message to different services based on
context
• CBR
Combination of the above
• Multi-step business process
Advanced Web Services standards
• WS-Addressing
• WS-Security
6
INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Communication Models
Partner
System
Web
Services
Packaged
Application
Rest
Enterprise Service Bus
ESB
Adapter
AppServer
7
INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Web Services
SOAP- based Web Services
Web Services
Consumer
HTTP Request(SOAP)
HTTP Reply(SOAP)
Sonic
OpenEdge Java™
.NET™
8
Perl
WSDL
Web Services
Provider
Sonic
OpenEdge Java
.NET
Perl
An application that can be accessed using SOAP over HTTP where
the interface is described using WSDL
Standards defined by the W3C
INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
REST – Representational State Transfer
Rest- based Web Services
REST
Consumer
9
HTTP Request(XML)
HTTP Reply(XML)
REST
Provider
An application that can be accessed via the HTTP
GET/POST/PUT/DELETE verbs
Message content if any typically in the form of XML as defined by some
XML Schema
INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Designing Interfaces
Public
Interface
Partner
System
Packaged
Application
Web
Services
Rest
Enterprise Service Bus
Public
Interface
ESB
Adapter
Private
Interface
AppServer
10 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Designing Interfaces
Public Interfaces
Web Services vs. REST
• Use SOAP when you can leverage tools
• Use REST for simplicity
Conform to the Industry Recommendations
• Web Services Interoperability Organization (ws-i.org)
• SOAP Encoding deprecated – use Literal
• Use Document instead of RPC for widest client support
Learn WSDL
• Create WSDL to conform to interface you want – make
it as simple as possible – it’s the contract
11 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Designing Interfaces
Private Interfaces
Interface between Sonic and OpenEdge
Service is one or more related operations
Operations should perform a complete unit of work –
make coarse-grained for efficiency
All OpenEdge services are Request-Reply and can
return a fault
RPC/Literal allows mapping of individual parameters
– can use Web Service Invocation Editor easier
Document/Literal allows using transformation of
entire message
12 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Agenda
Developing Business Processes
Technology Overview
Developing a Business Process from Start to Finish
13 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Company Lookup Business Process
Process Entry
Endpoint
OpenEdge
CompanyInfo
Service
Content Based
Router – Stock
Symbol
No
Yes
Stock Quote Web
Service
Process Exit
Endpoint
14 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Configuring Sonic Workbench with OpenEdge
Workbench manages two containers for
development
• Dev.ESB_Core runs Sonic Services
• Dev.ESB_Test will run OpenEdge Services
OpenEdge installed container not used for
development
Classpath and properties on Test container
configured for OpenEdge
15 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Define the Public Interface
Defined by an XML Schema
Use an XML Namespace
• URL if schema can be retrieved at location
• URN if just a name
Create named types for your interface
Define Elements for your types
Many benefits by creating a schema
• Automatic example files
• Eases WSDL creation
16 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Defining and Deploying OpenEdge Services
with ProxyGen
New ESB tab in ProxyGen for 10.1B
• Generates WSM and WSDL files for Sonic
• Deploys them automatically to Sonic Domain
Defines ESB Service
• Creates Endpoints – not underlying Queues
• Optionally deploys service to defined ESB
container
• Sets AppServer URL
17 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Calling OpenEdge Services with a Web
Service Invocation
Easiest way to call an OpenEdge Service
• SOAP message transient – data is what is
important
• Scenario editor allows live testing of service
Add invocation to process
• Use mapping tools to extract input parameters
• Many options on handling results
Scenarios and tracking info help development
18 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Using Sonic Transformation Services
Transformations change results into what you
need
• Save results as example document
• Schema says what you want
• Sonic tools ease style-sheet creation
19 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Using Sonic Routing Services (CBR)
Route messages based on content
• Supports message parts or headers
Routing based on rules files or XPATH
• Rules files written in JavaScript
• No coding required for XPATH
Routing like a CASE statement
• Can route to first true evaluation or all
• Includes default destination
20 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Calling External Web Services
Same process as calling OpenEdge Services
Design for unreliability
Use sub-processes to abstract
implementation
• Easier to create new sub-process if Web
Service goes away
Create Fault process to be flexible
21 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Exposing Business Process to Clients
Process currently has REST interface
• JMS and ABL clients send messages to Entry
Endpoint
• HTTP Direct Acceptor for browser-based
AJAX clients
• Replies specified via JMSReplyTo
Wrap process to expose as SOAP
• Automatic WSDL generation
• Wrap and unwrap steps
22 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Business Process Demo
23 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
In Summary
Design, do not generate, your public interface
• Use REST for JMS and AJAX
• Use SOAP for advanced clients (tools, WSSecurity, etc)
Follow WS-I recommendations
• Use Document-Literal for widest client support
Use sub-processes liberally
Design for unreliability
24 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
For More Information, go to…
PSDN
• Designing and Deploying SOA Applications
on Sonic ESB for the OpenEdge Developer
• PSDN Forum
Education Courses:
• OpenEdge Development with Sonic ESB
• Service Oriented Integration with Sonic ESB
• Using JMS in OpenEdge
25 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Relevant Exchange Sessions
INT-12: Mastering ProDatasets and Native
XML Datatypes with Sonic ESB
SONIC-1: What’s New in Sonic 7.5
INT-3: Realistic Service Oriented
Architecture Approaches
INT-7: Middleware Roadmap and Info
Exchange
26 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Questions?
27 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
Thank you for
your time
28 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation
29 INT-9: Implementing ESB Processes with OpenEdge and Sonic
© 2007 Progress Software Corporation