Oracle SOA Suite Developer's Guide - Reynolds Antony - E-Book

Oracle SOA Suite Developer's Guide E-Book

Reynolds Antony

0,0
41,07 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

In Detail

We are moving towards a standards-based Service-Oriented Architecture (SOA), where IT infrastructure is continuously adapted to keep up with the pace of business change. Oracle is at the forefront of this vision, with the Oracle SOA Suite providing the most comprehensive, proven, and integrated tool kit for building SOA based applications.

Developers and Architects using the Oracle SOA Suite, whether working on integration projects, building composite applications, or specializing in implementations of Oracle Applications, need a hands-on guide on how best to harness and apply this technology.

This book will guide you on using and applying the Oracle SOA Suite to solve real-world problems, enabling you to quickly learn and master the technology and its applications.

The initial section of the book is aimed at providing you with a detailed hands-on tutorial to each of the core components that make up the Oracle SOA Suite; namely the Oracle Service Bus, BPEL Process Manager, Human Workflow, Business Rules, and Business Activity Monitoring. Once you are familiar with the various pieces of the SOA Suite and what they do, the next question will typically be: "What is the best way to combine / use all of these different components to implement a real-world SOA solution?"

Answering this question is the goal of the next section. Using a working example of an online auction site (oBay), it leads you through key SOA design considerations in implementing a robust solution that is designed for change. Though the examples in the book are based on Oracle SOA Suite 10.1.3.4 the book will still be extremely useful for anyone using 11g.

The final section addresses non-functional considerations and covers the packaging, deployment, and testing of SOA applications; it then details how to use Web Service Manager to secure and administer SOA applications.

Use and apply the Oracle SOA Suite in the implementation of real-world SOA applications.

Approach

This book is a comprehensive guide, split into three sections. The initial section of the book provides an introduction to the Oracle SOA Suite and its various components, and will give you a fast-paced hands-on introduction to each of the key components in turn. The next section illustrates the usage of the various components of the SOA Suite to implement a real-world SOA-based solution with the help of an example of an online auction site (oBay). The final section covers other considerations such as the packaging, deployment, testing, security, and administration of SOA applications.

Who this book is for

This book targets developers and technical architects who work in the SOA domain. The primary purpose of the book is to provide them with a "hands on" practical guide to using and applying the Oracle SOA Suite in the delivery of real-world composite applications.

It presumes basic understanding of the concepts of SOA, as well as some of the key standards in this space, including web services (SOAP, WSDL), XML Schemas, and XSLT (and XPath).

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 760

