soa & bpel
DESCRIPTION
TRANSCRIPT
![Page 1: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/1.jpg)
SOA & BPEL:Building a Service With BPEL
and the Java EE Platform
![Page 2: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/2.jpg)
Agenda
This session describes how
developers using Java™ Platform,
Enterprise Edition can create
composite applications using BPEL
with current Java EE tools and
application servers that support Java
Business Integration
![Page 3: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/3.jpg)
Agenda
Why Services Why Composite Applications BPEL in the Mix A Java EE Based Composite Application Summary
![Page 4: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/4.jpg)
Why Services?
SOA = an architectural principle for structuring systems that
SOA emphasizes the de-coupling of system components
New services are created from existing ones in a synergistic fashion
Strong service definitions are critical Services can be subsequently re-composed in
response to changing business requirements
![Page 5: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/5.jpg)
What Are Services?
A function accessed using XML message exchange
Message exchanges have well known exchange patterns
Services are self-describing, usingmetadata (WSDL)
![Page 6: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/6.jpg)
What Does a Service Do?
Transform data Route messages Query databases Orchestrate conversations Apply business logic Apply business policy Handle business exceptions Solicit approvals …
![Page 7: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/7.jpg)
How Is a Service Implemented?
• XSLT• Enterprise JavaBeans™ (EJB™) technology• BPEL• SQL• XQuery• Routing table• Business rules• EDI transform• …
![Page 8: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/8.jpg)
Service Oriented Architecture
In April 2006 the Object Management Group's (OMG) SOA Special Interest Group adopted the following definition for SOA Service Oriented Architecture is an architectural style for a Community of providers and consumers of services to achieve mutual value, that
– Allows participants in the communities to work together with minimal co-dependence or technology dependence
– Specifies the contracts to which organizations, people and technologies must adhere in order to participate in the community
– Provides for business value and business processes to be realized by the community
– Allows for a variety of technologies to be used to facilitate interactions within the community
![Page 9: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/9.jpg)
Service Oriented Architecture
In March 2006 the OASIS group SOA Reference Model released its first public review draft.
This defines the basic principles of SOA that apply at all levels of a service architecture, from business vision through to technical and infrastructure implementation
– Service Oriented Architecture; a paradigm for organizing and utilizing distributed capabilities that may be under the control of different ownership domains.
– It provides a uniform means to offer, discover, interact with and use capabilities to produce desired effects consistent with measurable preconditions and expectations
![Page 10: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/10.jpg)
Principles of SOA
Services share a formal contract Services are loosely coupled Services abstract underlying logic Services are composable Services are reusable Services are autonomous Services are stateless Services are discoverable
![Page 11: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/11.jpg)
Benefits of SOA
Flexible (Agile) IT– Adaptable to changing business needs
Faster time to market– Reuse existing code, minimize new development
Business and process-driven– New business opportunities
Greater ROI– Leverage existing IT asset
![Page 12: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/12.jpg)
Composite Applications
Composite applications are...applications! Comprised of heterogeneous parts
– Some existing parts– Some new parts
Composite applications != SOA Composite applications employ SOA principles
– Features exposed as Web services– Standards-based interaction between services– Described by standards-based artifacts– Are themselves composable
![Page 13: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/13.jpg)
Purchase Service
![Page 14: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/14.jpg)
![Page 15: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/15.jpg)
Purchase Service Functions
![Page 16: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/16.jpg)
Composite Applications—Summary
A composite application is a collection of existing and independently developed applications and new business logic, orchestrated together into a brand new solution of a business problem that none alone can solve
Such an application looks to the user like a regular new interactive application, yet in reality it may be only 10 percent new and 90 percent an assembly of pre-existing components or data;
The “glue” that brings a composite application together is integration technology
![Page 17: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/17.jpg)
WS-BPEL Works With WSDLWeb Services Business Process Execution Language
Web services are described in WSDL– Operations are message exchanges– Each operation represents an individual unit of action
We need a way to orchestrate these operations with multiple web services in the right order to perform a Business process
– Sequencing, conditional behavior etc.
BPEL provides standard-based orchestration of these operations
![Page 18: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/18.jpg)
What is BPEL?
XML-based language used to specify business processes based on Web Services
BPEL processes describe– Long running, stateful, transactional, conversations
between two or more partner web services BPEL is key to implementing SOA Big Rules
– Conversational– Mostly Async– XML Document-based– Orchestrated
![Page 19: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/19.jpg)
BPEL Is a Web ServiceSequencing Language
Process defines “conversation” flow chart– Conversation consists of only WSDL-described
message exchanges– BPEL provides and consumes WSDL defined
services Process instance is a particular conversation
following the chart– Execution systems can support multiple
concurrent conversations
![Page 20: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/20.jpg)
BPEL “Fixes” WSDL
WSDL: unordered set of operations– Operations are message exchanges
• Need rules for ordering • Support for sequencing • Support for concurrency • Choreography with external entities
![Page 21: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/21.jpg)
Orchestration vs. Choreography
Orchestration– An executable business process describing a flow from the
perspective and under control of a single endpoint (commonly: Workflow)
– BPEL handles Orchestration
Choreography (WSDL)– The observable public exchange of messages, rules of
interaction and agreements between two or more business process endpoints
– WSDL handles Choreography
![Page 22: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/22.jpg)
BPEL: Relationship to Partners
![Page 23: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/23.jpg)
Business Process Needs To...
Co-ordinate asynchronous communication between services
Correlate message exchanges between parties
Implement parallel processing of activities
Implement compensation logic(Undo operations)
Manipulate/transform data between partner interactions
Support for long running business transactions and activities
Handle exception handling Need for universal data
model for message exchange
![Page 24: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/24.jpg)
BPEL Document Structure
![Page 25: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/25.jpg)
BPEL Activities
Basic Activities• <invoke>• <receive>• <reply>• <assign>• <throw>• <wait>• <empty>
Structured Activities• <sequence>• <while>• <pick>• <flow>• <scope>• <compensate>• <switch>• <link>
![Page 26: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/26.jpg)
BPEL: Basic Activities
<invoke> To invoke a one-way or request/response operation on a
portType offered by a partner <receive>
To do a blocking wait for a matching message to arrive Can be the instantiator of the business process
<reply> To send a message in reply to a message that was
received through a <receive> The combination of a <receive> and a <reply> forms a
request-response operation on the WSDL portType for the process
![Page 27: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/27.jpg)
BPEL: Basic Activities
<assign>– Can be used to update the values of variables with new data
<throw>– Generates a fault from inside the business process
<wait>– Allows you to wait for a given time period or until a certain time
has passed <empty>
– Allows you to insert a "no-op" instruction into a business process– This is useful for synchronization of concurrent activities, for
instance
![Page 28: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/28.jpg)
BPEL: Structured Activities
• <sequence> Perform activities in sequential order
• <flow> Perform activities in parallel
• <switch> Conditional choice of activities
• <scope> Enclose multiple activities in a single scope
![Page 29: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/29.jpg)
Example Business Process
![Page 30: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/30.jpg)
Sample Activities in BPEL
![Page 31: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/31.jpg)
BPEL: Relationship to Partners
![Page 32: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/32.jpg)
Why Do You Care on BPEL?
• In SOA-enabled environment, you are more likely to
build an application by orchestration various services
via BPEL
• You will probably use BPEL design tool to create a
BPEL document
• The BPEL document is then executed by BPEL
engine– Highly likely in JBI enabled platform
![Page 33: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/33.jpg)
Example ScenarioThe Loan Processing Composite Application
![Page 34: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/34.jpg)
![Page 35: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/35.jpg)
WSDL: Schema Types (1)LoanProcessor.wsdl
![Page 36: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/36.jpg)
WSDL: Schema Types (1)LoanProcessor.wsdl
![Page 37: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/37.jpg)
![Page 38: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/38.jpg)
BPEL Header
![Page 39: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/39.jpg)
BPEL: Partner Links & Variables
![Page 40: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/40.jpg)
BPEL: Partner Links & Variables
![Page 41: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/41.jpg)
BPEL: …the Decision
![Page 42: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/42.jpg)
BPEL: …the Decision, Reply
![Page 43: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/43.jpg)
Loan Processor Service (EJB 3)
![Page 44: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/44.jpg)
What Are the Artifacts?
![Page 45: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/45.jpg)
Service Consumption (Java APIs)for XML Web Services (JAX-WS 2.0)
![Page 46: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/46.jpg)
Runtime: Java EE Platformand Java Business Integration
Java Business Integration serves as messaging infrastructure Java EE web services interact through Java Business
Integration Java Business Integration bindings allow remote consumers
and providers Add other service technologies as Java Business
Integration components Transparent to programmer using Java EE
technology Reuse without re-coding
![Page 47: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/47.jpg)
Java Business Integration (JSR 208)
![Page 48: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/48.jpg)
![Page 49: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/49.jpg)
Web Service Orchestration
Author, design, deploy and test business processes with the BPEL Designer
– Supports the BPEL 2.0 constructs– Adds powerful methods for visual authoring– Step through debugging support– Built in testing capability for unit testing
BPEL Mapper for BPEL variable assignments– Quickly generate XPath expressions
Deploy to the built in BPEL engine– Running as a service engine in the JBI environment within
the provided Sun Java System Application Server
![Page 50: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/50.jpg)
Summary
SOA enables flexible and agile enterprise application architecture
Services can be created and used using a variety of Java EE technologies
BPEL is a service orchestration language for creating stateful composite applications
Services can be re-implemented using other technologies as long as service interface is preserved without changing consumers
Java Business Integration is the enabling infrastructure
![Page 51: Soa & Bpel](https://reader036.vdocument.in/reader036/viewer/2022062319/553a97f14a79592d278b45a3/html5/thumbnails/51.jpg)
Questions?