Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Oracle SOA Suite 11g Handbook
Nội dung xem thử
Mô tả chi tiết
PB Oracle SOA Suite 11g Handbook
®
Oracle SOA Suite
11g Handbook
ii About the Author Oracle SOA Suite 11g Handbook
Lucas Jellema is CTO at AMIS, an Oracle, Java, and SOA specialist based in Nieuwegein, The Netherlands.
He works as a consultant, architect, and instructor in diverse areas such as SQL and PL/SQL, Java, Oracle
ADF and WebCenter, and SOA Suite. The running theme through most of his activities is the transfer of
knowledge and enthusiasm.
Lucas is an author at the AMIS Technology Blog (http://technology.amis.nl/blog), for Oracle Technology
Network, and for international magazines. He is a frequent presenter at international conferences, including
Devoxx, JavaOne, Oracle Open World, ODTUG, UKOUG, OBUG, AUSOUG, and Oracle University
Celebrity Seminars. He was nominated Oracle ACE in 2005 and ACE Director in 2006.
Before joining AMIS in 2002, Lucas worked for Oracle Consultancy in The Netherlands, where he
was a member of the Internet Development Center of Excellence—working on classic products such as
Oracle Designer and Forms and the productivity boosters Headstart, CDM RuleFrame, Echo, Repository
Object Browser, and JHeadstart.
About the Contributors
Edwin Biemond is an Oracle ACE and solution architect at Whitehorses, specializing in messaging with
Oracle SOA Suite and Oracle Service Bus as well as ADF development with Oracle JDeveloper,
WebLogic Server, and Security. His Oracle career began in 1997 when he was a database developer
and administrator. Since 2001 Edwin changed his focus to integration, security, and Java development.
Edwin was awarded with Java Developer of the Year for 2009 by Oracle Magazine and has a popular
blog called Java / Oracle SOA blog, which can be found at http://biemond.blogspot.com.
Lonneke Dikmans lives in The Netherlands with her husband and two children. She graduated with
a degree in cognitive science at the University of Nijmegen, The Netherlands. She started her career as
a usability specialist, but went back to school when she lived in California to pursue a more technical
career. She started as a J2EE developer on different platforms (Oracle, IBM) and specialized in integration.
She now works as an architect, both on projects and as an enterprise architect. She has experience in
different industries: government, financial services, and utilities. She advises companies that want to set
up or improve a service-oriented architecture, and is responsible for her company’s SOA/BPM practice.
She speaks regularly at conferences in Europe and the United States, and publishes frequently on the
Internet and in magazines. Lonneke became an Oracle ACE Director in 2006.
Ronald van Luttikhuizen is a senior consultant and information and solution architect at Approach,
a Netherlands-based ICT consultancy focusing on SOA and Business Intelligence. Ronald has an MSc in
computer science from Utrecht University. He has experience in ICT in various roles, such as coach, (lead)
architect, (lead) developer, teacher, and team lead. In the last few years, Ronald had focused on architecture
and security in BPM and SOA environments. He has in-depth knowledge of Oracle Fusion Middleware.
Ronald is a speaker at (international) conferences such as Oracle OpenWorld and regularly publishes
articles on Oracle Technology Network (OTN), Java Magazine, Optimize, and more. In 2008, Ronald was
named Oracle ACE for SOA and Middleware, and in 2010 he became an Oracle ACE Director in that area.
About the Technical Editors
Jeff Davies is a senior principal product manager at Oracle, specializing on the Oracle SOA Suite
product. He is the author of The Definitive Guide to SOA: Oracle Service Bus. Jeff has over 25 years of
experience in the software field and has developed retail applications such as Act! for the Windows
and Macintosh platforms and a number of other commercially available applications. He has worked
as an architect and developer and ran his own consulting company for some years. Now, at Oracle, Jeff
is focused on the practical application of Oracle products to create SOA solutions.
Mike van Alst is an independent architect and Oracle ACE Director. Active within the IT industry
since 1984, Mike focuses on the added value that ICT should bring to an organization. Mike has done
several successful SOA projects in The Netherlands using Oracle Fusion Middleware. He runs his own
blog on SOA at http://soamastery.blogspot.com.
ii Oracle SOA Suite 11g Handbook
®
Oracle SOA Suite
11g Handbook
Lucas Jellema
New York Chicago San Francisco
Lisbon London Madrid Mexico City Milan
New Delhi San Juan Seoul Singapore Sydney Toronto
Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. Except as permitted under the United States
Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a
database or retrieval system, without the prior written permission of the publisher.
ISBN: 978-0-07-160898-5
MHID: 0-07-160898-2
The material in this eBook also appears in the print version of this title: ISBN: 978-0-07-160897-8,
MHID: 0-07-160897-4.
All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked
name, we use names in an editorial fashion only, and to the benefi t of the trademark owner, with no intention of infringement of the
trademark. Where such designations appear in this book, they have been printed with initial caps.
McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate
training programs. To contact a representative please e-mail us at [email protected].
Information has been obtained by Publisher from sources believed to be reliable. However, because of the possibility of human or
mechanical error by our sources, Publisher, or others, Publisher does not guarantee to the accuracy, adequacy, or completeness of
any information included in this work and is not responsible for any errors or omissions or the results obtained from the use of such
information.
TERMS OF USE
This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGrawHill”) and its licensors reserve all rights in and to the
work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve
one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon,
transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior consent. You may
use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work
may be terminated if you fail to comply with these terms.
THE WORK IS PROVIDED “AS IS.” McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS
TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK,
INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE,
AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not
warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or
error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless
of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information
accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been
advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim
or cause arises in contract, tort or otherwise.
Contents at a Glance
part i
Introducing SOA, St. Matthews, and the Oracle SOA Suite
1 A Typical Case of SOA: Introduction of St. Matthews Hospital Center. . . . . . . . . 3
2 Introduction to Service-Oriented Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3 Oracle Fusion Middleware and SOA Suite 11g. . . . . . . . . . . . . . . . . . . . . . . . . . . 45
part iI
Developing Composite Applications
4 XML and Web Services Fundamentals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5 First Steps with BPEL and the Database Adapter. . . . . . . . . . . . . . . . . . . . . . . . . . 113
6 Process-Oriented BPEL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
7 Mediator Service for Straight Talk and No Nonsense. . . . . . . . . . . . . . . . . . . . . . 187
8 Rules Rule—on Decision Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
9 Event-Driven Architecture for Super Decoupling. . . . . . . . . . . . . . . . . . . . . . . . . 271
10 The Missing Link: The Human Service Provider. . . . . . . . . . . . . . . . . . . . . . . . . . 301
11 Business Process Management with BPEL and BPMN. . . . . . . . . . . . . . . . . . . . . . 341
12 Leveraging Java in Composite Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
13 Enterprise-Level Decoupling with Oracle Service Bus. . . . . . . . . . . . . . . . . . . . . 419
14 Service Components and Composite Applications According to SCA. . . . . . . . . . 461
v
Oracle SOA Suite 11g Handbook
part iII
Administration, Security, and Governance
15 For Your Eyes Only. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
16 What Is Going On: Monitoring SOA Composite Applications. . . . . . . . . . . . . . . 521
17 Lifecycle Management: Testing and Dealing with Environmental Change. . . . . . 551
18 Tactical Management and Governance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
part iV
Beyond the Basics
19 From Live Data to Real-time Insight and Action Using
Complex Event Processing and Business Activity Monitoring. . . . . . . . . . . . . . 611
20 ADF as UI Glue (and More) in FMW. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
21 The Bigger Picture: SOA for User Interfaces, SaaS, and the Cloud. . . . . . . . . . . . 709
A Migration from SOA Suite 10g to 11g. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
vii
vi
Contents
Foreword. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
part I
Introducing SOA, St. Matthews, and the Oracle SOA Suite
1 A Typical Case of SOA: Introduction of St. Matthews Hospital Center. . . . . . . 3
Introduction to St. Matthews Hospital Center. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Trends in Healthcare and Hospitals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
The Hospital from an Architectural Point of View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Business Architecture View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Information Architecture View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Technical Architecture View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2 Introduction to Service-Oriented Architecture. . . . . . . . . . . . . . . . . . . . . . . . . 15
Service-Oriented Architecture (SOA). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
SOA from a Business Point of View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
SOA from an Architectural Point of View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
SOA from an Implementation Point of View. . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
The eAppointment Pilot Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3 Oracle Fusion Middleware and SOA Suite 11g . . . . . . . . . . . . . . . . . . . . . . . 45
History of Middleware and SOA in Oracle. . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
The Mists of Time—Until 2001. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Industry Standards: From 1998 until Now. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Not Invented Here (2001–2008). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Complete, Open, and Integrated—2009 and Beyond. . . . . . . . . . . . . . . . . . . . 57
vii
viii Oracle SOA Suite 11 Oracle SOA Suite 11g Handbook Handbook Contents ix
SOA Suite 11g: The Key Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Adapters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Event Delivery Network. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Oracle Service Bus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Business Activity Monitoring (BAM) Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Fusion Middleware Infrastructure and WebLogic Server 11g. . . . . . . . . . . . . . 64
Design Time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Related Suites and Products in FMW 11g. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Getting Started with SOA Suite 11g. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Installation of SOA Suite 11g. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Create and Run the “HelloWorld” of Service Composite Applications. . . . . . . 75
Migrating from SOA Suite 10.1.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
part II
Developing Composite Applications
4 XML and Web Services Fundamentals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Kicking the Tires on the eAppointment Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Introduction to XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
XML Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Data Design for XML—XML Schema Definitions (XSD). . . . . . . . . . . . . . . . . . 93
The Service Contract: Introducing WSDL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Analyzing the Service Interface According to WSDL. . . . . . . . . . . . . . . . . . . . . 103
Demo: Create the Simplest Web Service Implementation. . . . . . . . . . . . . . . . . 108
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
5 First Steps with BPEL and the Database Adapter. . . . . . . . . . . . . . . . . . . . . . . . 113
Introducing the Business Process Execution Language (BPEL). . . . . . . . . . . . . . . . . . . . 114
BPEL Ingredients. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Implementing the Composite PatientDataService. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
The PatientDataService BPEL Process in More Detail. . . . . . . . . . . . . . . . . . . . . . . . . . 120
Essential BPEL Activities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
The Assign Activity and the Use of XPath in BPEL. . . . . . . . . . . . . . . . . . . . . . . 126
Accessing the Database from a BPEL Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
A Simple Select Service to Retrieve the Patient Identifier. . . . . . . . . . . . . . . . . 134
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
6 Process-Oriented BPEL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
The Start of the Appointment Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Scope and Sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Flow for Parallel Execution of BPEL Activities. . . . . . . . . . . . . . . . . . . . . . . . . . 154
Invoking a Synchronous Web Service: Prepare Instructions. . . . . . . . . . . . . . . . . . . . . 157
Invoking an Asynchronous Service: Calling the Appointment Scheduler . . . . . . . . . . . . 158
Implementing the (Mock) Asynchronous SchedulerService. . . . . . . . . . . . . . . . 158
Calling the Asynchronous SchedulerService. . . . . . . . . . . . . . . . . . . . . . . . . . . 159
viii Oracle SOA Suite 11 Oracle SOA Suite 11g Handbook Handbook Contents ix
Sending Notifications from the BPEL Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Receiving Request Messages in Running BPEL Instances. . . . . . . . . . . . . . . . . . . . . . . . 163
Consuming an Asynchronous Event: Handling a Cancellation. . . . . . . . . . . . . 164
Request Appointment Details from the PatientAppointmentService Instance. . . 175
Dealing with and Compensating for Exceptional Circumstances. . . . . . . . . . . . . . . . . . 179
Handling Exceptions in BPEL Processes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Undoing BPEL Scope Results Through Compensation Handlers. . . . . . . . . . . . 184
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
7 Mediator Service for Straight Talk and No Nonsense. . . . . . . . . . . . . . . . . . . . 187
The Mediator: From the Real World to the World Inside the SOA Suite. . . . . . . . . . . . 188
The Mediator Inside the SOA Suite. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Processing Files with Appointment Requests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Introducing the Mediator and the File Adapter: Routing and Transformation. . . 191
Sending the Appointment Requests to the Patient Appointment Service. . . . . . 205
Adding Flexibility Using Filtering and Transformation of Messages. . . . . . . . . . . . . . . . 210
Content-based Routing for External Appointment Requests. . . . . . . . . . . . . . . . 210
Moving to Canonical Messages Using Domain Value Maps. . . . . . . . . . . . . . . . . . . . . 221
Value Mapping with Domain Value Maps. . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Alternative Means for Value Translation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Appointment Requests via a Web Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Opening Up the Composite to a New Message Producer. . . . . . . . . . . . . . . . . 227
Decoupling the Database Adapter Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Decoupling the PatientAppointmentService BPEL Process. . . . . . . . . . . . . . . . 229
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
8 Rules Rule—on Decision Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Deriving the Type of the Appointment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Creating a Business Rule Service Component. . . . . . . . . . . . . . . . . . . . . . . . . . 235
Separating Out Business Logic Using Business Rules. . . . . . . . . . . . . . . . . . . . . . . . . . 248
The Rationale Behind Business Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Business Rule Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
System Parameters and Global Formulas. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Setting Up the Central Library of System Parameters. . . . . . . . . . . . . . . . . . . . . 252
Adding Formulas to the Central Library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Using a Decision Table to Establish the Appointment’s Priority. . . . . . . . . . . . . . . . . . 256
Introducing the Decision Table at Starbucks. . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Logic for Determining the Appointment’s Priority. . . . . . . . . . . . . . . . . . . . . . . 257
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
9 Event-Driven Architecture for Super Decoupling. . . . . . . . . . . . . . . . . . . . . . . 271
Event-Driven Architecture for Super Decoupling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Introducing the Event Delivery Network. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
First Round with EDN: Consuming Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Synchronizing Patient Data Using the Event Delivery Network. . . . . . . . . . . . . 277
Creating Picky Subscriptions Using Filter Expressions. . . . . . . . . . . . . . . . . . . . 284
x Oracle SOA Suite 11 Oracle SOA Suite 11g Handbook Handbook Contents xi
Publishing Patient Details Change Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Publishing Database Events via Advanced Queuing. . . . . . . . . . . . . . . . . . . . . 288
Publishing EDN Events from BPEL Components. . . . . . . . . . . . . . . . . . . . . . . . 289
Event Delivery Network in SCA and BPEL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Analyzing the SCA Configuration Around EDN and Events. . . . . . . . . . . . . . . . 293
Decoupling Two-way Services Using the Discussion Forum Approach. . . . . . . . . . . . . 296
Introducing the Discussion Forum Pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
A First Stab at the Decoupling from a Two-way Service
Using the Discussion Forum Approach. . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
The Discussion Forums Pattern in Action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Extending the Event-based Patient Data Service. . . . . . . . . . . . . . . . . . . . . . . . 298
Judging the Discussion Forum Pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
10 The Missing Link: The Human Service Provider. . . . . . . . . . . . . . . . . . . . . . . . 301
Introducing the Human Task Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Architecture of the Human Task Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Exploring the Task Service in Detail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Defining the First Human Task—Approve Highest Priority. . . . . . . . . . . . . . . . . . . . . . 306
Steps for Implementing the Human Task ArbitrateHighPriority. . . . . . . . . . . . . 306
Extend the Task ArbitrateHighPriority with Notification
and Group Assignment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
The Scheduler Service—Beyond Mere Decisions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Tasks with Complex Outcomes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Acceptance of New Patient: Complex Task Routing. . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Accepting a New Patient. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Integrate the Task in the PatientDataService BPEL Component. . . . . . . . . . . . . 335
See Some Action: Requesting an Appointment for a New Patient. . . . . . . . . . . 336
Advanced Features for Human Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Business Rules for Task Allocation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Java and WebService API for Human Workflow Services. . . . . . . . . . . . . . . . . 337
Todo List Service Portlet in WebCenter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Database Views for Inspecting Task Details. . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Using Excel as an Alternative Worklist Application. . . . . . . . . . . . . . . . . . . . . . 339
Human Task Callbacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Custom Task Allocation and Escalation Mechanisms. . . . . . . . . . . . . . . . . . . . 339
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
11 Business Process Management with BPEL and BPMN. . . . . . . . . . . . . . . . . . . 341
Business Process Management (BPM). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
BPM from an Architectural Point of View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
Design Guidelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Tools to Facilitate BPM Efforts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Implementing Business Processes Through BPEL and Human Tasks. . . . . . . . . . . . . . . 347
“Accept New Patient” as a Multitask Process. . . . . . . . . . . . . . . . . . . . . . . . . . 348
x Oracle SOA Suite 11 Oracle SOA Suite 11g Handbook Handbook Contents xi
Introducing BPMN Service Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Comparing BPMN and BPEL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Auxiliary Applications for BPMN Processes. . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Designing the “Treatment Approval” Workflow Using BPMN. . . . . . . . . . . . . . 354
Simulate the Execution of the Business Process. . . . . . . . . . . . . . . . . . . . . . . . . 359
Implement the Treatment Approval Process. . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Run the Business Process and Track Its Progress. . . . . . . . . . . . . . . . . . . . . . . . 371
Revising the Business Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Online Redefinition of the BPM Process Through the Process Composer. . . . . 374
Running the Revised Business Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
12 Leveraging Java in Composite Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Java Integration in Various Ways. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
JMS Adapter Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
EJB Service Adapter and ADF Binding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Socket Adapter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Spring Context Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Java Inside. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
BPEL Entity Variables Bound to Service Data Objects. . . . . . . . . . . . . . . . . . . . 385
Invoking SOA Suite from Java. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Using the JMS Adapter to Loosely Couple with Java Applications. . . . . . . . . . . . . . . . . 386
Using the JMS Adapter to Integrate with the Finance
Department’s Java Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Embedding Java Logic in BPEL Processes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Using Embedded Java in a BPEL Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
The Spring Context Service Component for Custom Java Service Components. . . . . . . 399
Using the Spring Context Service Component. . . . . . . . . . . . . . . . . . . . . . . . . . 401
Leveraging the Outbound EJB Binding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Create the EJBs and Configure the EJB Adapter Reference. . . . . . . . . . . . . . . . . 409
Exposing SOA Composite Applications as EJB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
Inbound EJB Binding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
Inbound ADF Binding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
13 Enterprise-Level Decoupling with Oracle Service Bus. . . . . . . . . . . . . . . . . . . 419
Introducing the Oracle Service Bus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Functions Performed by the Oracle Service Bus. . . . . . . . . . . . . . . . . . . . . . . . 421
OSB at St. Matthews. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
Oracle Service Bus Product History and Architecture. . . . . . . . . . . . . . . . . . . . 427
Sending Invoices to Patients Who Had Appointments. . . . . . . . . . . . . . . . . . . . . . . . . . 429
Decoupling Between Business Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
The PatientAppointmentService and External Parties. . . . . . . . . . . . . . . . . . . . . . . . . . 437
Adding a Virtualization Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
xii Oracle SOA Suite 11 Oracle SOA Suite 11g Handbook Handbook Contents xiii
Requesting the Appointment Status via E-mail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
Inbound and Outbound E-mail Transport in OSB. . . . . . . . . . . . . . . . . . . . . . . 446
Implementing the RequestAppointmentStatusPerEmail Proxy Service. . . . . . . . 450
Service Result Caching for the Retrieve Appointment
Status Business Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
Requesting the Appointment Status via REST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
RESTifying OSB Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
Parallel Processing of Appointment Requests Using Split-Join. . . . . . . . . . . . . . . . . . . . 456
Parallel and Batch-wise Processing in OSB. . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
Choosing Between OSB and SCA Composites (and Mediators). . . . . . . . . . . . . . . . . . . 457
Rules of Thumb for Choosing Between OSB and SCA Composite. . . . . . . . . . . 457
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
14 Service Components and Composite Applications According to SCA. . . . . . . . 461
Artifacts According to the SCA Specification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Service Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Service Composites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
The SCA Way of Designing and Developing Applications. . . . . . . . . . . . . . . . . . . . . . 468
Reuse of Service Components and Composites. . . . . . . . . . . . . . . . . . . . . . . . . 468
Nested Service Composites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
Granularity of Service Composites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
Service Composites Are the Unit Of…. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
Splitting or Merging Service Composites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
part III
Administration, Security, and Governance
15 For Your Eyes Only. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
The Case for Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
IT Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
Security and SOA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
So What Exactly Is IT Security in a World of Services?. . . . . . . . . . . . . . . . . . . 484
Best Practices for Applying IT Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
Transport Versus Message Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
Agents and Gateways Pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
Security in Oracle Fusion Middleware 11g. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
Security Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
Oracle Web Services Manager (OWSM). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
Case: Securing SOA Composites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
Inspecting the SOA Composite. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
Identity Administration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
Authentication Using WS-Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
Authorization Using WS-Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
Ensuring Integrity and Confidentiality Using Transport Security. . . . . . . . . . . . 514