Veröffentlichungsjahr: 2009

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Oracle SOA Suite Developer's Guide
Credits
Foreword
About the authors
About the reviewers
Preface
What this book covers
Section 1: Getting started
Section 2: Putting it all together
Section 3: Other considerations
Who is this book for
Conventions
Reader feedback
Customer support
Downloading the example code for the book
Errata
Piracy
Questions
1. Introduction to Oracle SOA Suite
Service-oriented architecture in short
Service
Orientation
Architecture
Why SOA is different
Terminology
Inter-operability
Extension and evolution
Reuse in place
SOA Suite components
Services and adapters
ESB—service abstraction layer
Oracle Service Bus and Oracle ESB
Service orchestration—BPEL Process Manager
Rules
Security and monitoring—OWSM
Active monitoring–BAM
Business to business—B2B
Complex Event Processing—CEP
SOA Suite architecture
Top level
Component view
Implementation view
A recursive example
JDeveloper
Other components
Service repository and registry
BPA Suite
BPM Suite
Portals and WebCenter
Enterprise manager SOA management pack
Summary
2. Writing Your First Service
Installing SOA Suite
Writing our first BPEL process
Creating an application
Creating a BPEL project
Assigning values to variables
Deploying the process
Testing the BPEL process
Writing our first proxy service
Writing the Echo proxy service
Creating a change session
Creating a project
Creating project folders
Creating service WSDL
Importing a WSDL
Creating our business service
Creating our proxy service
Creating message flow
Activating the Echo proxy service
Testing our proxy service
Summary
3. Service Enabling Existing Systems
Types of systems
Web service interfaces
Technology interfaces
Application interfaces
Java Connector Architecture
Creating services from files
A payroll use case
Reading a payroll file
Starting the wizard
Naming the service
Identifying the operation
Defining the file location
Selecting specific files
Detecting that the file is available
Message format
Defining a native format schema
Using a sample file
Record structure
Choosing a root element
Message delimiters
Record type names
Field properties
Verifying the result
Finishing the wizards
Throttling the file and FTP adapter
Creating a dummy message type
Adding an output message to the read operation
Using the modified interface
Writing a payroll file
Selecting the FTP connection
Choosing the operation
Selecting the file destination
Completing the FTP file writer service
Moving, copying, and deleting files
Generate an adapter
Modify the port type
Modify the binding
Add additional header properties
Adapter headers
Testing the file adapters
Creating services from databases
Writing to a database
Selecting the database schema
Identifying the operation type
Identifying tables to be operated on
Identifying the relationship between tables
Under the covers
Summary
4. Loosely Coupling Services
Coupling
Number of input data items
Number of output data items
Dependencies on other services
Dependencies of other services on this service
Use of shared global data
Temporal dependencies
Reducing coupling in stateful services
Oracle Service Bus design tools
Oracle workshop for WebLogic
Oracle Service Bus Console
Service Bus overview
Service Bus message flow
Virtualizing service endpoints
Moving service location
Selecting a service to call
Virtualizing service interfaces
Physical versus logical interfaces
Mapping service interfaces
Applying canonical form in the service bus
An important optimization
Summary
5. Using BPEL to Build Composite Services and Business Processes
Basic structure of a BPEL process
Core BPEL process
Variables
Partner Links
Messaging activities
Synchronous messaging
Asynchronous messaging
One way messaging
A simple composite service
Creating our Stock Quote service
Import StockService schema
Calling the external web services
Calling the web service
Assigning values to variables
Testing the process
Calling the exchange rate web service
Assigning constant values to variables
Using the Expression builder
Asynchronous service
Using the Wait activity
Improving the stock trade service
Creating the while loop
Checking the price
Using the Switch activity
Summary
6. Adding in Human Workflow
Workflow overview
Leave approval workflow
Creating our workflow process
Defining the workflow task
Specifying task parameters
Specifying task assignment and routing policy
Initializing the workflow parameter
Creating the user interface to process the task
Running the workflow process
Processing tasks with the worklist application
Improving the workflow
Dynamic task assignment
Assigning tasks to multiple users or groups
Cancelling or modifying a task
Withdrawing a task
Modifying a task
Difference between task owner and initiator
Requesting additional information about a task
Managing the assignment of tasks
Reassigning reportee tasks
Reassigning your own task
Delegating tasks
Escalating tasks
Using rules to automatically manage tasks
Setting up a sample rule
Summary
7. Using Business Rules to Define Decision Points
Business Rule concepts
Leave approval rule
Using the Rule Author
Creating a Rule Repository
Creating a dictionary
Defining facts
Creating XML Facts
Using aliases
Hiding facts and properties
Saving the rule dictionary
Creating a rule set
Adding a rule to our rule set
Creating the If clause
Choosing the pattern
Defining the test for the pattern
Creating the Then clause
Creating a Decision Service
Creating a Rule Engine Connection
Using a file based repository
Using a WebDAV repository
Creating a Decision Service
Adding a Decide activity
Assigning facts
Using functions
Importing Java classes as facts
Creating a function
Invoking a function from within a rule
Summary
8. Building Real-time Dashboards
How BAM differs from traditional business intelligence
Oracle BAM scenarios
BAM architecture
Logical view
Physical view
Capture
Store
Process
Deliver
BAM platform anomaly
User interface
Monitoring process state
Defining data objects
A digression on populating data object fields
Instrumenting BPEL
Testing the events
Creating a simple dashboard
Monitoring process status
Monitoring KPIs
Summary
9. oBay Introduction
oBay requirements
User registration
User login
Selling items
List a new item
Cancel listing
Completing the sale
View account
Buying items
Search for items
Bidding on items
Defining our blueprint for SOA
Architecture goals
Typical SOA architecture
Application services layer
Virtual services layer
Business services layer
Functional type
Service consumer
Business process
User Interface layer
One additional layer
Where the SOA Suite fits
oBay high-level architecture
oBay Application services
Workflow services
External web services
oBay developed services
oBay internal virtual services
oBay business services
oBay business processes
oBay user interface
Downloading and installing oBay application
Summary
10. Designing the Service Contract
Using XML Schema to define business objects
Modelling data in XML
Data decomposition
Data hierarchy
Data semantics
Use attributes for metadata
Schema guidelines
Element naming
Name length
Compound names
Naming standards
Namespace considerations
Always specify a target namespace
Default namespace
Qualified or unqualified element names
Qualified or unqualified attributes
Namespace prefixes
Global versus local
Elements versus types
Partitioning the canonical model
Single namespace
Multiple namespaces
Separate common objects into their own namespace
Chameleon namespaces
Disadvantages of chameleon namespace
Using WSDL to define business services
Use document (literal) wrapped
Building your abstract WSDL document
WSDL namespace
Defining the 'wrapper' elements
Importing canonical model
Defining the 'message' elements
Defining the 'portType' element
Using XML Schema and the WSDL within BPEL PM
Sharing XML Schemas across BPEL processes
Deploying schemas to the BPEL server
Importing schemas
Updating the schema URL
Importing the WSDL document into BPEL PM
Adding the PartnerLink definition to the abstract WSDL
Sharing XML Schemas in the service bus
Importing the WSDL document into the service bus
Strategies for managing change
Major and minor versions
Service implementation versioning
Schema versioning
Change schema location
Update schema version attribute
Resist changing the schema namespace
WSDL versioning
Incorporating changes to the canonical model
Changes to the physical contract
Updating the service endpoint
Managing the service lifecycle
Summary
11. Building Business Services
Build versus reuse
Adapters and web service wrappers
Adapters
Service wrappers
Reusing existing functionality directly
Exposing a PL/SQL stored procedure as a service
Launching the PL/SQL web service wizard
Choosing the level of Java Enterprise Edition support
Selecting a database connection and defining service bindings
Determine message style
Select stored procedures and functions to expose
Modifying existing functionality using service bus
Converting an existing service to canonical form
Create a new service interface
Adding the non-canonical service
More complex conversions
Exposing a Java class as a service
Wrapping the Java code

