Building SOA-Based Applications Using Process-Driven Development September 15, 2004

Transcription

Building SOA-Based Applications Using Process-Driven Development September 15, 2004
Building SOA-Based Applications Using
Process-Driven Development
September 15, 2004
Jim Rivera, Senior Principal Technologist,
Office of the CTO, BEA Systems
Service-Oriented Architecture
 SOA - an approach to logic partitioning that maximizes
the re-use of application-neutral services
 Benefits
 Faster Return on Investment (ROI)
 Adaptability
 Types of Services
 Infrastructure
 Business-level
 Payback comes from being able to easily orchestrate
business-level services to implement business
processes, use cases, and composite applications
©2003 BEA Systems, Inc. |
2
Challenges to Service Orchestration
 Mapping real-world business processes to Object-Oriented,
request/response paradigms
 “Object” is the one and only abstraction. This simplicity is both a
blessing and a curse
 Common concepts that do not fit OO mold
 Sequence - before/after paradigm
 Cause and effect – required conditions
 System state
 Long running processes require asynchronous messaging
 Message/request correlation
 Timeout mechanism
 It can be done using traditional techniques, but often leads to
contrived or counter-intuitive code
©2003 BEA Systems, Inc. |
3
Introduction to Process-Driven
Development
 What is it?
 Design elements are process flows, services, and documents
 Requirements expressed as use cases/narratives/user stories
 Still emerging, but practical
 Some tool support
 Why?
 No impedance mismatch between requirements and code
 No impedance mismatch between business and developers
 Is partitionable into units of work based on business function
 Increased system agility with simple refactoring
©2003 BEA Systems, Inc. |
4
Process-Oriented Development
Order Management Process
Service
Orchestration
Web Service
Interfaces
Service
Construction
Processes
Documents
Billing
Service
Customer
Management
Service
Inventory
Management
Service
Services
Resources
Employees
Mainframe
CRM
ERP
©2003 BEA Systems, Inc. |
Trading
Partners
5
Essential Process Framework Features
 Direct mapping to real-world business processes
 Automatic State Management
 Asynchronous Message Correlation
 Multiple Data format support
 Timeout mechanisms
 Enhanced Transaction support
 Receive Multiple Events
 Monitoring & Management
©2003 BEA Systems, Inc. |
6
Services: The Process Nodes
 Characteristics
 Provide high-level business functionality
 Granular, self-contained, re-usable, loosely-coupled, documentdriven
 Web Services are critical
 Cross-platform, XML-based messaging
 Java Controls
 Provide a place for semantic mapping between interface and
technology
 Provide a uniform way of accessing any service or J2EE resource
 Apache Beehive Project
 Service Control Pack
 Open source collection of Java Controls, processes and services
 eBay, Amazon, Google, FedEx, UPS, etc.
©2003 BEA Systems, Inc. |
7
Document-Driven Services
public ResponseDocument getItems(RequestDocument
requestDoc) {
ResponseDocument responseDoc =
ResponseDocument.Factory.newInstance();
Response response = responseDoc.addNewResponse();
try { //Business Logic
response.setStatus(Response.Status.SUCCESS);
}
catch (FinderException fe) {
response.setStatus(Response.Status.ERROR_UNKNOWN);
}
return responseDoc;
}
©2003 BEA Systems, Inc. |
8
Why Documents?
 Correspondence to real world entities
 XML Schema
 Strong typing, rich modeling
 Cross-language, cross-platform
 XML
 Extensible
 Enable coarse-grained interfaces
 Amenable to transformation
 Being able to support data evolution is critical to loosecoupling
©2003 BEA Systems, Inc. |
9
Sharing Documents vs. Objects
 Sharing Object Models is dreadful
 State and function are intermixed
 Not cross language
 Tightly-coupled interaction
 Documents on the other hand…
 Let you slice and dice: XQuery,
XSLT, Data Transforms
 Respect differences across
boundaries
 Loosely-coupled interaction
©2003 BEA Systems, Inc. |
10
Processes are Fundamental
 Processes are executable use cases. There is no impedance
mismatch as with objects.
 Control flow for
 Conditionals
 Loops
 Parallel flows
 Fault handling
 Asynchronous events
 Long running ‘transactions’
 Tools
 Java Process Definition (JPD) files are the first practical
implementation of workflow that jives with Java developers.
 Standard Languages (BPEL and BPELJ) provide investment
protection
©2003 BEA Systems, Inc. |
11
BPEL and BPELJ
 Business process languages have gained importance and
visibility but market growth hampered by customer risk due to
lack of portability
 Breakthrough 1: IBM, Microsoft and BEA announce BPEL4WS
 A merger of IBM's WSFL and MS's XLang
 Immediately recognized as the future of BPM for Web services
 Version 1.1 submitted to OASIS (new official name: WSBPEL)
 (SAP and Siebel Systems added as coauthors)
 Breakthrough 2: IBM & BEA announce BPELJ
 Promised portability for BPEL extension that uses Java in addition
to Web services and XML
©2003 BEA Systems, Inc. |
12
JPD vs. BPEL vs. BPELJ
Java Process
Definition (JPD)
BPEL
BPELJ
Authorship
BEA (before BPEL)
IBM, MS, BEA v1.0 IBM, BEA
(Now in OASIS)
(Now in JSR 207)
Orchestrates
Components
Java & Web
Services
Web Services
Only
Java & Web
Services
Data
XML & Java objects
XML Only
XML & Java
objects
Data
Manipulation
XQuery and Java
XPath 1.0
standard
Others by
extension
XPath and Java
Others by
extension
Syntax
Java with XML
annotation
XML
XML with
embedded Java
©2003 BEA Systems, Inc. |
13
Service-Oriented Architecture
Order Management Process
Service
Orchestration
BPEL
Web Service
Interfaces
Service
Construction
Billing
Service
Customer
Management
Service
BPELJ
Inventory
Management
Service
Resources
Employees
Mainframe
CRM
ERP
©2003 BEA Systems, Inc. |
Trading
Partners
14
Methodology
 Decompose use cases
 Take inventory of re-usable services
 Build atomic services as needed
 Map use cases to processes, sub-processes and
services
 Build processes (wire it up)
 Connect the User (view)
 Web application, worklist, e-mail, etc.
©2003 BEA Systems, Inc. |
15
BEA WebLogic Workshop
Integrated Development
Environment
WebLogic Server Process Edition
Service Monitoring & Management
Business Process Management
Data Mapping
Service Enablement
Application Server (WLS Premium)
WebLogic Server Process
JVM
BEA WebLogic JRockit
©2003 BEA Systems, Inc. |
16
WebLogic Server Process Edition
 Converged BPM functionality with service enablement
for building SOA-based applications using processdriven development
 Includes BPM, data transformation, messaging,
controls, adapters
 Export JPDs to BPEL compliant code
 BPELJ supported in next release
©2003 BEA Systems, Inc. |
17
Demo
©2003 BEA Systems, Inc. |
18
Summary
 SOA promises to reduce the gap between business needs and
technology by making it more efficient to build agile systems…
 But there are numerous challenges to orchestrating services
into business process
 Impedance mismatch between real world process and OO,
request/response techniques
 Process-Driven Development addresses these challenges
 No impedance mismatch between requirements and code, or
business and developers
 Increased system agility with simple refactoring
©2003 BEA Systems, Inc. |
19