Launching the Web Service wizard
Select deployment platform
Select service name
Select message format
Provide custom serializers
Mapping
Select methods
Creating services from scratch
Creating a Java service from a WSDL
Starting the wizard
Choosing the WSDL
Choosing the mapping options
The generated Java
Summary
12. Building Validation into Services
Using XML Schema validation
Strongly typed services
Loosely typed services
Combined approach
Using schema validation within BPEL PM
Validation of inbound documents
Validation of outbound documents
Validation between BPEL processes
Validation for synchronous interactions
Validation for asynchronous interactions
Setting validateXML for a BPEL domain
Setting validateXML for a PartnerLink
Using schema validation within the service bus
Validation of inbound documents
Validation of outbound documents
Using Schematron for validation
Overview of Schematron
Assertions
Rules
Patterns
Namespaces
Schema
Intermediate validation
Cross field validation
Using XPath predicates in rules
Using XPath 2.0 functions
Date validation
Element present
Using Schematron within BPEL PM
Creating a Partner Link for the Validation Service
Creating a Schematron file
Invoking the validate operation
Assigning the instanceFile
Assigning the ruleFile
Sharing a Schematron between processes
Using Schematron with the service bus
Putting validation in the underlying service
Using Business Rules for validation
Coding in validation
Returning validation failures in synchronous services
Defining faults
Custom fault codes
Validation failures in asynchronous services
Layered validation considerations
Dangers of over validation
Dangers of under validation
Negative coupling of validation
Summary
13. Error Handling
Business faults
Defining faults in synchronous services
Defining faults in asynchronous services
Handling business faults in BPEL
Catching faults
Adding a catch branch
Throwing faults
Compensation
Defining compensation
Triggering a compensation handler
Adding a compensate activity
Returning faults
Asynchronous considerations
Using the fault management framework
Defining a fault policy
Defining fault policy conditions
Specifying the <faultName>
Specifying the <condition>
Defining fault policy actions
Retry action
Human intervention action
Re-throw action
Abort action
Replay scope action
Java action
Binding fault policies
Binding fault polices at the process level
Defining bindings on the process
Defining bindings on the PartnerLink
Binding fault policies at the domain level
Binding resolution
Human intervention in BPEL Console
Change the input variable contents and retry
Set the output variable and continue
Handling faults within the service bus
Handling faults in synchronous proxy services
Raising an error
Defining an error handler
Adding a route error handler
Checking the type of SOAP Faults
Getting the qualified fault name
Creating a SOAP Fault
Handling unexpected faults
Returning a SOAP Fault
Adding a Service Error Handler
Handling permanent faults
Generating alerts
Enabling alerts
Handling transient faults
Retrying non-responsive business service
Handling faults in one-way proxy services
Summary
14. Message Interaction Patterns
Message routing
WS-Addressing
Request message with WS-Addressing
Response message with WS-Addressing
Additional message exchanges
Using BPEL correlation sets
Using correlation sets for multiple process interactions
Defining a correlation set property
Defining correlation set
Using correlation sets
Initializing the correlation set
Defining property aliases
Message aggregation
Message routing
Correlating the callback
Specifying the reply to address
Creating a proxy process
Using the pick activity
Defining the correlation sets
Completing the aggregation
Scheduling services
Defining the schedule file
Using FlowN
Accessing branch specific data in FlowN
Dynamic Partner Links
Define common interface
Define Job Partner Link
Create endpoint reference
Update Endpoint
Re-cycling the scheduling file
Summary
15. Workflow Patterns
Managing multiple participants in a workflow
Using multiple assignment and routing policies
Determining the outcome by a group vote
Assigning participants
Skipping the second step
Sharing attachments and comments
Deciding on the outcome
Using multiple Human Tasks
Linking individual Human Tasks
Using the workflow API
Defining the order fulfillment Human Task
Specifying task parameters
Specifying the routing policy
Notification settings
Querying task instances
Defining a Partner Link for the Task Query Service
Modifying TaskQueryServiceInterface.wsdl
Modifying TaskQueryService.wsdl
Creating the Task Query Service PartnerLink
User authentication
Create credential element
Querying tasks
Specifying the Display Column List
Flex fields
Populating Flex Fields
Accessing Flex fields
Specifying the query predicate
Using Flex fields in the query predicate
Ordering the data
Getting task details
Updating a task instance
Defining a PartnerLink for the Task Service
Using the updateTask operation
Updating the task payload
Updating the task Flex fields
Updating the task outcome
Summary
16. Using Business Rules to Implement Services
How the rule engine works
Asserting facts
Executing the ruleset
Rule activation
Rule firing
Retrieve result
Session management
Debugging a ruleset
Using DM.println to add additional logging
Using business rules to implement an auction
Defining our XML Facts
Defining the decision service
Using a global variable to reference the result set
Defining a global variable
Defining a rule to initialize a global variable
Writing our auction rules
Evaluating facts in date order
Checking for non-existent fact
Using Calendar functionality
Updating the bid status
Using inference
Processing the next valid bid
Using functions to manipulate XML Facts
Asserting a winning bid
Retracting a losing bid
Rules to process a new winning bid
Validating the next bid
Rule to process a losing bid
Capping the winning bid amount
Complete ruleset
Performance considerations
Managing state within the BPEL process
Using functions to control the assertion of facts
Summary
17. The Importance of Bindings
The web services stack
Logical view of web services stack
Physical view of web services stack
Understanding Web Service Description Language (WSDL)
How to read WSDL
<definitions>
<types>
<message>
<portType>
<binding>
<service>
The case for different bindings
Connectivity
Transactionality
Performance
JCA bindings
Java bindings
Creating a Java binding
Service bus bindings
Summary
18. Packaging and Deployment
The need for packaging
Problems with moving between environments
Types of interface
Web interfaces
Command line interfaces
SOA Suite packaging
Oracle Service Bus
Oracle BPEL Process Manager
Deploying a BPEL process using the BPEL Console
Deploying a BPEL process using 'ant'
Enabling web service endpoint and WSDL location alteration
Enabling adapter configuration
XML Schema locations
XSL imports
BPEL deployment framework
Creating a deployment plan template
Creating a deployment plan
Attaching a deployment plan to a BPEL suitcase
Modifying ant to use deployment plan
Oracle Web Services Manager (OWSM)
Oracle rules
Business activity monitoring
Commands
Selecting items
Using iCommand
Deployment architectures
SOA Suite deployment architectures

Using an external web server or load balancer
BPEL Process Manager specifics
Web services manager
Console and monitor
Oracle Service Bus
Business activity monitoring
Local hostnames
Summary
19. Testing Composite Applications
SOA Suite testing model
One-off testing
Testing BPEL processes
Testing the service bus
Automated testing
The BPEL test framework
BPEL test suites
Data validation
Deploying the test suite
Running the test suites
Partner link handling in test cases
Simulation of process to process interactions
Baseline scripts
Regression testing
System testing
Composite testing
Component testing
Unit testing
Performance testing
User interface testing
Summary
20. Defining Security and Management Policies
Security and management challenges in the SOA environment
Evolution of security and management
Added complications of SOA environment
Security impacts of SOA
Management and monitoring impacts of SOA
Securing services
Security outside the SOA Suite
Network security
Preventing message interception
Restricting access to services
Declarative security versus explicit security
Security as a facet
Security as a service
Web Services Manager model
Policies
Agents and gateways
Distinctive benefits of gateways and agents
Benefits of gateways
Drawbacks of gateways
Benefits of agents
Drawbacks of agents
Service bus model
Creating gateways and agents
Creating a gateway
Registering gateway services
Creating an agent
Enabling agent services
Defining policies
Creating a new policy template to perform basic authentication
Creating the template
Extracting Credentials
Authenticating a user
Authorizing a user
Saving the pipeline template
Creating a new policy
Creating an agent policy
Creating a gateway policy
Applying a policy through Service Bus Console
Service accounts
Using a service account
Managing service bus user accounts
Service bus roles
Using a role to protect a proxy service
Final thoughts on security
Monitoring services
Monitoring overall service statistics in OWSM
Defining a Service Level Agreement in OWSM
Other monitoring and measuring features in OWSM
Monitoring in service bus
Creating an Alert Destination
Enabling service monitoring
Creating an alert rule
Monitoring the service
What makes a good SLA
Summary
Index

Oracle SOA Suite Developer's Guide

Matt Wright

Antony Reynolds

Oracle SOA Suite Developer's Guide

Copyright © 2009 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: March 2009

Production Reference: 1120309

Published by Packt Publishing Ltd.

32 Lincoln Road

Olton

Birmingham, B27 6PA, UK.

ISBN 978-1-847193-55-1

www.packtpub.com

Cover Image by Vinayak Chittar (<[email protected]>)

Credits

Authors

Matt Wright

Antony Reynolds

Reviewers

Jason Jones

Phil McLaughlin

Acquisition Editor

Bansari Barot

Development Editor

Swapna V. Verlekar

Technical Editor

Gagandeep Singh

Editorial Team Leader

Akshara Aware

Production Editorial Manager

Abhijeet Deobhakta

Project Team Leader

Lata Basantani

Project Coordinator

Rajashree Hamine

Indexer

Rekha Nair

Proofreader

Laura Booth

Production Coordinator

Rajni R. Thorat

Cover Work

Rajni R. Thorat

Foreword

Over the past several years, we have seen a growing momentum in the adoption of Service-Oriented Architectures, which continues to accelerate. At this point in its evolution, SOA has started to cross the chasm between the early-adopter, bleeding-edge IT architects and the mainstream IT and software development community. And what enables this progression to continue gathering steam is the sharing of knowledge, experiences, and lessons learned between the early adopters in the community and those following their footsteps. As such, I am very enthusiastic about Oracle SOA Suite Developer Guide because Matt Wright and Antony Reynolds are exactly the right people to share this knowledge with us.

I joined Oracle in 2004 through the acquisition of Collaxa, which is where the Oracle BPEL Process Manager came from. At Collaxa, I was responsible for all the interfaces between our SOA products and our customers and the developer community. It was very clear, shortly after the acquisition, that the Oracle field was going to be a tremendous asset to the adoption of our products, our customers' success, and to the advancement of SOA in general.

As Oracle became a leader in the SOA space over the next several years, building out a full SOA platform through continued development and further acquisitions, Antony and Matt continued to stand out as leaders among the special community of Oracle SOA field representatives. Along the way, they built a knowledge base that enabled customers to get over (and better yet, avoid…) common hurdles, and feed customer requirements back into the engineering organization. We are highly appreciative of the fact that they have undertaken the monumental task of incorporating this knowledge into a book that is built on the existing documentation, and will provide great value to experienced SOA practitioners and newbies alike.

SOA is about more than just tools, a fact that is clear even to those of us who work for software vendors. However, to be effective with any software development products, requires detailed knowledge of the products, APIs, features, and capabilities. Antony and Matt cover these basics in this book in great detail.

But even more importantly, developers need to know about edge cases, design patterns, and how these products fit into the full development life cycle. This information comes best from real-world experiences with the products, even more than from the people who build a product. It is particularly valuable that Antony and Matt focus the majority of the content in this book on deeper topics such as SOA exception handling, full life cycle support for testing, security, and migration across environments. If I had a quarter for every customer who has asked me, over the past eight years, about best practices to move their SOA composites from dev to test to production… well, let's just say you can save your quarters and read Chapter 18 instead.

Finally, even as SOA adoption matures, it is still important to understand why you are adopting SOA, what the expected benefits are, and to measure your progress toward those as objectively as possible. Today, most people state goals such as:

Developer productivity for system-to-system integrationGreater interoperability between systemsFlexibility and agility that reduces the costs associated with maintenance and changing requirementsService re-useScalabilityEnhanced business visibility and administration

I believe that this book, coming from pragmatic practitioners in the field, will specifically help developers realize these benefits from their SOA implementations by providing clear and useful information on Oracle's SOA platform.

On behalf of the Oracle SOA Engineering and Product Management team, as well as all the customers and partners who have asked for this book, we heartily thank Antony and Matt for the investment of their time and energy, and hope that this book helps you achieve your SOA goals.

David Shaffer

Vice President, Product Management

Oracle Integration

<[email protected]>

About the authors

Matt Wright has been involved with standards-based Service-Oriented Architecture (SOA) since shortly after the initial submission of SOAP 1.1 to the W3C in 2000, and has worked with some of the early adopters of BPEL since its initial release in 2002. Since then, he has been a passionate exponent of SOA and has been engaged in some of the earliest SOA-based implementations across EMEA and APAC.

He is currently a Director of Product Management for Oracle Fusion Middleware in APAC, where he is responsible for working with organizations to educate and enable them in realizing the full business benefits of SOA in solving complex business problems. As a recognized authority on SOA, Matt is also responsible for evangelizing the Oracle SOA message and is a regular speaker and instructor at private and public events. He also enjoys writing and publishes his own blog (http://blogs.bpel-people.com). Matt holds a B.Sc. (Eng) in Computer Science from Imperial College, University of London.

It seems a long time ago that I first suggested to Antony that we write this book. Since that day there have been numerous twists and turns, not least the acquisition of BEA which resulted in many revisions and re-writes. Having Antony as my co-author throughout this process was invaluable; Antony's continued conviction and enthusiasm throughout was instrumental in ensuring the book finally made the light of day.

Throughout this process, everyone at Oracle has been very supportive. I would like to make a special mention to Andy Gale for guiding us in the right direction when we first suggested the idea and to John Deeb for his continual support and encouragement throughout. I would also like to express my gratitude to everyone in the SOA Development team; in particular to David Shaffer, Demed L'Her, Manoj Das, Neil Wyse, Ralf Mueller, and Mohamed Ashfar who contributed to this book in many ways.

A major part in the quality of any book is down to the reviewers, so I would like to say a big thank you to Phil McLaughlin, Jason Jones, and James Oliver for all their incredibly valuable feedback, which has made this a clearer and simpler book to read.

The staff at Packt Publishing Pvt. Ltd. helped a great deal to make this book a reality. I would like to thank Rajashree Hamine the Project Coordinator, Swapna Verlekar the Development Editor, and Gagandeep Singh the Technical Editor.

Finally, writing a book is challenging at the best of times, to do it whilst re-locating half way round the world from the UK to Australia probably isn't the best timing! So I would like to say a special thank you to my wife Natasha and my children Elliot and Kimberley for their constant support and understanding throughout this period.

Antony Reynolds has worked in the IT industry for more than 24 years, since getting a job to maintain yield calculations for a Zinc smelter while still an undergraduate. After graduating from the University of Bristol with a degree in Maths and Computer Science he worked first for a software house, IPL in Bath, England, before joining the travel reservations system Galileo as a development team lead. At Galileo he was involved in development and maintenance of workstation products before joining the architecture group. Galileo gave him the opportunity to work in Colorado and Illinois where he developed a love for the Rockies and Chicago style deep pan pizza. He joined Oracle in 1998 as a sales consultant and has worked with a number of customers in that time, including a large retail bank's Internet banking project for which he served as chief design authority and security architect.

Antony currently is lucky to work with customers on the early stages of many interesting projects, providing advice on sizing models and architecture for the SOA Suite.

Outside of work Antony is a bishop in the Church of Jesus Christ of Latter Day Saints (Mormons) and is responsible for a congregation of 350. His wife and four children make sure that he also spends time with them, playing games, watching movies, and acting as an auxiliary taxi service.

I would like to thank my wife Rowan, and my four very patient children, who have put up with their husband and father disappearing into his office in the roof far too often. Several reviewers have provided invaluable advice and assistance. Phil McLaughlin of Oracle has been a constant source of encouragement and constructive criticism as the book has homed in on its target platform. Iswarya Dhandapani of Luton Borough Council took the time to try out all my code samples and identify ones which didn't work as well as providing feedback on my chapters from the view of someone who has to use SOA Suite to provide real solutions. Oracle ACE Jason Jones came a little late to the reviewing but managed to review every chapter and made clear what worked for him and what didn't. Simone Geib of Oracle Product Management provided valuable feedback on the sections covering Oracle Service Bus. I particularly appreciated the way all the reviewers not only pointed out the problems in the book but also identified the positive parts. Edwin Khodabachian is no longer with Oracle, but his team created the BPEL Process Manager at Collaxa, which was bought by Oracle and became under Edwins guidance the foundation of the SOA Suite. Finally, I would like to express appreciation to Thomas Kurian at Oracle who had the vision of a single integrated product suite, the Oracle SOA Suite, and has always been willing to listen to provide advice and guidance to me.

About the reviewers

Jason Jones is a software architect specializing in SOA and Java technologies. Since 2003, Jason has worked for Zirous, an Oracle Certified Partner, where he currently holds the position of Senior System Architect. In 2007, Jason was named an Oracle ACE Director, a prestigious international group of Oracle experts. Jason has been accepted as a speaker at Oracle OpenWorld, IOUG COLLABORATE, ODTUG Kaleidoscope, and has a published article on OTN.

Jason's more than 8 years of experience in IT that includes SOA technologies such as BPEL, ESB, SOAP, WS-Security, XML, and Enterprise Java technologies such as Spring, Struts, JMS, JPA, Hibernate, and EJBs among many others. Jason is a Sun Certified Java Programmer (SCJP), Sun Certified Web Component Developer (SCWCD), and holds a BS in Computer Science from Iowa State University.

Jason's blog can be found at <realjavasoa.blogspot.com>.

Phil McLaughlin has 20 years of early adopter experience with the technologies associated with SOA, working with architectural models such as object orientation before they were mainstream. In the late 1980s and early 1990s this was largely with the Smalltalk programming language and associated tools but he was asked to investigate and teach Java in 1997. Since then, he has maintained his interest in the development of distributed composite applications intially with CORBA, then J2EE and more recently SOA itself.

Phil's experience of SOA spans the theoretical and practical, having been a senior lecturer in academia until 1997 specializing in object oriented software (which could reasonably be argued as providing the foundations of the SOA architectural model), and how to transfer the requisite skills to developers often struggling with new and different architectural paradigms. Since 1997, he has worked in a number of specialist consultancies covering topics such as analysis and design methods, development and implementation from the OO/SOA perspective.

Phil Joined Oracle Corporation (UK) in 2002 when Oracle acquired the TopLink persistence management framework from WebGain and since then has specialized in working with Partners/System Integrators to educate them on best practice around the use of Oracle Java technology and more recently the Oracle SOA Suite. Phil currently holds the position of Master Principal Sales Consultant in the UK SOA pre-sales team where he provides initial advice and solution mapping to customers and partners about Oracle's SOA offerings.

Phil has worked with both authors for a number of years and is very pleased that thay have decided to share their wealth of knowledge and practical experience with the wider community. For anyone working with Oracle SOA suite, this is a 'must have' book.

Preface

Service-oriented architecture is not just changing how we approach application integration, but the mindset of software development as well.

Applications as we know them are becoming a thing of the past. In the future we will increasingly think of services and how those services are assembled to build complete "composite" applications that can be modified easily and quickly to adapt to a continually evolving business environment.

This is the vision of a standards-based service-oriented architecture (SOA), where the IT infrastructure is continuously adapted to keep up with the pace of business change.

Oracle is at the forefront of this vision, with the Oracle SOA Suite providing the most comprehensive, proven, and integrated tool kit for building SOA based applications.

This is no idle boast. Oracle Fusion Applications (the re-implementation of Oracle's E-Business Suite, Siebel, PeopleSoft, and JD Edwards Enterprise as a single application) is probably the largest composite application being built today and it has the Oracle SOA platform at its core.

Developers and architects using the Oracle SOA Suite, whether working on integration projects, building new bespoke applications, or specializing in large implementations of Oracle Applications will need a book that provides a hands-on guide on how best to harness and apply this technology. This book will enable them to do just that.

The initial section of the book is aimed at providing the reader with an overview of the Oracle SOA Suite and its various components, followed by a hands on introduction to each of them. This will provide the reader with a good feel for each of the components and how to use them.

Once the reader is familiar with various pieces of the SOA Suite and what they do, the next question will typically be:

What is the best way to combine/use all of these different components to implement a real world SOA solution?

Answering this question is the goal of the next section. Using a working example of an online auction site (oBay), it leads the reader through key SOA design considerations in implementing a robust solution that is designed for change. It explores topics such as:

How to design sustainable service contracts, that is, ones that easily accommodate future change.How best to leverage functionality from existing systems when building business services, while still providing flexibility to plug in an alternate service provider at a later point.What is the right way to implement new services.When to use rules to implement specialized services for greater flexibility.The use of different interaction patterns and when to use each one.Strategies for data validation and error handling, whether system errors or business errors.Key considerations when implementing "Human Workflow".

Before an application is complete and moves from development into production, it must also meet non-functional criteria such as security, availability, and scalability requirements. The final section addresses these issues and covers considerations such as the packaging, deployment, testing, security, and administration of composite applications as well as the overall deployment of the infrastructure. Topics addressed include:

Guidelines on packaging an application for easy deployment and movement from development to the test and production environments.Tips on building automated test suites that start at the component level and allow for testing of individual components and the complete assembly.Where are the most effective places to apply security and what options are available for securing the system.

What this book covers

The book is divided into three sections. Let us have a look at these three sections in detail.

Section 1: Getting started

This section provides an overview of the various components of the Oracle SOA Suite and gives the reader a fast-paced, hands-on introduction to each of the key components.

Chapter 1 gives an initial tour of the constituent parts, which make up the Oracle SOA Suite as well as detailing related elements of the Oracle Fusion Middleware stack and how they relate to the SOA Suite.

Chapter 2 provides an initial look at the Oracle BPEL Process Manager and Oracle Service Bus, by stepping us through the process of developing, deploying, and running our first service.

Chapter 3 looks at a number of key technology adapters and how we can use them to service enable existing systems.

Chapter 4describes how we can use the Oracle Service Bus to build services that are implementation agnostic. Doing so allows us to change the service location, communication protocol, or even replace a service implementation with another, with no impact on the client.

Chapter 5 describes how we can use BPEL to assemble services to build composite services as well as how we can link together a number of services to build a long-running business process. It also introduces the concepts of synchronous and asynchronous services.

Chapter 6 looks at how human tasks can be managed through workflow activities embedded within a BPEL process.

One of the key motivations behind SOA is Agility, the ability of an organization to respond rapidly to changes in market conditions and hence gain a competitive advantage.

Chapter 7 introduces the concept of externalizing "decision points" in a BPEL process as business rules, allowing us to change the flow through a process without having to make any changes to the deployed process.

Chapter 8examines how Business Activity Monitoring (BAM) can be used to give business users a real-time view into how the business process is performing.

Section 2: Putting it all together

This section uses the example of an online auction site (oBay) to illustrate how to use the various components of the SOA Suite to implement a real-world SOA based solution.

Each chapter covers a specific area that needs to be considered when developing a SOA based solution, such as the design of the service contract, validation, error handling, and message interaction patterns.

To highlight and demonstrate key design considerations, chapters use examples based on key parts of the oBay application to illustrate what's been covered, as well as providing a step-by-step guide on how to implement these techniques.

Chapter 9 introduces oBay and details the overall business requirements of the online auction site. Next, we present our outline for a typical SOA architecture, highlighting some of the key design considerations behind this. Finally, we use this to derive the overall architecture for oBay.

The first step in building a sustainable SOA based solution, that is, one that easily accommodates future change, is careful design of the service contracts. Chapter 10 gives guidance on designing these contracts and provides strategies for managing change when it occurs.

Once we know what service we require, we need to select the appropriate way of providing it. In Chapter 11, we examine different approaches to this, either through service enabling an existing application, using someone else's service, or building the service from scratch.

A common question with SOA is "Where do I put my validation?" At first glance this may seem like an obvious question, but once we consider the layered approach to SOA, it soon becomes clear that there are a number of choices each with their own advantages and disadvantages. Chapter 12 provides us with guidelines on where to put our validation and how to implement it.

Chapter 13 examines strategies for handling errors in SOA based systems. It covers system errors such as a network connection going down meaning a web service is temporarily unavailable, and business errors such as service being invoked with invalid data.

In every business process messages are exchanged between participants. So far, we have only looked at simple interactions, that is a single request followed by a reply, whether synchronous or asynchronous.

In Chapter 14, we look at messaging in a lot more detail. In particular, how we handle more complex interactions such as multiple requests and responses, unscheduled events, timeouts, and message correlation (both system and business).

In Chapter 15, we look at workflows involving complex chains of approval, including parallel approvers and the different options that are available. We also look at how we can use the Workflow Service API to integrate workflow into a user's existing user interface as an alternative to accessing it through the out of the box worklist application.

The Rules engine uses the Rete Algorithm, which was developed by researchers into Artificial Intelligence in the 1970s. In Chapter 16, we look at some of Rete's unique qualities, and how we can use them to implement particular categories of first class business services.

When we talk about web services, most people assume that we are going to bind (that is, connect to) the service using SOAP over HTTP. Indeed, this is often the case; however, Oracle SOA Suite supports binding to web services over multiple protocols. Chapter 17 looks at the different bindings supported and the various advantages they have, including better support for transactions and improved performance.

Section 3: Other considerations

This final section covers other considerations such as the packaging, deployment, testing, security, and administration of composite applications as well as the overall deployment of the infrastructure.

Chapter 18 examines how to package up the various artifacts that make up a composite application in order to enable easy deployment into multiple environments such as test and production. We also look at suitable deployment topologies for the SOA Suite based on run-time requirements for high availability, disaster recovery, and scalability.

Chapter 19 looks at how to create, deploy, and run test cases that automate the testing of composite applications. Testing is dealt with at several levels: unit testing, component testing, and finally assembly testing.

Chapter 20examines how we can centrally define policies that govern the operation of web services, such as security and access policies, auditing policies, and the management of service level agreements.

Who is this book for

The primary purpose of the book is to provide developers and technical architects with a practical guide to using and applying the Oracle SOA Suite delivering real-world SOA based applications.

It is assumed that the reader already has a basic understanding of the concepts of SOA, as well as some of the key standards in this space, including web services (SOAP, WSDL), XML Schemas, and XSLT (and XPath).

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "Each schema can reference definitions in other schemas by making use of the xsd:import directive."

A block of code will be set as follows:

<types> <schema xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://xmlns.oracle.com/Echo" schemaLocation="Echo.xsd"/> </schema> </types>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items will be made bold:

<types> <schema xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://xmlns.oracle.com/Echo" schemaLocation="Echo.xsd"/> </schema> </types>

New terms and important words are introduced in a bold-type font. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: "clicking the Next button moves you to the next screen".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book, what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply drop an email to <[email protected]>, making sure to mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email <[email protected]>.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code for the book

Visit http://www.packtpub.com/files/code/3551_Code.zip to directly download the example code.

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing this you can save other readers from frustration, and help to improve subsequent versions of this book. If you find any errata, report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata are added to the list of existing errata. The existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide the location address or website name immediately so we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at <[email protected]> if you are having a problem with some aspect of the book, and we will do our best to address it.

Chapter 1. Introduction to Oracle SOA Suite

The Oracle SOA Suite is a large and complex piece of software. In this chapter we will provide a roadmap for your use of the SOA Suite. After a review of the basic principles of SOA we will look at how the SOA Suite provides support for those principles through its many different components. Following this journey through the components of SOA Suite, we will introduce Oracle JDeveloper as the primary development tool that is used to build applications for deployment into the SOA Suite.

Service-oriented architecture in short

Service-oriented architecture (SOA) has evolved to allow greater flexibility in adapting the IT infrastructure to satisfy the needs of business. Let's examine what SOA means by examining the components of its title.

Service

A service is a term that is understood both by the business and IT. It has some key characteristics:

Encapsulation: A service creates delineation between the service provider and the service consumer. It identifies what will be provided.Interface: It is defined in terms of inputs and outputs. How the service is provided is not of concern to the consumer, only to the provider. The service is defined by its interface.Contract or service level agreements: There may be quality of service attributes associated with the service, such as performance characteristics, availability constraints, or cost.

The break-out box uses the example of a laundry service to make the characteristics of a service more concrete. Later we will map these characteristics onto specific technologies.

Tip

A clean example

Consider a laundry service. The service provider is a laundry company, and the service consumer a corporation or individual with washing to be done.

The input to the company is a basket of dirty laundry. Additional input parameters may be a request to iron the laundry as well as wash it, or to starch the collars. The output is a basket of clean washing with whatever optional additional services such as starching or ironing were specified. This defines the interface.

Quality of service may specify that the washing must be returned within 24 or 48 hours. Additional quality of service attributes may specify that the service is unavailable from 5PM Friday until 8AM Monday. These service level agreements may be characterized as policies to be applied to the service.

An important thing about services is that they can be understood by both business analysts and IT implementers. This leads to the first key benefit of service-oriented architecture.

Note

SOA makes it possible for IT and the business to speak the same language, that of services.

Services allow us to have a common vocabulary between IT and the business.

Orientation

When we are building our systems we are looking at them from a service point of view or orientation. This implies that we are oriented or interested in the following:

Granularity: The level of service interface or number of interactions required with the service, typically characterized as course grained or fine grained.Collaboration: Services may be combined together to create higher level or composite services.Universality: All components can be approached from a service perspective. For example, a business process may also be considered a service that, despite its complexity, provides inputs and outputs.

Thinking of everything as a service leads us to another key benefit of service-oriented architecture—composability.

Note

Composing new services out of existing services allows easy reasoning about the availability and performance characteristics of the composite service.

By building composite services out of existing services, we can reduce the amount of effort required to provide new functionality as well as being able to build something with prior knowledge of its availability and scalability characteristics. The latter can be derived from the availability and performance characteristics of the component services.

Architecture

Architecture implies a consistent and coherent design approach. This implies a need to understand the inter-relationships between components in the design and ensure consistency in approach. Architecture suggests that we adopt some of the following principles:

Consistency: The same challenges should be addressed in a uniform way. For example, the application of security constraints needs to be enforced in the same way across the design. Patterns or proven design approaches can assist with maintaining consistency of design.Reliability: The structures created must be fit to purpose and meet the demands for which they are designed.Extensibility: A design must provide a framework that can be expanded in ways both foreseen and unforeseen. See the break out box on extensions.

Tip

Extending Antony's house

My wife and I designed our current house. We built in the ability to convert the loft into extra rooms and also allowed for a conservatory to be added. This added to the cost of the build but these were foreseen extensions. The costs of actually adding the conservatory and two extra loft rooms were low because the architecture allowed for this. In a similar way it is relatively easy to architect for foreseen extensions, such as additional related services and processes that must be supported by the business. When we wanted to add a playroom and another bathroom, this was more complex and costly as we had not allowed for it in the original architecture. Fortunately our original design was sufficiently flexible to allow for these additions but the cost was higher. In a similar way the measure of the strength of a service-oriented architecture is the way in which it copes with unforeseen demands, such as new types of business process and service that were not foreseen when the architecture was laid down. A well architected solution will be able to accommodate unexpected extensions at a manageable cost.

A consistent architecture when coupled with implementation in SOA Standards gives us another key benefit—inter-operability.

Note

SOA allows us to build more inter-operable systems by being based on standards agreed by all the major technology vendors.

SOA is not about any specific technology. The principles of service-orientation can be applied equally well using assembler as they can in a high level language. However, as with all development it is easiest to use a model that is supported by tools and is both inter-operable and portable across vendors. SOA is widely associated with the web service or WS-* standards presided over by groups like OASIS. This use of common standards allows SOA to be inter-operable between vendor technology stacks.

Why SOA is different

A few years ago distributed object technology in the guise of CORBA and COM+ were going to provide benefits of reuse. Prior to that third and fourth generation languages such as C++ and Smalltalk based on object technology were to provide the same benefit. Even earlier the same claims were made for structured programming. So why is SOA different?

Terminology

The use of terms such as "services" and "processes" allows business and IT to talk about items in the same way, improving communication and reducing impedance mismatch between the two. The importance of this is greater than what it appears initially, because it drives IT to build and structure its systems around the business rather than vice versa.

Inter-operability

In the past there have been competing platforms for the latest software development fad. This manifested itself as CORBA and COM+, Smalltalk and C++, Pascal and C. This time around the standards are not based upon the physical implementation but upon the service interfaces and wire protocols. In addition these standards are generally text based to avoid issues around conversion between binary forms. This allows services implemented in C# under Windows to inter-operate with Java or PL/SQL services running on Oracle SOA Suite under Windows, Linux or UNIX. The major players like Oracle, Microsoft, IBM, SAP, and others are agreed on how to inter-operate together. This agreement has always been missing in the past.

Note

WS Basic Profile

There is an old IT joke that standards are great, there are so many to choose from! Fortunately this has been recognized by the SOA vendors and they have collaborated to create a basic profile, or collection of standards, that focus on inter-operability. This is known as WS Basic Profile and details the key web service standards that all vendors should implement to allow for inter-operability. SOA Suite supports this basic profile as well as additional standards.

Extension and evolution

SOA recognizes that there are existing assets in the IT landscape and does not force these to be replaced, preferring instead to encapsulate and later extend these resources. SOA may be viewed as a boundary technology that reverses many of the earlier development trends. Instead of specifying how systems are built at the lowest level it focuses on how services are described and how they inter-operate in a standards-based world.

Reuse in place

A final major distinguishing feature for SOA is the concept of reuse in place. Most reuse technologies in the past have focused on reuse through libraries, at best sharing a common implementation on a single machine through the use of dynamic link libraries. SOA focuses not just on reuse of the code functionality but also upon the reuse of exiting machine resources to execute that code. When a service is reused the same physical servers with their associated memory and CPU are shared across a larger client base. This is good from the perspective of providing a consistent location to enforce code changes, security constraints, and logging policies but it does mean that performance of existing users may be impacted if care is not taken in how services are reused.

SOA Suite components

SOA Suite has a number of component parts, some of which may be licensed separately.

Services and adapters

The most basic unit of a service-oriented architecture is the service. This may be provided directly as a web service enabled piece of code or it may be exposed by encapsulating an existing resource.

Services are defined by a specific interface, usually specified in a Web Service Description Language (WSDL) file. A WSDL file specifies the operations supported by the service. Each operation describes the expected format of the input message and if a message is returned it also describes the format of that message. The structure of WSDL files are described in Chapter 17.

Services are often surfaced through adapters that take an existing piece of functionality and "adapt" it to the SOA world so it can interact with other SOA Suite components. An example of an adapter is the file adapter that allows a file to be read or written to. The act of reading or writing the file is encapsulated into a service interface. This service interface can then be used to receive service requests by reading a file or to create service requests by writing a file.

Out of the box the SOA Suite includes licenses for the following adapters:

File AdapterFTP AdapterDatabase AdapterJMS AdapterMQ AdapterAQ Adapter

The database adapter and the file adapter are explored in more detail in Chapter 3 and Chapter 11. There is also support for other non-SOAP transports and styles such as plain HTTP, REST, plain TCP/IP, and Java.

Services are the most important part of service-oriented architecture and in this book we focus on how to define their interfaces and how to best assemble services together to create composite services with a value beyond the functionality on a single atomic service.

ESB—service abstraction layer

To avoid service location dependencies it is desirable to access services through an Enterprise Service Bus (ESB). This provides a layer of abstraction over the service and allows transformation of data between formats. The ESB is aware of the physical endpoint locations of services and acts to virtualize services.

Services may be viewed as being plugged into the service bus.

An Enterprise Service Bus is responsible for routing and transforming service requests between components. By abstracting the physical location of a service an ESB allows services to be moved to different locations without impacting the clients of those services. The ability of an ESB to transform data from one format to another also allows for changes in service contracts to be accommodated without recoding client services. The service bus may also be used to validate that messages conform to interface contracts and to enrich messages by adding additional information to them as part of the message transformation process.

Oracle Service Bus and Oracle ESB

Note that the SOA Suite contains both the Oracle Service Bus (formerly AquaLogic Service Bus) and the Oracle ESB. The stated direction by Oracle is for the Oracle Service Bus to be the preferred ESB for interactions outside the SOA Suite. Interactions within the SOA Suite may sometimes be better dealt with by the Oracle ESB, which will be known as the Mediator component in the 11g release of SOA Suite, but we believe that for most cases the Oracle Service Bus will provide a better solution and so that is what we have focused on within this book. However, the current release of the Oracle Service Bus, only executes on the Oracle WebLogic platform. So when running SOA Suite on non-Oracle platforms there are two choices:

Use only the Oracle ESBRun Oracle Service Bus on a separate WebLogic Server while running the rest of SOA Suite on the non-Oracle platform

We will focus on the Oracle Service Bus in this book, as that is the preferred direction for ESB functionality within the SOA Suite. Later releases of the SOA Suite will support Oracle Service Bus on non-Oracle platforms such as WebSphere.

Service orchestration—BPEL Process Manager

In order to build composite services, that is services constructed from other services, we need a layer that can orchestrate, or tie together, multiple services into a single larger service. Simple service orchestrations can be done within the Oracle Service Bus but more complex orchestrations require additional functionality. These service orchestrations may be thought of as processes, some of which are low-level processes and others are high-level business processes.

Business Process Execution Language is the standard way to describe processes in the SOA world, a task often referred to as service orchestration. The BPEL Process Manager in SOA Suite includes support for the BPEL 1.1 standard with some constructs from BPEL 2.0 also being supported. BPEL allows multiple services to be linked to each other as part of a single managed process. The processes may be short running, seconds and minutes, or long running, hours and days.

The BPEL standard says nothing about how people interact with it, but BPEL Process Manager includes a Human Workflow component that provides support for human interaction with processes.

The BPEL Process Manager may also be purchased as a standalone component, in which case it ships with the Human Workflow support and the same adapters as included in the SOA Suite.

We explore the BPEL Process Manager in more detail in Chapter 5 and Chapter 14. Human workflow is examined in Chapter 6 and Chapter 15.

Oracle also package the BPEL Process Manager with the Oracle Business Process Management (BPM) Suite. This package includes the former Aqualogic BPM product (acquired when BEA bought Fuego), now known as Oracle BPM. Oracle position BPEL as a system-centric process engine with support for human workflow while BPM is positioned as human-centric process engine with support for system interaction.

Rules

Business decision making may be viewed as a service within SOA. A rules engine is the physical implementation of this service.

SOA Suite includes a powerful rules engine that allows key business decision logic to be abstracted out of individual services and managed in a single repository. The rules engine is also included in the Oracle Application Server Enterprise Edition.

In Chapters 7 and 16 we investigate how to use the rules engine.

Security and monitoring—OWSM

One of the interesting features of SOA is the way in which aspects of a service are themselves a service. Nowhere is this better exemplified than with security. Security is a characteristic of services, yet to implement it effectively requires a centralized policy store coupled with distributed policy enforcement at the service boundaries. The central policy store can be viewed as a service that the infrastructure uses to enforce service security policy.

The Oracle Web Services Manager has several roles to play within an SOA. Firstly it serves as a policy enforcement point for security, ensuring that only requests that comply with policy are accepted. Secondly it provides a monitoring service to ensure that services are compliant with their service level agreements.

Security policy may also be applied through the Service Bus although policy definition is currently different between the Service Bus and OWSM the direction is for Oracle to have a common policy management in a future release.

Applying security policies is covered in Chapter 20.

Active monitoring–BAM

It is important in SOA to track what is happening in real time. Some business processes require such real-time monitoring. Users such as financial traders, risk assessors, and security services may need instant notification of business events that have occurred.