Академический Документы
Профессиональный Документы
Культура Документы
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
NA
KO
Oracle SOA Suite 12c: Build
Composite Applications
Student Guide Volume I
D84361GC10
Edition 1.0 | November 2014 | D89147
Jay Kasi publish, license, post, transmit, or distribute this document in whole or in part without
the express authorization of Oracle.
David Mills
The information contained in this document is subject to change without notice. If you
Ted Witiuk find any problems in the document, please report them in writing to: Oracle University,
Pete Laseau 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Tom Barrett
Restricted Rights Notice
Editors If this documentation is delivered to the United States Government or anyone using
Vijayalakshmi Narasimhan the documentation on behalf of the United States Government, the following notice is
applicable:
a ble
Smita Kommini
f e r
U.S. GOVERNMENT RIGHTS
an s
Publishers
n - t r
The U.S. Governments rights to use, modify, reproduce, release, perform, display, or
disclose these training materials are restricted by the terms of the applicable Oracle
Michael Sebastian
a no
license agreement and/or the applicable U.S. Government contract.
iii
SOA Run Time 1-39
Quiz 1-40
Agenda 1-41
Production Environment: Example 1-42
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
iv
Creating an Adapter 2-29
Summary 2-30
Practice 2 Overview 2-31
Application Navigator 2-32
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
v
Summary 3-30
Practice 3-1 Overview 3-31
Practice 3-2 Overview 3-32
Practice 3-3 and 3-4 Overview 3-33
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
vi
Quiz 5-8
Agenda 5-9
JMS Specification: Definition 5-10
JMS Message 5-11
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
6 Introduction to BPEL
Objectives 6-2
Agenda 6-3
Business Processes and BPEL 6-4
Parts of a BPEL Process 6-5
vii
BPEL, WSDL, and XSD 6-6
Partners, Partner Links, and Roles 6-7
Variables in BPEL 6-8
Interacting with Partners 6-9
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
viii
Structured and Extension BPEL 2.0 Activities 7-16
Summary 7-18
Practice 7 Overview 7-19
Before You Begin 7-22
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
ix
Recovering Faults with Enterprise Manager Fusion Middleware Control 8-41
Accessing a Recoverable Fault 8-42
Recovering a Fault Condition 8-43
Summary 8-45
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
x
Summary 9-37
Practice 9 Overview 9-38
Objectives 10-2
Agenda 10-3
Design-Time Metadata Services (MDS) Repository 10-4
Quiz 10-6
Agenda 10-7
Templates: Overview 10-8
Creating and Using Templates 10-10
Using Project Templates 10-11
a ble
Using Service Component Templates 10-12 f e r
ans
Using BPEL Scope Activity Templates 10-14
n - t r
Quiz 10-15
Agenda 10-16 a no
h a s
) ide
BPEL Subprocesses: Introduction 10-17
o m u
Stand-Alone Subprocess 10-19
m c nt G
b
ni Stude
Calling a Stand-Alone Subprocess 10-20
Inline Subprocess 10-21 i
j a in@ this
Comparing Stand-Alone and Inline Subprocesses 10-22
a r k se
kon e to u
Creating an Inline Subprocess 10-23
(
Calling an Inline Subprocess 10-24
AIN icens
Creating a Stand-Alone Subprocess 10-25
J
RK l
Calling a Stand-Alone Subprocess from BPEL 10-27
NA Differences Between Templates and Subprocesses 10-28
KO Quiz 10-29
Summary 10-30
Practice 10 Overview 10-31
xi
Adding an Operation Binding 11-12
The Finished Binding Component 11-13
Testing the Component 11-14
Examining the Results 11-15
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Quiz 11-16
Summary 11-17
Practice 11 Overview 11-18
Practice 11-1 to 11-4: Overview 11-19
xii
Practice 12-1 to 12-3 Overview 12-34
Practice 12-4 to 12-6 Overview 12-35
Objectives 13-2
Agenda 13-3
Problem Statement 13-4
Event Delivery Network 13-5
Aligning SOA and EDA Through EDN 13-6
Events: Introduction 13-7
XSD 13-8
Event Definition Language 13-9
a ble
Event Publication 13-10 f e r
ans
Event Subscription 13-11
n - t r
Event Publication and Subscription 13-12
Quiz 13-13 a no
h a s
) ide
Agenda 13-14
o m u
Creating an Event Definition 13-15
m c nt G
b
ni Stude
Configuring a Mediator to Publish Events 13-16
i
Configuring a Mediator to Subscribe to Events 13-17
j a in@ this
Setting Event Delivery Consistency 13-18
a r k se
kon e to u
Publishing Events in BPEL Components 13-19
(
Subscribing to Events in BPEL Components 13-20
AIN icens
Managing Events from Enterprise Manager 13-21
J
RK l
Viewing Event Subscriptions 13-22
NA Quiz 13-23
KO Summary 13-24
Practice 13 Overview 13-25
xiii
Test Case File 14-13
Creating Emulations 14-14
Emulating Events in a Test Case 14-15
Creating Assertions 14-16
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Quiz 14-18
Agenda 14-19
Selecting the Test Cases to Run 14-20
Running the Test Cases 14-22
Examining Results of a Test Run 14-23
Quiz 14-25
Agenda 14-26
Troubleshooting Guidelines 14-27
a ble
Debugging SOA Composite Applications with the SOA Debugger 14-29 f e r
ans
Starting the Debugger 14-30
n - t r
Setting Breakpoints in Services 14-31
Setting Breakpoints in BPEL 14-32 a no
h a s
) ide
Initiating Debugging 14-33
o m u
Examining Values 14-34
m c nt G
Frames 14-35 b
ni Stude
i
Stepping Through the Application 14-36
j a in@ this
Ending a Debug Session 14-37
a r k se
kon e to u
Summary 14-38
(
Practice 14-1 to 14-3 Overview 14-39
AIN icens
Practice 14-4 Overview 14-40
J
RK l
O NA15 Securing Composite Applications and Invoking Secured Services
K Objectives 15-2
Agenda 15-3
Web Service Security: Introduction 15-4
Securing Endpoints: Examples 15-7
Quiz 15-8
Agenda 15-9
Oracle Web Services Manager 15-10
OWSM Policy Framework 15-11
Components of Oracle Web Services Manager Architecture 15-12
Policies: Introduction 15-13
Policy Assertions 15-14
Types of Security Tokens 15-15
Security Assertion Markup Language (SAML) 15-17
Security Policies: Introduction 15-18
Quiz 15-19
xiv
Agenda 15-20
Securing SOA and Identity Propagation 15-21
Attaching a Policy to an Inbound Request 15-22
Attaching a Policy to an Inbound Request by Using Oracle JDeveloper 12c 15-23
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
A Request-Response Patterns
Request-Response Patterns A-2
a ble
One-Way Message Interaction A-3 f e r
ans
Synchronous Interaction A-5
n - t r
Asynchronous Interaction A-7
One Request, Multiple Responses A-8 a no
h a s
) ide
One Request, a Mandatory Response, and an Optional Response A-9
o m u
c nt G
Asynchronous Interaction with Timeout Pattern A-11
m
b
ni Stude
Asynchronous Interaction with a Notification Timer Pattern A-12
i
One Request, One of Two Possible Responses A-13
j a in@ this
Multiple Requests, Multiple Responses A-15
a r k se
kon e to u
Multiple Requests, First Response A-16
(
BPEL Deployment Descriptor Properties A-17
J AIN icens
RK l
NA
KO
xv
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
KO
N
ARK
J l
(
AIN icens
a r j a
kon e to u
k se
i
in@ this
b m
o
ni Stude
m ) h a
c nt G u
a
ide
s
n no
- t r an
s
f e r a b
le
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Agenda
Course Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
and transformations
Implement a Business Rule component with IF/THEN rules
and Decision Tables
Test, debug, and troubleshoot a SOA composite
application
Initiate SOA composite applications by using the Event
r a ble
Delivery Network n s fe
Apply security policies to service endpoints to secure n - tra
interactions a no
h a s
Implement Human Workflow with Human Task
components o m )
u ide
m c nt G
Describe SOA conceptsin b
i related
and de technology
t u
Create a SOA composite is S
in@ application by using JDeveloper
a r kja se th
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
SOA Monitoring
a ble
Tools and Sharing The REST f e r
Techniques
Human Tasks
Functionality Adapter ans
n - t r
concepts a no
Business Rules
h a s
Events
features o m )
u ide
m c nt G
work smarter, Testing b
ni Stude Security
and
i
Debugging
in@ this
not harder
r j a
k se
a
on t2014, uOracle and/or its affiliates. All rights reserved.
( kCopyright o
A I N nse
K J l i ce
R
NA
KO
Topic Website
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Course Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Order Status
a b le
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
Marketing CRM b
Financeni Warehouse de Other Biz Trading
System System System
i
@ is S t u
Mgmt Unit Partner
i n
a r kja se th
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cein many ways, some of which are proprietary approaches that have
N ARsilo (stand-alone) systems to be integrated, typically in a point-to-point manner.
Integration
enabled
can be done
KOHowever, the point-to-point approach tends to be brittle, and difficult to maintain over time.
Functionality is often duplicated across applications. Changes to a single application interface
have the potential to impact large numbers of systems, each of which may need
modificationa time-consuming and expensive proposition.
Vendor-specific integration technologies such as Tuxedo have enabled systems to
standardize the way integration is done within their own implementation, but because Tuxedo
does not provide native support for web services, it keeps the technology confined to the
organization that embraced it.
The computing industry worked to create a standardized protocol and software integration
method called Common Object Request Broker Architecture (CORBA) that enabled systems
to integrate by using a standard (non-XML-based) interface definition language for generating
code templates that could be distributed. Although it is possible to apply a SOA approach with
CORBA, its lack of widespread adoption and accessibility, in addition to its remote procedure
call mechanisms, make it costly to implement and less friendly to use across an intranet or the
Internet.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce attempts to overcome many of the shortcomings of earlier
N AR technologies by embracing the concept of a service. A service is a discrete,
Service-oriented
integration
architecture
KOdecoupled unit of business functionality that is exposed and available to (ideally) all
applications in the enterprise.
Services are the building blocks for a SOA-enabled application. They have functionality-
described standard interface and message structure definitions. Multiple services are
assembled and reused to more quickly create applications that can better support changing
business processes.
The SOA approach to software systems enables a consumer of a service to be decoupled
from the service provider. With SOA, services are accessed by using standard protocols (the
glue), which enable interoperability from decoupled functions.
Verify
a ble
Customer
Customer
Product
Order Status
Shipping
f e r
Status
Credit
Availability Charges
ans
n - t r
a no
h a s
o m )
u ide
m c
Warehousent Other Biz
G
Marketing CRM Finance
i b d e Trading
System System System
@ in Stu Mgmt Unit Partner
j a in this
a r k s e
n
ko e to
Copyright 2014, uOracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K
When embarking onl a SOA approach to systems integration, integrators begin by examining
O NA process requirements to identify functionality to be used as a service unit to help
business
K complete a business process. A service portfolio is identified from a set of services that are
required for implementing one or more business processes within a business domain.
A service portfolio can be realized by a combination of new and reused functionality. Existing
functionality can be wrapped as services by using the adapter technology. New services can
be created with SOA-enabled technologies, including web services, SCA composite
applications, BPEL, and a service bus.
When a collection of services has been identified to serve a business process, it is
recommended to store information about these services, their interfaces, and their message
structures in a common location such as an enterprise repository. This facilitates sharing and
reusability from design through production. Coupled with a service registry, an enterprise
repository can migrate runtime service information into the development, test, and production
operational environments. Coupling an enterprise repository and a service registry enables an
organization to implement strong SOA governance strategies for services throughout a
services life cycle, from the design-time environment to the runtime environment.
Verify
a ble
Customer
Customer
Product
Order Status
Shipping
f e r
Status
Credit
Availability Charges
ans
n - t r
a no
h a s
o m )
u ide
m c
Warehousent Other Biz
G
Marketing CRM Finance
i b d e Trading
System System System
@ in Stu Mgmt Unit Partner
j a in this
a r k s e
n
ko e to
Copyright 2014, uOracle and/or its affiliates. All rights reserved.
(
J AIN icens
When aR K
satisfactorylservice portfolio is created, the necessary services are assembled to
O NAa composite application to address a specific business requirement. Services are reused
form
K as appropriate in multiple composite applications. As a result, development time and
redundant functionality are dramatically reduced.
Composite
Application
BPEL Java Others
Client and Implementation
Assembly Model Specifications
Assembly Specifications Implementation Language
Specifications
a ble
f e r
an s
n - t r
o
nJDBC
Security Transactions
Reliable
SOAP JMS s a Others
messaging a
) h ide
Policy Framework c m
o t GuBindings
m Access n Method Specifications
Infrastructure Service i b d e
Specifications @ in Stu
j a i n t h is
a r k s e
n
ko e to
Copyright 2014, uOracle and/or its affiliates. All rights reserved.
(
J AIN icens
SCA isRaK l specifications.
collection of
O NA model specifications define a standard set of XML elements that are used to
Assembly
K define the structure and configuration of an SCA composite application.
Client & implementation (C&I) specifications define an implementation language, such as:
BPEL: The WS-BPEL Client and Implementation (BPEL C&I) model specifies how WS-
BPEL processes can be used as SCA components.
Java, C++, PHP: This specifies language-specific APIs and annotations, which enable
the creation of service components and service clients that are built in these languages.
Note: Oracle SOA Suite 12c implements BPEL and other components such as
Mediator. At this time, it does not implement C++ or PHP. The spring framework can be
used to integrate components that use Java interfaces into SOA composite applications.
Policy framework specifications capture and express nonfunctional requirements, such as
security of a service definition. The policy framework impacts the life cycle of components and
compositions. It supports specification of constraints, capabilities, and quality of service (QoS)
from component design through concrete deployment.
Binding specifications define how services and references are accessed by using different
transport types. There is a binding specification available for each different access method.
Reusability
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARb
Answer:
N
KOFalse. The Service Component Architecture (SCA) specification is complementary to SOA. It
provides a programming model for building applications and systems based on a SOA
approach.
Course Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
1 2 3
4 le
r a b
s f e
- t r an
n no
s a
h a
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
A SOAR K J islianceassembly of services, service components, and references that are
composite
NA and deployed together in a single application. Wiring between the service, service
Odesigned
K component, and reference enables message communication. The composite processes the
information described in the messages. The graphic in the slide provides an example of a
composite that includes an (inbound) exposed service, a variety of service components
interacting, and several external references.
1. Services provide the composite client with an entry point to the SOA composite
application. The service advertises its capabilities (also known as operations) to external
applications with a Web Services Description Language (WSDL) file. The binding of the
service describes the protocols that can communicate with the application. Examples
include SOAP/HTTP or a JCA adapter.
2. Service components are the building blocks of a SOA composite application. Oracle
SOA Suite 12c includes the following components:
- The BPEL Process component enables design and execution of a business process
that integrates a series of business activities and services into an end-to-end
process flow.
- The Business Rules component provides the means of making business decisions
based on defined rules.
4. Wires enable you to graphically define the flow of messages within a single SOA
composite application among services, service components, and references.
Note: The wire is not an actual call, but an ability to call. (For example, the routing rules in
Mediator or the invoke/receive activities in BPEL are actual calls, but they can only go
alongside previously defined wires.)
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
Filter
a ble
f e r
Transform
ans
n - t r
a no
It provides validation, filtering,
h a s
routing, and transformation
capabilities. o m
Route
)
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
OracleR K J routes
Mediator licedata from client applications to and from other service components,
O NA
and from service components to external partners. Using Oracle Mediator, you create routing
K services and rules for them. A routing service is the key component for moving a message
through the composite applicationfrom its entry point to its exit point. The rules determine
how a message instance processed by the routing service gets to its next destination. Using
the rules, Oracle Mediator can perform the following actions:
Route: Determines the service component (BPEL process, business rule, human task,
or Mediator) to which to send the messages
Validate: Provides support for validating the incoming message payload by using a
schematron or an XSD file
Filter: If specified in the rules, applies a filter expression that specifies that the contents
(payload) of a message be analyzed before any service is invoked
Transform: If specified in the rules, transforms document data from one XML schema to
another, thus enabling data interchange among applications by using different schemas
At run time, Oracle Mediator evaluates routing rules, performs transformations, applies
optional time delays, and invokes another service. In addition, it can subscribe to and publish
business events. A routing service can handle returned responses, callbacks, faults, and time-
outs.
Business
Process
Client
a b le
f e r
ans
n - t r
a noExternal
h a s Service
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K JProcess e
licManager
OracleRBPEL provides the standard for assembling a set of discrete
A
N into an end-to-end process flow, thus radically reducing the cost and complexity of
services
KOprocess integration initiatives. Oracle BPEL Process Manager enables you to orchestrate
synchronous and asynchronous services into end-to-end BPEL process flows. You integrate
BPEL processes with external services (known as partner links). You also integrate
technology adapters and services, such as human tasks, transformations, notifications, and
business rules within the process.
Note: Business processes that are based on Business Process Modeling Notation (BPMN)
can be built by using Oracle BPM (OBPM) Suite. The OBPM Suite is layered on top of the
SOA Suite, and shares a unified run time.
Oracle
Business Rules
implements
conditions as a ble
f e r
IF-THEN
ans
n - t r
structures or as
Rules
Rules
Decision tables.
decision Tables
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
OracleR K J Rules
Business liceenable dynamic decisions at run time, allowing you to automate
O NA constraints, computations, and reasoning while separating rule logic from underlying
policies,
K application code. Oracle Business Rules implements conditions as IF-THEN structures or as
decision tables. These conditions can be edited by a business analyst to update policies and
computational values with little or no assistance from a programmer.
Examples for using business rules include:
Dynamic processing: Rules can determine intelligent routing paths within a business
process based on service-level agreements or other guidelines.
Data validation and constraint checks: Rules can validate input documents or apply
additional constraints on requests.
Human task routing: Rules can be used to perform policy-based task assignments to
dispatch tasks to specific roles or users, or for balancing tasks among users to control
the task assignment load.
Worklist
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Application
a b le
complete complete
f e r
a n s
Task Service Assignee n-t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce processes require human interactions for approvals, exception
N AR or other activities that are required to advance the business process. The
Many end-to-end
management,
business
Adapters can be
inbound or outbound.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce interface that exposes external application functionality in a form
A R
Adapters provide a service
N
that can be used by the SOA composite application components. An adapter converts
KOrequests and responses into a form that is suitable for other (external) systems.
Oracle SOA Suite 12c is shipped with a variety of adapters that are commonly used to access
functionality that is not normally available in a service-oriented context, such as:
File and FTP adapters for reading, writing, and transferring files
Database Adapter for interacting with relational database data
JMS Adapter for communicating asynchronously with other applications through
message-oriented middleware (MOM) services, including Oracle Advanced Queuing
and IBM MQ
Because JCA adapters implement interfaces by using the Java Connector Architecture (JCA)
API standards, custom adapters can be developed to expose existing functionality that is not
usually available in a SOA application context. Adapters are an integration technology that
extends the reach of the SOA composite application.
JDeveloper supports a
number of tools for SOA
applications.
BPEL Editor
Mediator Editor
a ble
f e r
ans
n - t r
noTask Editor
Human
a
a
h de s
)
c om t Gui
i b m eBusiness n Rule Editor
in Stu d
i n @ is
r k j a t h
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
OracleR K
JDeveloper l the development component of Oracle SOA Suite. It forms a
is
O NA
comprehensive integrated service environment (ISE) for creating and deploying composite
K applications and managing the composite. Oracle JDeveloper enables developers to model,
create, discover, assemble, orchestrate, test, deploy, and maintain composite applications
based on services.
The SOA Composite Editor enables you to create, edit, and deploy services, and also to
assemble them in a composite application, all from a single location. These components are
integrated into one application, and they communicate with the outside world through binding
components such as web services and JCA adapters.
The SOA Composite Editor enables you to use either of two approaches for designing SOA
composite applications:
The top-down approach of building a composite application puts interfaces first and
implementation next. For example, you first add BPEL processes, human tasks,
business rules, and the Oracle Mediator routing services components to an application,
and later define the specific content of these service components.
component, and then you use BPEL Designer to design the component. BPEL Designer
is displayed when you double-click a BPEL process in the SOA Composite Editor.
Oracle Mediator Editor: You use Oracle JDeveloper to create a Mediator service
component, and then you use Mediator Editor to design the component. Mediator Editor
is displayed when you double-click a Mediator component in the SOA Composite Editor.
Human Task Editor: You use Oracle JDeveloper to create a human task service
component, and then you use Human Task Editor to design the component. Human
Task Editor is displayed when you double-click a human task in the SOA Composite a ble
f e r
Editor.
ans
- t r
Business Rules Designer: You use Oracle JDeveloper to create a business rules
n
no
service component, and then you use Business Rules Designer to design the
a
h a s
component. Business Rules Designer is displayed when you double-click a business
rule in the SOA Composite Editor.
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
a ble
f e r
ans
SOA Composer provides web-based
n - t r
access to various parameters at run time,
a no
allowing them to be edited without
h a s
ide
redeploying the project that uses them.
)
o m u
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
OracleR SOA liceis an EAR file that is installed as part of the Oracle SOA Suite
K JComposer
O NA It provides access to various configuration options at run time, allowing those
installation.
K options to be updated without needing to redeploy the project that uses them. Options
typically accessed include domain value maps and business rules.
composite application.
a. True
b. False
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARa
Answer:
N
KOTrue. Oracle Mediator routes data from client applications to and from other service
components, and from service components to external partners.
Course Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Domain Administration
Server
a ble
f e r
Managed Servers ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce applications are Java Enterprise applications, they must run in a
R
Because SOA composite
Acontainer.
N
Java WebLogic Server (WLS) provides the Java EE environment for these
KOcomponents to run. WLS is written in Java and executes on the standard JVM.
The Oracle SOA Suite 12c platform comprises one Oracle WebLogic Administration server
and one or more Oracle WebLogic Managed servers. Managed servers host application
components and resources. The Administration server provides a central point for managing
logical groups of resources that are organized into domains. Domains consist of one or more
Managed server instances that are managed through a single Administration server.
Note: There are no WLS programming interfaces that refer to domains. All domain-related
information is stored in configuration files. Only an administrator is aware of domains. WLS
domains can separate development, test, and production applications; administration and
operational responsibilities; or organizational and business divisions.
Domain Administration
Server
Managed Servers
a ble
f e r
ans
n - t r
a no
XSD, WSDL
h a s
Metadata
o m )
Servicesu ide
m c nRepository t G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceSuite 12c platform comprises one Oracle WebLogic Administration
N AR
The typical
server
Oracle SOA
and one or more Oracle WebLogic Managed servers. The example in the slide shows
KOa typical installation. It includes a domain named soa_domain, which includes an
Administration server and two Managed servers.
The Oracle SOA Suite 12c runtime environment requires an Oracle database to maintain the
SOA application configuration and runtime information. This database is known as the Oracle
Metadata Services Repository, or MDS (for MetaData Services). MDS is used to manage
deployed services and composite applications and this management happens transparently
for the application developers and Oracle SOA Suite 12c administrators.
MDS can also be used as a central location for storing and referencing shared service
artifacts, such as business events, rule sets for Oracle Business Rules, XSLT files for Oracle
Mediator, XSD and WSDL documents for Oracle BPEL Process Manager, and other service
documents, which can be deployed in a sharable archive format known as the Metadata
archive (.mar files).
Publish Subscribe
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
describes f e r
ans
n - t r
a no
EDL
Metadata h a s
o m
Service
)
u ide
m cRepositoryn t G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cway
A R
A business event is a for one application to notify another application of a significant
N
Ooccurrence to the business. When a business event is published, another application (or
K service component) can subscribe to it and initiate whatever processing is implied by that
event. For example, when product stock levels are updated in an inventory database, an
event can serve as a trigger or signal for another process to fulfill orders that have been on
hold until products become available.
A business event definition includes a unique name and a structure to contain information
about the event. Developers declaratively define business events and specify conditions that
dictate when the event is raised. As data is changed, these conditions are evaluated and all
events whose raise conditions are met are fired. The Mediator component can publish or
subscribe to events.
Business events are typically asynchronous fire-and-forget (one-way) notifications of a
business occurrence. The publisher does not rely on any service component receiving the
business event to complete. It does not need to know where subscribers are and what they do
with the data.
Note: If the author of the event depends on the receiver of the event, messaging typically
must be accomplished through service invocation rather than through a business event.
Unlike direct service invocation, the business event separates the client from the server.
The Event Delivery Network (EDN) provides an application with a way to publish events so
that a composite application with a Mediator component can subscribe to events that trigger
execution of the composite application. The enforcement points are implemented in such a
way that all request and response messages flow through a security pipeline (or filters) that
can apply security policies to internal and external message exchanges.
Note: Events will be covered in more detail in the lesson titled Designing and Managing
Business Events.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
SOA Infrastructure
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
Binding Components
f e r
ans
n - t r
File Other
HTTP
JMS o
nJDBC
SOAP
s a
h a
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceis a Java EEcompliant application running in Oracle WebLogic
N ARThe application manages composites and their life cycles, service engines, and
The SOA
Server.
infrastructure
KObinding components. Service engines execute the business logic for service components.
Binding components execute the logic for adapters.
The SOA infrastructure uses a normalized message structure while it provides the internal
message routing infrastructure capabilities for connecting components and enabling data
flow.
Note: A normalized message is a Java Map object where the key(s) is the part name of the
message and the value is a Document object representing the XML content.
The SOA infrastructure:
Receives messages from the service providers or external partners through SOAP
binding components, adapters, or the delivery API in the form of XML
Routes messages based on composite definition to the appropriate service engine
If response messages are returned from the service engine, they are sent to their targets.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARb
Answer:
N
KOFalse. Business events are typically asynchronous fire-and-forget (one-way) notifications of a
business occurrence. The publisher does not rely on any service component receiving the
business event to complete. It does not need to know where subscribers are and what they do
with the data.
Course Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Domain (DefaultDomain)
JavaDB
soa_quickstart_generic.jar
JDK 1.7.0_40
OL6U3 x86_64
About 30 minutes
to HelloWorld! host: soa12c.example.com
a ble
Load Balancer Load Balancer
f e r
SOA Suite SOA Suite
an s
WebLogic Server
- t
WebLogic Server
n r
no
WLS Node Manager WLS Node Manager
Domain (soadomain)
s a Domain (soadomain)
Admin Server
h a
) ide
Cluster Managed Server (soa_server1) Managed Server (soa_server1)
Enterprise DB 11.2.X.X
o m u
m
JDK 1.7.0_xx c nt G JDK 1.7.0_xx
b
ni Stude
OL6U3 x86_64
i OL6U3 x86_64
in@ this
host: soahost1.example.com host: soahost2.example.com
r j a
k se
a
on t2014, uOracle and/or its affiliates. All rights reserved.
( kCopyright o
A I N nse
K J l i ce differs from a full installation in setup speed and limited uses.
A R
A Quick Start installation
N
OThe Quick Start installer creates a new Oracle home that contains all the software required for
K a development or an evaluation environment on a single host.
After spending about 30 minutes running the installation wizard and completing related tasks,
you can start developing and testing your SOA applications by running Oracle JDeveloper
from the Oracle home.
However, Quick Start installations are limited to one Administration server with no option to
add Managed servers.
You also cannot upgrade your Quick Start distribution to a production environment.
Note: If you know that you want a production environment with additional Managed servers or
clusters, you should not use Quick Start. Instead, see Planning the Oracle SOA Suite and
Business Process Management Installation in Installing and Configuring Oracle SOA Suite
and Business Process Management to install a full-scale development environment that can
be scaled to a production environment.
Course Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
In this R
practice, iceguided through the Developer Quick Start installation process and
K J you lare
NA
Oyou should be able to use Oracle SOA Suite in about 30 minutes. The installer does the
K following:
Installs all the components that are necessary for development with the core of Oracle
SOA Suite (BPEL, Business Rules, Mediator, and Human Work Flow)
Launches JDeveloper after the installation, automatically registering the IDE plug-ins for
Oracle SOA Suite
The SOA Suite 12c Developer installation contains:
JDeveloper
WebLogic Server
SOA Suite runtime components
BPEL, Human Workflow, Rules, Mediator
Service Bus (not used in this course)
JDeveloper IDE plug-ins for the preceding components
All software is installed in a single middleware home directory that you specify.
JavaDB
a ble
f e r
JDK 1.7.0_40
ans
n - t r
OL6U3 x86_64
n o FMW
s a Console
host: soa12c.example.com
) ha de
c om t Gui
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K
Your environment l
consists of a server configured with Linux and Java already installed. In this
A
Nsubsequent practices, you first install Oracle SOA Suite. You then use JDeveloper,
and
KOOracle Enterprise Manager, and Fusion Middleware Console to develop, deploy, monitor, and
manage a number of example applications.
Optionally, set
# startInstall.sh ORACLE_HOME.
export JAVA_HOME=/usr/bin
export ORACLE_HOME=/u01/app/fmw12c/Oracle_Home
cd /home/oracle/labs/software
a ble
$JAVA_HOME/java -jar soa_quickstart_generic.jar
f e r
an s
n - t r
Run the appropriate .jar file. a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
BeforeR K J theliQuick
launching
ce Start installer, set the environment variable JAVA_HOME to point
toN Alocation of your JDK. You can also set ORACLE_HOME. Although this step is not
the
O
K necessary, it will simplify the process of navigating to the various directories when you are
running the installation and configuration commands.
Navigate to the directory that includes the installation files. These files may include several
.jar files, but you will only need to run the one named soa_quickstart_generic.jar.
Application
Navigator
Component
and Resource
Palettes a ble
f e r
Design Canvas (various editors) ans
n - t r
a no
Structure Messages and Output ) h
as e
c om t Guid Property
Inspector
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K amountl of work in this course is completed by using JDeveloper. Some important
A significant
NA of the interface are highlighted in the slide.
Oelements
K In the upper-left region of the editor is the Application Navigator, which provides access
to your applications and projects, as well as the individual files that comprise those
projects.
The large pane in the center is the Design Canvas. It displays different editors,
depending on the kind of files that are currently open for editing. Tabs across the top
provide access to the individual files that are currently open for editing.
To the right of the Design Canvas is the Component palette, which provides collections
of icons to support the editing functions of whatever editor is currently active in the
Design Canvas.
The Structure pane can be found in the lower-left region of the interface. It provides a
hierarchical view of the component or file that is currently being edited in the Design
Canvas.
Properties for the actively edited file can be viewed and edited in the Property Inspector
pane, which is found in the lower-right region of the window.
The lower-center section of the window is reserved for messages and output resulting
from various actions, such as deploying an application. You use each of these panes in
this course.
Oracle SOA Suite 12c: Build Composite Applications 1 - 51
Starting the Integrated Server
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cwith
A R
JDeveloper is bundled an integrated application server called the Integrated WebLogic
N The integrated application server is a Java EE runtime for services that are optimized
Server.
KOfor the iterative code development cycle.
Launch the Integrated WebLogic Server by selecting Run from top menu bar. Select Start
Server Instance from the drop-down menu, as shown in the slide.
a b le
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
claunch
A R
The first time that you the server instance, you are prompted to enter a password for
N default domain, as seen in the screenshot in the slide. The Administrator ID, Listen
your
KOAddress, Listen Port, and SSL Listen Port fields should already have values. Review them
and make any appropriate changes.
Launching the integrated server will take several minutes. You can track the servers launch in
the Messages window pane at the bottom of the JDeveloper screen. When the following
messages appear in the log, the Integrated WebLogic Server has launched successfully.
<Notice> <WebLogicServer> <BEA-000360> <The server started in
RUNNING mode.>
<Notice> <WebLogicServer> <BEA-000365> <Server state changed to
RUNNING.>
SOA Platform is running and accepting requests
KO
N
ARK
J l
(
AIN icens
a r j a
kon e to u
k se
i
in@ this
b m
o
ni Stude
m ) h a
c nt G u
a
ide
s
n no
- t r an
s
f e r a b
le
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Objectives
Mediator Components
File Adapters
Composite Application Files
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Service
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Operation
a b le
f e r
a n s
Input Output Fault n-t r
a no
h a s
o m )
u ide
m c nt G
b
Calling Application
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
e
K J welicdefine
For ourRpurposes, a service as software, which is available over the Internet or a
A
N and which exposes functionality as one or more operations, or actions, to other
Onetwork
K applications.
The service and calling application exchange messages. Although there are several different
interaction patterns, in a common scenario, the calling application invokes the service and, as
part of that invocation, provides input data. The service then either completes its unit of work
and returns data or if it is unable to complete the requested operation, it may instead return
information about the failure.
In order for the calling application to exchange messages with the service, a means must be
defined for the application to provide the required information in an acceptable format, and for
the application to interpret the output (or fault) message provided by the service. Although not
a strict requirement, XML is commonly used for these input, output, and fault messages, and
XML Schema Definition (XSD) is used to describe the structure of these XML messages.
Request
Synchronous request/response
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Reply/Fault
Real-time response or error feedback
Client in waiting mode
Request
Asynchronous request/callback
Callback
Client free after request submission le
r a b
Separate service invocation for response f e
ans
n - t r
o
Asynchronous request only
s a n One-Way
Also known as fire and forget m) h ide
a
c o t Gu
Client free after request submission
b m en
i
No response message in S
@(ACK tud
only)
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
The interaction l in the previous slide included input, output, and (possibly) a fault
K described
O NA Mediators support both synchronous (request-reply) and asynchronous (both one-
message.
K way and callback response) interactions.
In a synchronous interaction, the client requests a service, and then waits for a response to
the request. While the client waits, the communication channel between the parties is left
open until the response occurs. This may be undesirable if large numbers of channels are left
open for long periods of time. It may not be needed if the client does not need an immediate
response. In these cases, an asynchronous response may be more appropriate.
In an asynchronous interaction, the client invokes the service but does not wait for a response
before continuing. Asynchronous operations open a communication channel between the
parties, make the request, and close the channel before the response occurs. The response
may come at a later time via a callback operation, or not at all for one-way interactions.
namespace
<?xml version="1.0"?>
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
types
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
message
portType Abstract WSDL
operation (what the service does)
input
output le
A WSDL file
r a b
typically has
s f e
two parts.
parts
- t r an
binding n no
service Concrete WSDL s a
(how/where h a
) toidaccess) e
port m
o
c nt G u
b m
i ni Stude
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceof messages to be exchanged between a calling application and a
N ARis important, but is not enough to enable the applications to converse. For this, a Web
Describing
service
the structure
KOService Description Language or WSDL document is used. This (XML) description includes
the format of input, output, and fault messages, and the data types they use. It also includes
the names of operations that the service provides, and how and where to find the service.
The information in a single WSDL document is organized into two parts: the abstract definition
(what a web service does) and the concrete definition (how and where to access the service).
Abstract definitions include types, message, operation, and portType.
Types define the data types used in messages. These types are often drawn from the
XML Schema Language.
Messages describe the parts of the input, output, and fault messages that are
exchanged with the calling program.
Operations provide a name for the action performed on messages.
PortTypes group messages with operations.
<wsdl:definitions
name="ReceiveData"
targetNamespace="http://oracle.com/sca/soapservice/Basics/HelloWorld/ReceiveData"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:inp1="http://www.example.org/ns/porder"
xmlns:tns="http://oracle.com/sca/soapservice/Basics/HelloWorld/ReceiveData"
>
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" >
<import namespace="http://www.example.org/ns/porder" schemaLocation="xsd/po.xsd" /> 1
</schema>
a ble
</wsdl:types>
f e r
<wsdl:message name="requestMessage">
2 an s
<wsdl:part name=part1" element="inp1:PurchaseOrder"/>
</wsdl:message> n - t r
<wsdl:portType name="execute_ptt">
a no
<wsdl:operation name="execute">
<wsdl:input message="tns:requestMessage"/> 3 h a s
</wsdl:operation>
o m )
u ide
</wsdl:portType>
m c nt G
</wsdl:definitions>
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cWSDL
A R
In the sample abstract file shown in the slide:
N
1. Section 1 includes an import statement and a reference to the po.xsd file. Although
KO the data types could have been included directly in this WSDL file, it is a better practice
(because it promotes reuse) to separate the data type definitions into an XSD file, and
then to import the file.
2. Section 2 describes the requestMessage message. The description includes the
name of the (single, in this example) part, and the name of the element that describes
the message structure of that part. The message element PurchaseOrder is fully
described in the imported po.xsd document.
3. Finally, section 3 describes the port type execute_ptt, which groups a specific
operation (execute) with the message requestMessage.
Note: The number and order of messages in the portType definition of a WSDL is important.
Because you see only a single message listed in this example, you know that operation
execute is a one-way operation. If you saw a second message, you could assume that the
operation returned a response upon completion.
binding
service Concrete WSDL
port (how/where to access)
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cegenerated by JDeveloper for local services (those within the WebLogic
N ARmay not include the concrete portion of the WSDL. However, the WSDL documents
The WSDL
Server)
documents
KOfor services deployed outside the WebLogic Server will include the concrete elements of the
WSDL, which provide additional information about how and where to access the service:
The binding describes how a given portType operation is transmitted, such as HTTP or
SOAP (that is, the protocol), and provides information about where the service is
located.
The port specifies a combination of a network address and a binding, which constitute
an endpoint.
A service groups ports together. A service reveals to a calling program where to access
the web service, and through which port. It also describes how the communication
messages are defined.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARb
Answer:
N
KOFalse. The information in a single WSDL document is organized into two parts: the abstract
definition (what a web service does) and the concrete definition (how and where to access the
service).
Mediator Components
File Adapters
Composite Application Files
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Validate
Filter
a ble
f e r
Transform
ans
n - t r
a no
h a s
Route o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cecomposite application may need to be filtered, transformed, validated,
A R
Data flowing through a
N
and routed from a source to one or more target services. Mediator components (or simply
KOMediators) offer these capabilities. A Mediator provides a lightweight mediation framework to
manage data between clients and services.
Routing Rule 1
Target
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Service
Routing Rule 1
Target
Service
a b le
Routing Rule 2 f e r
Target
a n s
-t
Service r
n on
s a
a
h de
Routing Rule 1 m)
c o t Gui Target
i b m en Service
i n Stud
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cthe
A R
Routing data, which is primary purpose of a Mediator component, is accomplished by
N one or more routing rules. Each routing rule specifies a target service for the data.
adding
KORouting rules allow you to specify validation, filters, and transformations. Routing rules can
handle returned responses, callbacks, faults, and timeouts.
In the first example in the slide, a routing rule is applied to an incoming XML message. A
transformation is performed and the message is passed to a specified destination.
Transformations are a required part of a routing rule configuration.
In the second example, two routing rules are defined. Each is applied to the incoming
message. In the diagram, each rule has filtering and validation defined. These are
defined in addition to the message transformation. For each routing rule, the message
must pass validation, meet filter criteria, and be transformed before it can be routed to
the specified destination.
The third example shows a routing rule with validation and a transformation defined, but
no filter. Filters and validations are always optional in the configuration of a routing rule.
XSLT
Processor
a ble
f e r
a n s
Input XML XSL n
Output
r
-t XML
o
Document Mapper
s a n Document
) ha de
c om t Gui
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
Mediator K l support data transformation from one XML schema to another. This
routing rules
O NA data interchange and enrichment between applications by using different schemas.
enables
K For example, the source XML schema may have last name and first name as separate
values. The target XML schema may have the full name (both first and last) stored as one
value. Through transformations, you can concatenate the first and last names from the source
data before it reaches the target data.
Transformations are defined in XSL files that can be visually designed by using the XSLT
Mapper (a visual editing tool), which is provided by Oracle JDeveloper 12c. The XSL file is
deployed with the composite application so that the Mediator engine can process the mapping
rules in an XSL processor that is available in the runtime environment.
be applied to
message payload
content.
If a condition evaluates
to true, the message is
a ble
routed to its target.
f e r
an s
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cprovide
A R
Mediator routing rules content (payload)based filtering criteria to ensure that data is
N to a suitable target. If the condition evaluates to true for a given message instance, the
routed
KOdata is routed to the target defined in the routing rule.
For example, a Mediator receives a file from an application or service that contains data about
new customers. Based on the country mentioned in the customers address, data can be
routed to the database that stores data for that particular country.
Syntactic
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Processing continues
Syntactic validations
are applied once to
Fault generated
each incoming
message.
a ble
f e r
Semantic s
ran
Processing continues
n -t
o
s an
) ha de
Semantic validations
c om t GFault ui generated
can be applied in
i b m en
each routing rule.
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
Mediator K
routing rulesl provide support for two levels of validation of incoming message
O NA The first level uses an XSD file to validate the payload structure, ensuring that it
payloads.
K has the correct element hierarchy and relationships based on the XSD definition. The second
level of validation is semantic. It uses a schematron (.sch) file to validate the message
content. You can specify schematron files for each inbound message part and Mediator can
execute schematron validations for those parts. For example, you can check whether a price
element value contains suitably formatted numeric data and is within a range of values. If
either syntactic or semantic validation fails, the routing rule is not processed and a fault is
generated, which is returned to the caller of a synchronous operation.
Note: Enabling validation incurs some overhead because of the execution time required to
perform the validation rules. For more information about Schematron specifications, refer to
http://www.schematron.com.
Static Routing
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Target
Service
Mediator Components
File Adapters
Composite Application Files
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
SCA Composite
External Existing
SOAP JCA Adapter
(SOAP) Application
Reference Reference Functionality
Client
Bindings a b le
f e r
ans
n - t r
SOAP JMS Other a no
REST JCA
h a s
o m )
u i de
Service Infrastructure
m c nt G
Web Service b
ni Stude EIS/DBMS
@ i
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K for JEE lConnector Architecture and is part of the JEE specification. JCA
JCA stands
O NA the concept of resource adapters, or simply adapters. Adapters are deployed in a
describes
K Java EE container. An adapter exposes an API through which a service component can
access an external application as if it were a web service. Adapters are described by a WSDL
document, which is the only view the service component has of the external system. The
adapter itself is transparent to the service component. This enables interoperability with
heterogeneous applications, which are provided by different vendors, based on different
technologies and platforms. By creating a service interface where none existed, an adapter
provides another type of service in your service portfolio.
A number of technology adapters are available for Oracle SOA Suite 12c Mediator and BPEL
components, including:
REST binding: The Representational State Transfer (REST) binding is available for
SOA composites and Service Bus services. It allows the configuration of REST
interactions as exposed interfaces and allows the invocation of externally available
REST services.
database.
File/FTP adapters: An inbound File or FTP adapter service reads data from a local or
remote file system, transforms the file data into an XML message, and sends it to an
Oracle SOA Suite component when a new text file appears in a local file system. An
outbound File adapter service transforms the contents of an XML message to a text file,
and writes it to a local or remote file system.
Oracle Applications (OA) adapter: An inbound OA adapter sends XML messages to
Oracle SOA Suite on receiving messages from an Oracle E-Business Suite interface. An
a ble
outbound OA adapter sends data from Oracle SOA Suite to Oracle Applications by f e r
using interface tables, APIs, and concurrent programs. ans
n - t r
based protocols. a no
Socket adapters: These communicate either as a client or server by using TCP/IP-
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
Adapter Mediator
Supports: a ble
f e r
Multiple file formats
File pattern matching Mediator Adapter-tra
ns
n on
s a
) a
h de
c om t Gui
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
As the R K implies,l a File adapter reads and writes files to the operating system. Pattern
name
NA capabilities enable filter processing for specific sets of files. XML schema
Omatching
K documents are used to support the parsing and formatting of different file formats such as
delimited, positional, XML, binary, and COBOL copy books. Error recovery and checkpoint
capabilities facilitate management of exception conditions. Scalability is obtained through the
multi-threaded execution environment, which supplies connection management, and batching
and debatching capabilities.
When configured to read files, a File adapter is configured as an exposed service, forming the
composite applications entry point. Within the composite application, it is wired to either a
Mediator or a BPEL component. When configured to write files, the File adapter is configured
as an external reference, and serves as the target of a BPEL service invocation (more on this
later) or as the target of a Mediator routing rule.
Reading or writing a file thus is a one-way operationthat is, in the case of a write operation,
the File adapter service writes the payload to a specified file name in a specified directory. It
does not send a response to the composite application. In the case of a read operation, the
File adapter polls a specific directory for new files. When found, the File adapter passes the
file payload to the composite application, but does not wait for a response from the composite.
as XML data.
a. True
b. False
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARa
Answer:
N
KOTrue. The File adapter supports multiple file formats. It can convert native format data to XML,
and XML to native formats.
Mediator Components
File Adapters
Composite Application Files
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
[header]
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
<composite [attributes]>
<import namespace=[namespace] location="ReceiveData.wsdl" importType="wsdl"/>
<import namespace=[namespace] location="WriteData.wsdl" importType="wsdl"/> 1
<service name="ReceiveData" ui:wsdlLocation="ReceiveData.wsdl">
<interface.wsdl interface=[path]ReceiveData#wsdl.interface(execute_ptt)"/>
<binding.ws port=[path]ReceiveData#wsdl.endpoint(ReceiveData/execute_pt)">
<property [config properties]> 2
</binding.ws>
</service>
<component name="RouteData">
<implementation.mediator src="RouteData.mplan"/> 3 a b le
</component>
f e r
<reference name="WriteData" ui:wsdlLocation="WriteData.wsdl">
a n s
r
n-t 4
<interface.wsdl interface=[path]WriteData#wsdl.interface(Write_ptt)"/>
no
<binding.jca config="WriteData_file.jca"/>
</reference>
<wire>
s a
h a
ide
<source.uri>ReceiveData</source.uri>
<target.uri>RouteData/RouteData</target.uri>
m ) 5
</wire> o
c nt G u
...
b m
</composite>
i ni Stude
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J
A composite.xml l i ceis automatically created when you create a SOA project. This file
file
N AR the entire composite assembly of services, service components, references, and
describes
O
K wires. The example in the slide is formatted to make it easier to read, and shows the following
key elements:
1. The <composite> element encapsulates the entire composite assembly information.
2. The <service> element represents the service that is exposed by the composite.
- The <interface.wsdl> element names the portType of the service. (Note that
interface.wsdl does not refer to a file name in this case.)
- The <binding.ws> element includes port information to expose the service to
external clients.
3. The <component> element represents a Mediator, and includes a link to the source
implementation file. (Additional <component> elements would be included for each
additional component in the application.)
4. The <reference> elements describe connections to the external services that are
referenced by the components in the composite application.
5. The <wire> element defines how data will flow among components. (Additional wires
would be present to connect additional components and external references.)
a ble
f e r
ans
n - t r
composite.xml
a no
<component name="RouteData">
h a s
<implementation.mediator src="RouteData.mplan"/>
o m )
u ide
m c nt G
</component> b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce to a composite application, several project files are created or
N AR
When a Mediator
modified:
is added
KO A .componentType file describes the services and references for each component.
This file tracks the wiring that is created between components, and ensures that the
wires work as designed.
An .mplan file contains the Mediator metadata. This includes implementation details
such as routing rules, links to transformations, filters, validations, and references to
target services.
A .wsdl (Web Services Description Language) file specifies how other services call an
Oracle Mediator. A .wsdl file defines the input and output messages and operations of
an Oracle Mediator. The .wsdl file is not created in every circumstance, but is created
if you specify an interface definition for the component by selecting the Asynchronous
Interface, Synchronous Interface, the One-Way Interface, or the Interface Definition
from WSDL templates.
A <component> element is added to the composite.xml file.
An <import> element is added to the composite.xml file for the component WSDL
interface.
a ble
f e r
ans
composite.xml
n - t r
<composite [attributes]>
a no
. . .
h a s
) ide
<reference name="WriteData" ui:wsdlLocation="WriteData.wsdl">
m
<interface.wsdl interface=[path]WriteData#wsdl.interface(Write_ptt)"/>
o u
<binding.jca config="WriteData_file.jca"/>
m c nt G
</reference>
b
ni Stude
. . .
i
in@ this
</composite>
r j a
k se
a
on t2014, uOracle and/or its affiliates. All rights reserved.
( kCopyright o
A I N nse
K J l i ce to a composite application, several project files are created or
N AR
When an
modified:
adapter is added
KO A .componentType file describes the services and references for each component.
This file tracks the wiring that is created between components, and ensures that the
wires work as designed.
A .jca file contains the adapter implementation details. In the case of a File adapter
that is configured to write data, the details would contain a directory name and a file
naming pattern, as well as other information.
A .wsdl file is created that includes the abstract WSDL information about the service
that the adapter provides.
An <import> statement is added to the composite.xml file, which makes the .wsdl
file contents available.
A <reference> element is added to the composite.xml file that aggregates the
references to the adapter .jca and .wsdl files. This also includes the binding
information that substitutes for the concrete information in a WSDL.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
an s
Application-level functions,
including:
n - t r
New,
a no
Open,
h a
Close,
s
o m
)Delete, u ide
m c nt G Rename,
b
ni Stude and more are available.
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
J lice tasks is provided by the Application Navigator menu.
AccessRtoKapplication-level
O NA
K
a ble
f e r
ans
n - t r
Selecting the SOA Application template
causes the wizard to guide you through a no
the creation of a SOA project.
h a s
(Remember that the application is only
o m )
u ide
a container. The real work is defined
in the projects that you add to that m c nt G
container.)
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cProject
A R
When you select New from the Application Navigator menu, the Create Application
N is invoked. The wizard displays a series of windows in which you make choices and
wizard
KOinput values to create the new application. In the example in the slide, the SOA Application
template is selected. This selection drives the content and choices of some of the subsequent
windows in the wizard.
KO 1. On the Name your application page, you can optionally change the name and location
for your application.
2. On the Name your project page, you can optionally change the name and location for
your SOA project. By default, Oracle JDeveloper adds the SOA project technology, the
composite.xml file that describes the SOA composite application, and the necessary
libraries to your model project.
3. On the Configure SOA Settings page, click Empty Composite for this example, and click
Finish.
a ble
f e r
ans
n - t r
The Component Palette
a no
allows you to add
service components and h a s
adapters to your
o m )
u ide
application.
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce is created, the Composite Editor is opened. It is on that blank
N ARthat you build the model of your composite application. The service components and
When the
canvas
SOA Application
KOadapters for this model are accessed from the Component Palette, which is displayed on the
right side of JDeveloper.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m
Specify the validation, filtering, and transformation c nt G
details for each Mediator routing rule. i b
n Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
care
A R
Mediator routing rules configured from an input window. From that window, filters,
N
validations, and transformations can be defined and modified. In the practice, you create a
KOminimum transformation. In later practices, you create more complex transformations, and
define filters and validations.
1 2 3 4
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
composite.xml b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
ProjectRfiles lice in the Application Navigator under the <ProjectName>/SOA folder
K Jare organized
NA
structure.
O
K 1. The composite.xml file is displayed as <ProjectName>. This makes it easier to
navigate among the JDeveloper editing tabs when multiple composite.xml files are
open.
2. The WSDL file for the service binding is stored in the SOA/WSDL folder.
3. The Mediator configuration files (.mplan) are stored in the /Mediators subfolder. The
XSLT transformations, including those found in mediators, are stored in the
/Transformations subfolder.
4. The Adapter files are stored in the /Adapters and /WSDLs subdirectories.
composite.xml
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
WriteData_file.jca
a ble
ReceiveData.wsdl WriteData.wsdl
f e r
ans
n - t r
no
po.xsd
s a
h a
RouteData.mplan
o m )
u ide
m c nt G
b
ni Stude
i
PurchaseOrder_To_PurchaseOrder.xsl
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce building your first composite application, it looks like the model at
N
the ARof the slide. The bottom portion of the slide lists the files that are created with each
When you
top
have completed
KOcomponent. The red dashed lines indicate the references between files and, from that, the
underlying relationships between the components.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
build
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
SAR File
deploy
SOA Infrastructure
BPEL Mediator
Business Human
a ble
Rules Workflow
f e r
ans
Event Delivery Network
n - t r
Enforcement
Points
Web Service
Policy Manager a no
Message
h a s
o m )
u ide
m c
HTTP en
tG
File Other i b
n SSOAP d JMS JDBC
i t u
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
When a
A R composite application is assembled and each of its components configured, it is
N for deployment and testing in a runtime environment. Deployment consists of several
ready
KOseparate steps:
1. Building the application
- All service components are included in a file. This file is in the JAR file format, and
is known as a Service Archive (SAR) file. The SAR file is a deployment unit that
describes and packages service components such as BPEL processes, business
rules, human tasks, and mediator routing services into a single application.
2. Deploying the application
- The SAR file is passed to the target server, which unpacks the archive, and
immediately begins executing the application.
sca_HelloWorld_rev1.0.jar
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce composite application in Oracle JDeveloper, the composite is
N AR in a SAR file. SAR is a JAR file (for a single composite application) and is named in
When you
packaged
deploy a SOA
KOthe format sca_<ProjectName)_<revision>.jar. The SAR file can include the following
artifacts:
Binding components and service components
References to Oracle Web Service Manager (OWSM) policies and human workflow task
flows
Metadata such as WSDL and XSD files
Note: The SAR file is generated in the deployment folder that is specified in the Project
Properties settings. By default, this is the deploy subfolder of the project.
deploy
SOA Infrastructure
BPEL Mediator
Business Human
a ble
Rules Workflow
f e r
ans
Event Delivery Network
n - t r
Enforcement
Points
Web Service
Policy Manager a no
Message
h a s
o m )
u ide
m c
HTTP en
tG
File Other i b
n SSOAP d JMS JDBC
i t u
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce Workspace may contain multiple projects. Using the Application
R
A JDeveloper
Aand Application
O N
menu application properties, JDeveloper enables you to create a SOA bundle to deploy
K multiple applications with one deploy operation, instead of deploying each separately. Each
project should have its own deployment profileeither the default profile or a deployment
profile that you create. The SOA Bundler creates a ZIP file that contains one or more SOA
archive files. If you deploy using a SOA bundle, all the SOA archives specified on the SOA
Bundle Deployment Profile Properties Dependencies page are generated (if they do not exist)
and added to the SOA bundle ZIP file. The SOA bundle ZIP file is written to the file name and
location specified in the SOA Bundle Deployment Profile Properties General settings. By
default, this is a deploy subfolder of the Application Workspace directory.
SOA Infrastructure
1.0 1.1
a ble
f e r
an s
Each deployed
n - t r
version has a unique
endpoint URL.
URL a no
h a s
o m )
u ide
m c nt G
b
ni StudC2 e
C1
@ i C3
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
A SOAR K
composite l
application is automatically activated when you deploy it to the SOA
N A
Oinfrastructure. During deployment, you can specify a specific revision number for the
K application. A revision is a specific deployed version of the application. You can deploy
multiple revisions of an application to support different client requirements at the same time.
The benefit of revisions is that an older version can be executed in the same environment as
a new revision. Older client applications are supported until they can be modified to use the
new revision. For example, client C1 is using the composite application CA version 1.0 by
explicitly specifying the revision number. New partnerships with different clients (C2 and C3)
who require the new revision can invoke it either by specifying its revision or excluding the
revision information, causing the default revision (the new version) to be invoked. Later, you
can plan the migration path for the old client to the newer revision of the application.
The revision value is added to the application name in Oracle Enterprise Manager Fusion
Middleware Control Console. Revision 1.0 is the default version for many deployed SOA
composite applications. If a new request comes in for a specific composite application
revision, that composite application revision is invoked. If a new request comes in without
specifying a revision, the default revision is invoked.
Note: An archive selected for deployment can be a SOA composite bundle (containing
multiple SOA composite application revisions). However, there should not be any cross-
references between composites in the same bundle. For example, Composite A revision 1.0
should not reference Composite B revision 1.0.
Oracle SOA Suite 12c: Build Composite Applications 3 - 8
Redeploying an Application
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
ccomposite
A R
When you redeploy a application, you overwrite the specific version with a new
N of the application. If the application is redeployed as the default revision, the active
copy
KOversion is immediately replaced, causing any running instances to be terminated. The
terminated instances have their runtime state changed to stale.
If you wish to apply configuration and updates to a composite application, and those changes
do not modify the interface definition (and therefore, affect clients from a design perspective),
the revision ID need not be changed. In this case, redeploying the application makes sense.
You might also choose to redeploy to make an older version of the composite application the
default revision.
Note: In a production environment, overriding an active version of an application may have
negative consequences. Care should be exercised when deciding whether to deploy a new
version of an application or when overriding an already deployed version.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
In the SOAK J l i
Deployment
ceConfiguration dialog box, you can manage the following configuration
N AR
settings:
O
K Project: Displays the project name. However, if you are deploying multiple projects by using
a SOA bundle style deployment, the configuration window displays multiple project tabs. The
Project fields value changes when you select a project name tab to enable you to view and
define the following settings for each project:
Current Revision ID: Is a read-only setting that shows an existing project revision (if
previously deployed). By default, this appears as the value 1.0.
New Revision ID: Enables you to change the revision ID of the SOA composite
application
Note: If you do not change the revision ID, you should select the Overwrite any existing
composites with the same revision ID check box.
SOA Configuration Plan section: Enables you to select a configuration plan file (if any
exist) to be applied to the deployed application. When using a SOA bundle to deploy
multiple projects, each project may have its own configuration plan attached.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
1
[04:19:27 PM] Target platform is (Weblogic 12.x).
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
c
warning/severe messages to partition "default" on server DefaultServer
m en
[http://soa12c.example.com:7101]
i
n Studb
[04:19:35 PM] Elapsed time for deployment: 8 seconds 4
i
in@ this
[04:19:35 PM] ---- Deployment finished. ----
r j a
k se
a
on t2014, uOracle and/or its affiliates. All rights reserved.
( kCopyright o
A I N nse
K J l i ce each step of the deployment process.
A R
The deployment log records
N
KO1. When deployment is started, the target platform is identified. The application is checked
to see whether it can meet all dependencies for execution on this platform.
2. The project is compiled as a service archive and packaged in a .jar file.
3. A connection is made to the target host, and the deployment descriptor is sent with the
.jar file. The application server deploys the application and returns a response.
4. The response from the application server is displayed in the log file, along with the
elapsed time for the entire deployment process.
SOA Infrastructure
state=active
turn off
deploy
turn on
Enterprise
Manager
Removed
retire activate a ble
f e r
ans
undeploy
n - r
state=shutdown
t
a no
JDeveloper
state=stale
state=retired ha
s
o m )
u ide
b
Existing instanceistate mc ent G
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
When an R Kapplicationl is deployed, it is automatically made active. It remains in the active state
O NAsome administrative action is taken. Possible administrative actions include turning off or
until
K retiring the application. When an application is turned off (or shut down in Oracle Enterprise
Manager), that revision of the application is shut down. New requests to the composite are
rejected. An application that has been turned off can also be turned on (or started up in
Oracle Enterprise Manager). When an application is turned on, the application is restarted.
New requests are processed. No recovery of messages occurs.
An active application can also be retired. When an application is retired, no new instances of
that revision of the application are created and any request is rejected. Existing instances are
allowed to complete normally. Only active composites can be retired. An application that has
been retired can also be activated. When an application is activated, new requests are
processed and new instances are created.
Undeploying an application removes the selected application revision. You cannot configure,
monitor process instances, or view previously completed processes of that revision of the
application. The state of any currently running instances is changed to stale, and they are
effectively terminated. The default revision is changed to the next available revision of the
application (if one exists). Applications with running instances should be retired before they
are undeployed. This will give all running instances an opportunity to complete.
deployed
Target
Environment 1
Configuration
Plans
a ble
f e r
ans
SOA Archive n - t r
deployed
a no
h a s
m )Target ide
c o G u
b m en t
Environment 2
i
in Stud
@
in this
r k j a
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
As youR K projectsl from one environment to another (for example, from testing to
move
NA
Oproduction), you typically must modify several environment-specific values, such as Java
K Database Connectivity (JDBC) connection strings, host names of various servers, and so on.
Configuration plans enable you to modify these values by using a single text (XML) file called
a configuration plan. The configuration plan is created either in Oracle JDeveloper or with
command-line tools such as the ant-sca-text.xml Ant script. During process deployment,
the configuration plan searches the SOA project for values that must be replaced to adapt the
project to the next target environment.
Thus, you can create multiple configuration plans for different target environments without
directly modifying the original source code that was created during development.
<SOAConfigPlan ...>
<composite name="EchoMediatorComposite">
<import>
<searchReplace>
<search>soa12c_dev.example.com</search>
<replace>soa12c.example.com</replace>
a ble
f e r
</searchReplace>
ans
</import> ...
n - t r
no
</composite>
</SOAConfigPlan>
s a
h a
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce plan is relatively straightforward, by including the appropriate
N AR
Modifying the configuration
<searchReplace> elements and their <search> and <replace> child elements with
KOappropriate values. The slide example shows how to provide search and replace host name
strings that are found in the schemaLocation attribute of a WSDL import element.
You can modify the configuration plan file to replace the following attributes and properties:
Any composite, service component, reference, service, and binding properties in the
SOA composite application file (composite.xml)
Attribute values for bindings (for example, the location for binding.ws)
The schemaLocation attribute of an import in a WSDL file
The location attribute of an include in a WSDL file
The schemaLocation attribute of an include, import, and redefine in an XSD file
Any properties in JCA adapter files
Modify and add policy references for service and reference binding components
Note: Editing the configuration plan requires that you know the assembly model structure and
all the service artifacts used by the composite application. For more information, refer to the
Fusion Middleware documentation titled Developing SOA Applications with Oracle SOA Suite.
Systems
Service
MDS
Registry
Config
Plans
a b le
WSIL
f e r
ans
n - t r
deploy deploy
n o deploy
s a
) a
h de
c om t Gui
i b m en
DEVELOPMENT
@ in Stud
TEST PRODUCTION
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
The slideKillustrates lone possible scenario for migrating an application from development to
A production environments. Each phase of migration can use any of these tools:
Nand
test
K O
Oracle JDeveloper 12c is typically used during the development phase. With
JDeveloper, you use a source code control system (SCCS) for version control of the
composite application source code and its configuration plan.
Ant is a command-line tool that can be used to deploy a composite application with the
deployment plan modified for the test environment. After successful testing, the
composite application and test deployment plan are checked in to the SCCS.
Oracle Enterprise Manager 12c Fusion Middleware Control can deploy the composite
application with the deployment plan modified for the production environment.
The deployment configuration plan simplifies the process of migrating a composite application
across environments.
Note: Service lifecycle management ideally includes an enterprise repository and a service
registry for central storage, access, and versioning of services, subject to SOA governance
requirements. Without an enterprise repository or a service registry, you can use the Oracle
SOA Suite 12c Metadata Services (MDS) Repository to store reusable artifacts, which can be
accessed through JDeveloper during the development phase.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARb
Answer:
N
KOFalse. When an application is deployed, it is automatically made active. It remains in the
active state until some administrative action is taken.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
J AIN icens
R
Both Oracle l Manager Fusion Middleware Control and Oracle JDeveloper have
K Enterprise
O NA tools that enable you to initiate composite applications and view responses (for
testing
K synchronous services). The slide highlights some of the capabilities of each tool, and
highlights some of the differences. Each has its place in the set of tools that you can use to
test your applications or the services that they reference.
a ble
f e r
an s
n - t r
a no
h a s
o m )
u ide
m c Enterntsample G data and
b
ni Stud e Send Request.
click
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce testing tool is called HTTP Analyzer. It is a proxy server that is
N ARof intercepting HTTP communications as well as creating, copying, and modifying
The JDeveloper
capable
web service
including:
Deploying and undeploying applications
Managing the state of applications
Testing applications SOA Infrastructure
BPEL Mediator
Business
Rules
Human
Workflow
a ble
f e r
ans
Enterprise
Event Delivery Network
n - t r
Manager
Enforcement
n o Policy
Web Service
Points
s
Message a Manager
) ha de
c om t GHTTP ui
File
i b m Otheren SOAP JMS JDBC
in Stu d
i n @ is
r k j a t h
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
OracleR K
Enterprise l
Manager 12c Fusion Middleware Control is the primary tool for managing,
N A
monitoring, and configuring the SOA runtime environment and components.
KO By using Fusion Middleware Control, you can perform tasks such as:
Deploying and undeploying composite applications
Managing the runtime state of composite applications
Shutting down and restarting the composite applications
Initiating tests of SOA applications by using a web-based service testing tool
Tracking and monitoring composite application instances and message flows through a
composite application
Examining and managing application fault conditions
Monitoring component engines
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
Navigation a ble
f e r
Pane
ans
Drill down into monitoring and
n - t r
performance data for application
instances, components, and services. a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cgiven
A R
The home page for a application includes buttons and tabs that provide access to a
N of application management functions. The buttons allow you to:
variety
KO Manage the state of an application (retire and shutdown or startup)
Test the application
Access WSDL URLs
Examine the composite.xml definition
Access log files
By default, the dashboard tab is displayed. From there, you can drill down into monitoring and
performance data for application instances, components, and services. Other tabs allow you
to search for specific instances and faults and rejected messages. You can also access unit
test cases and security policies from there.
Modify test
parameters and
a ble
supply sample data.
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
To initiate a test of a composite application, navigate to the home page for the composite
N
Oapplication that you wish to test, and click Test. The Test Web Service page is displayed
K (shown in the slide).
On the Test Web Service page, click Test (if there is one entry point) or click Test and select
one of the entries from the Test drop-down list (if multiple entry points are available) Select an
operation from the Operation drop-down list (which may provide a list if the service has more
than one operation).
On the Test Web Service page, scroll down the page and enter various properties in the
Request tab section. In particular, enter request data values in the fields supplied in the Input
Arguments section, which by default displays input fields (based on the request messages
structure) in Tree View mode. Click Test Web Service to invoke the service.
a
test nomore detail.
the execution
in
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceResponse tab is enabled. If the service is synchronous, the tab
N ARthe response data or fault message. If the request is asynchronous, the window
When the
displays
test is run, the
a ble
f e r
ans
n - t r
a no
has deis available by
Detailed audit) information
clicking a
c m Guiname.
ocomponent
m ent
i b
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
The Flow KTrace logsl the execution of an application instance on a per-component basis. The
O NA
components type, current state, and time stamp of the last update is noted in the trace.
K Further drilldown is possible by clicking a component name.
on a per-component basis.
a. True
b. False
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARa
Answer:
N
KOTrue. The Flow Trace logs the execution of an application instance on a per-component
basis. The components type, current state, and time stamp of the last update is noted in the
trace. Further drilldown is possible by clicking a component name.
SAR File
deploy
SOA Infrastructure
Business Human
BPEL Mediator
Rules Workflow
a ble
f e r
Event Delivery Network
a n s
Enterprise r
n-tWeb Service
no Policy Manager
Enforcement
Manager Points
Message
s a
h a
o m )
u ide
File m c ntSOAP
Other
G
HTTP
JMS JDBC
i b e
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
In this R K you lcreate, deploy, and run a simple SOA composite application. You use the
practice,
NA Manager web application to test the service with sample input. The goal of this
OEnterprise
K practice is to become familiar with the development environment, and to begin forming an
understanding of composite application components.
generate
validate
deploy
JDeveloper
SOA Infrastructure
BPEL Mediator
Business
Rules
Human
Workflow
a ble
f e r
an s
Enterprise
Event Delivery Network
n - t r
Manager
Enforcement
n o Policy
Web Service
Points
s a
Message
Manager
) ha de
c om tHTTP G ui
File
i b mOther en SOAP JMS JDBC
in Stu d
i n @ is
r k j a t h
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
R
In the final l for this lesson, you perform the following:
Ktwo practices
A
KON Generate a configuration plan for the HelloWorld project that redefines the value
assigned to the logical name property of the File adapter.
Validate the configuration plan.
Redeploy the HelloWorld composite application with its new configuration plan by using
Enterprise Manager.
KO
N
ARK
J l
(
AIN icens
a r j a
kon e to u
k se
i
in@ this
b m
o
ni Stude
m ) h a
c nt G u
a
ide
s
n no
- t r an
s
f e r a b
le
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Objectives
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
KOthese XML messages. As its name suggests, an XSD is used to describe (or define) the
structure (or schema) of an XML message. In fact, an XSD uses the XML format to provide
that description.
eXtensible Stylesheet Language Transformation (XSLT) is used to describe how to map data
from one XML structure to another. XSLT makes use of the expression language defined by
XPath for selecting elements for processing, for conditional processing, and for generating
text.
<ns0:item>
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
<ns0:productId>SKU301</ns0:productId>
<ns0:name>Music Player 1Gb</ns0:productName>
<ns0:price>45</ns0:price>
<ns0:quantity>3</ns0:quantity>
</ns0:item>
a ble
f e r
<xsd:complexType name="OrderItemType">
ans
<xsd:sequence>
n - t r
<xsd:element name="productId" type="xsd:string" minOccurs="1"/>
a no
<xsd:element name="name" type="xsd:stringminOccurs="1"/>
<xsd:element name="price" type="xsd:decimal" minOccurs="1"/> h a s
m
<xsd:element name="quantity" type="xsd:int" minOccurs="1"/>
o
)
u ide
</xsd:sequence>
m c nt G
</xsd:complexType> b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
XML documents are described in terms of their component pieces, or elements. An XML
N definition is used to define these elements. It can be used to define their order and
schema
KOnumber, their attributes, their relationship (parent/child), their data types, and their default or
fixed values, if any. Built-in data types (a list of commonly used examples would include int,
double, boolean, date, and string, among others), simplify the description of permissible
document content and data formats in XML schemas. XSD also supports complex types,
which describe elements that contain other elements and/or attributes.
Like other XML documents, XSD documents include namespace definitions, which are used
in XML to allow programs to disambiguate among document elements that may have the
same name but are drawn from different sources and thus have different meanings.
Subsequent elements in the document begin with their namespace prefix.
The example in the slide shows a snippet of an XSD, which describes a complex type and its
component elements, each of which is of a built-in data type. Note also the minOccurs
attribute, which indicates that this element is required, and must occur at least one time in any
valid message. The upper code box in the slide shows a piece of an XML document that is
described by the XSD sample.
Source Target
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
item
productId prodId
productName prodName
price price
qty quantity
a ble
f e r
ans
<ns1:item>
n - t r
<ns1:prodId>
<xsl:value-of select="imp1:productID"/> a no
</ns1:prodId>
h a s
<ns1:prodName>
o m )
u ide
<xsl:value-of select="imp1:productName"/>
m c nt G
</ns1:prodName>
b
ni Stude
</ns1:item>
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce an XSLT transformation references two documentsone describing
N
the AR message, the other describing the outbound message. It then includes a set of
In Oracle SOA
inbound
Suite 12c,
O
K instructions that result in the creation of the outbound document.
In the example in the slide, the <xsl:value-of> element is used to extract the value of an
XML element and add it to the output stream of the transformation. The select attribute
contains an XPath expression that references the path to the desired source node.
This expression instructs the XSLT processor to take the contents found at the productId
location in the source message, and to place those contents in the prodId node in the
outbound message. Similar instructions map the productName node to the prodName node.
Source Target
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
item
productId prodId
productName prodName
widget WIDGET
price price
a ble
f e r
ans
<ns1:item>
n - t r
no
<ns1:prodId>
<xsl:value-of select="imp1:productID"/>
s a
</ns1:prodId>
h a
<ns1:prodName>
o m )
u ide
</ns1:prodName> m c nt G
<xsl:value-of select ="xp20:upper-case(imp1:productName)"/>
b
ni Stude
</ns1:item>
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
As youRhave lice is used to reference and navigate through the hierarchical structure
K Jseen, XPath
A
OofNan XML document. XPath also includes a library of functions that enable evaluation and
K manipulation of data found at the referenced location in the document.
In the example in the slide, the value found in the productName node is converted to
uppercase before being assigned to the prodName node in the destination document.
XPath functions can be nested as well. If you want to copy only the first three characters of
the uppercase value to the destination, you could pass the result of the upper-case function
to the substring function in an expression such as <xsl:value-of
select="substring(xp20:upper-case(imp1:prodName),3)"/>.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce enables you to visually create transformation rules that can be
N ARto message structures that are processed in Mediator routing rules. Transformation
The XSLT
applied
Mapper window
KOrules are created by dragging source elements to their respective target elements. A large
number of built-in functions exist that you can use to enrich and alter source values before
they are copied to their target elements. The XSL source editor can be used for XSL
constructs and mappings that cannot be visually represented by the visual designer.
a ble
f e r
ans
n - t r
a no
h a s
These control how
o m )
u ide
Auto Map treats
m c nt G
optional data. b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cestarts the Auto Map tool. With it, the XSLT Mapper automatically tries
Mapping R
Aall non-leaf nodes
toNlink relevant nodes under the selected source and target. The Auto Map tool is
KOinvaluable when there are a large number of elements to be mapped in complex structures.
The behavior of the Auto Map tool can be tuned by altering the settings in Oracle JDeveloper
preferences or by right-clicking the XSLT Mapper and selecting Auto Map Preferences.
The automatic mapping algorithm depends on existing maps between source and target
nodes. When maps exist between source and target nodes before executing automatic
mapping, these existing maps are used to define valid synonyms that are used by the
algorithm.
a ble
Functions
f e r
appear as icons.
an s
n - t r
a no
h a s Component
The drag-
) i d e
c om t Gand-drop Palette
u offers
access to the
b m n
i ni Stude XPath function library.
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
XPath R K J provide
functions licethe means to evaluate and manipulate data in an XSL transformation.
O NA of functions include type conversion, date, logical, mathematical, string, and
Categories
K others. Text literals can also be added in a similar manner. The functions are accessed from
the Component Palette, and added to mappings by dragging and dropping the appropriate
function onto the center of the canvas, or directly onto an existing mapping.
Functions are displayed as icons. Nested functions are displayed with the innermost function
to the left, and the subsequent outer functions to the right. Execution of the functions is also
performed left to right.
a ble
f e r
ans
n - t r
a no
<xsd:element name="item" type="tns:itemType" maxOccurs="unbounded" />
h a s
) ide
<xsd:element name="prodName" type="xsd:string" minOccurs="0"/>
o m u
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l
The <xsl:for-each> i ceelement provides the means to perform looping in XSLT. The for-
R is often used to ensure that all instances of a repeating element
Aelement
N
each
KO(maxOccurs=UNBOUNDED) within a source document are copied to the target document.
The <xsl:if> element can be used to define a conditional test of some content within the
source document, or to test some condition during the execution of the transformation. One
way the if element is often used is to verify that an optional element (minOccurs=0) is
present before attempting to copy content to a destination node.
Both the for-each and if elements can be defined manually and/or created by the Auto
Map tool.
a ble
f e r
ans
n - t r
Source and destination panels display sample
a no
data before and after transformation.
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cenables
The XSL
A R Map Tester you to test the transformation mapping logic that you designed
N the XSLT Mapper. As shown in the image in the slide, the Tester generates sample data,
with
KOexecutes the XSLT transformation, and displays the output.
Note: The test settings that you specify are stored and do not need to be entered again the
next time that you test. However, test settings must be entered again if you close and re-open
Oracle JDeveloper.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARa
Answer:
N
KOTrue. The XSLT Mapper window enables you to visually create transformation rules that can
be applied to message structures that are processed in Mediator routing rules.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
J AIN icens
XQuery RisKdesignedlto query XML data from both XML files and relational databases. Just as
O NAis the query language for structured data that is expressed as relational tables, XQuery
SQL
K is designed to work with the XML data model and be a comprehensive query language for
data that is expressed in XML. You can use a single XQuery on multiple and heterogeneous
data sources to transform the query result into new XML data.
Similarities:
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
XPath
Data model
Functions and operators
Differences:
Syntax
XQuery is similar to SQL. a ble
f e r
XSLT stylesheets use XML syntax.
ans
Performance n - t r
o
s an
XSLT loads the entire input document in memory.
hato bedused
XQuery loads only the objects that need
) e by the
m Gu i
current statement. co m ent
i b
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
Both XSLT l are languages designed to query and manipulate XML documents.
K and XQuery
O NAfeatures and capabilities have lots of overlap. The slide lists the similarities and
Their
K differences between them.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce Mediator can be either XSLT or XQuery, as you choose. The
N AReditor uses the same look-and-feel as the XSLT editor.
Transformations
XQuery
in Oracle
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Mediator transformations
can process both XML and
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
2,100,credit,two_day,initial,VISTA,1234-1234-1234-1234
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Header Transformation
Order Detail
Information
<customer>
a ble
<custID>2</custID>
f e r
<ID>100</ID>
ans
***
n - t r
no
<itemlist>
<item>
s a
<prodID>SKU301</prodID>
h a
) ide
<prodName>Music Player 1Gb</prodName>
<price>45</price>
o m u
<quantity>3</quantity>
m c nt G
</item>
b
ni Stude
***
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce shows incoming delimited data passed into the adapter, and that
R
The example
Apassed in the slide
N
data out of the adapter in XML format, which is suitable for processing in Oracle SOA
KOSuite 12c. An outbound adapter can be configured to perform the opposite transformation,
passing XML data out in a delimited (or other) format.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce is accessible from the configuration wizard for any adapter that
N AR native format translation, or via the Translate to Native option in the Mediator
The Native
supports
Format Builder
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Begin by K J
specifying l i
the
cename of the file (.xsd) that will describe the native format, and by
N AR the type of data it will represent.
selecting
KO The Native Format Builder wizard supports file formats such as delimited, fixed-length,
complex type, data type description (DTD), and COBOL Copybook.
The Delimited option enables you to create native schemas for records, where fields are
separated by a value such as a comma or number sign (#).
The Fixed Length (Positional) option enables you to create native schemas for records
where all fields are of fixed length.
The Complex Type option enables you to create native schema for records where the
fields may themselves be records having multiple delimiter types.
The DTD option enables you to generate native schema from the user-supplied DTD,
which contains information about the structure of an XML document.
The COBOL Copybook option enables you to generate native schema from the user-
supplied COBOL Copybook definition.
a ble
f e r
a n s
n-and
Specify a sample file
r
t specify
how it should n beointerpreted.
s a
) a
h de
c om t Gui
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
The Native l
K Format Builder reads a sample native file to initiate the definition process. On the
A
N shown in the slide, specify the sample file and provide additional instructions on how
screen
KOto interpret the contents of that file.
a ble
f e r
an s
t r
A sample native format
n -
file is displayed.
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce file, the wizard provides features to allow you to fully define the
N AR XML schema file.
After reading
resultant
the sample
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
perform an XSL
transformation of
data.
a ble
f e r
ans
n - t r
a no
The outbound
h a s
ide
File adapter will
m )
write the data to
o
c nt G
the file system.
u
b m
i ni Stude
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
In this R
practice, ice deploy, and run a composite application that receives delimited
K J you lcreate,
NAfrom a File adapter. This data is transformed to XML format and passed to a Mediator.
Odata
K The Mediator then transforms the data to the XML format that is desired by the receiving
application. In this practice, this application is an outbound File adapter that writes the data
from the composite application to the file system.
KO
N
ARK
J l
(
AIN icens
a r j a
kon e to u
k se
i
in@ this
b m
o
ni Stude
m ) h a
c nt G u
a
ide
s
n no
- t r an
s
f e r a b
le
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Objectives
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
ans
n - t r
a no
h a s
Services and references
o m )
u ide
are two kinds of binding
m c nt G
components. b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
KJ
BindingRcomponents
ce a connection between a SOA composite and the external
liestablish
NAThere are two types of binding components:
world.
O
K Services provide the outside world with an entry point to the SOA composite application.
The WSDL file of the service advertises its capabilities to external applications. These
capabilities are used for contacting the SOA composite application components. The
binding connectivity of the service describes the protocols that can communicate with
the service, for example, SOAP/HTTP or a JCA adapter.
References enable messages to be sent from the SOA composite application to the
external services in the outside world.
Note: Binding components are displayed in the JDeveloper Component Palette as service
adapters.
Several types of binding components are provided by Oracle SOA Suite, including Web
service (SOAP over HTTP), ADF-BC service, HTTP binding, and JCA adapters. The
remainder of this lesson explores JCA adapters in more detail.
a ble
f e r
Binding
The components
binding for JCA
components for ans
adapters
JCA provide
adapters a WSDL
provide a WSDL n - t r
interface to a resource adapter
a no
that is deployed
deployed to the runtime
to the runtime
h a s
environment. The adapter itself
o m )
u ide
c nt G
is transparent to the application.
m
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
JCA stands for JEE Connector Architecture. It is part of the JEE specification. JCA describes
Nconcept of resource adapters, or simply adapters. Adapters enable SOA Suite
the
KOcomponents to interact with systems outside the composite application, including those
outside the application server. This simplifies the integration of diverse systems.
An adapter exposes an API through which a service component accesses an external system.
The interface for this API is described by a WSDL document. This WSDL is the only view that
the component has of the external system. The adapter itself is transparent to the service
component.
Oracle JCA adapters enable communication with various back-end systems. This includes
exchange of requests and (possibly) responses with back-end systems. Adapters also
support the real-time event notification service. This service provides notification about the
events associated with successful back-end transactions for creating, deleting, and updating
back-end data. (More on the event notification service later.)
In many cases, adapters can offer advantages over web services. They are for tighter
coupling and they bring value-adds such as connection pooling, for example. Adapters
typically perform better than web services.
SOA Infrastructure
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Business Human
BPEL Mediator
Rules Workflow
a ble
f e r
Technology Packaged Legacy ans
Application n - t r
Files; FTP PeopleSoft Tuxedo a no
JMS; AQ; MQ SAP R/3 CICS
h a s
Database Siebel
o m )VSAM
u ide
Sockets
SOAP; REST
m
Oracle Apps
c nt G
J.D. Edwards
IMS/TM
IMS/DB
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
OracleR K J canlibe
adapters
cecategorized broadly into three groups:
N A
K O Technology adapters can be used to integrate SOA applications with transport
protocols, data stores, and messaging middleware.
Application adapters connect various packaged applications, such as SAP and Siebel,
and databases.
Legacy adapters integrate mainframe and legacy applications. There are CICS and
Tuxedo adapters as well. (CICS and Tuxedo are not applications but command
interfaces to legacy applications.)
Business Human
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
BPEL Mediator
Rules Workflow
File Other
SOAP;
JMS JDBC
a ble
REST
f e r
ans
Adapter Preprocessing
n - t r
Preparing Interaction Spec
a no
Enterprise
Adapter Processing
h a s
Manager
o
Invoking Database
)
Setting up Callable Statement
m u ide
m c nt G
Parsing Result
b
ni Stude
i Adapter Post-Processing
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
J
K adapters e
licsuch
OracleR
JCA as File, JMS, and Database gather and publish statistics for every
A
N they process, either inbound or outbound. The statistics are broken down into
message
KOcategories and individual tasks. The following is an example of how statistics are broken
down in an outbound (reference) process:
Adapter Preprocessing
- Preparing Interaction Spec
Adapter Processing
- Setting up Callable Statement
- Invoking Database
- Parsing Result
Adapter Post-processing
Adapter statistics can be viewed in the Oracle Enterprise Manager console.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARa
Answer:
N
KOTrue. Adapters gather and publish statistics for every message they process, either inbound
or outbound. Adapter statistics can be viewed in the Oracle Enterprise Manager console.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Standard Message
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Header
Message Header
Fields used to describe
JMSCorrelationID
and deliver messages JMSCorrelationIDAsBytes
JMSDeliveryMode
JMSDestination
JMSExpiration
JMSMessageID
JMSPriority (Optional) Properties
Name-value pairs
JMSRedelivered
defined by an a ble
JMSReplyTo
f e r
JMSTimeStamp application
ans
JMSType
n - t r
a no
h a s
User-Defined Properties)
o m u ide
Payload Message Body m c nt G
Message contents b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cmandates
A R
The JMS specification that messages consist of three sections: a standard
N header, which contains fields that are used to describe and deliver messages; an
message
KOoptional properties element, which contains application-defined properties (as name-value
pairs); and the message body, which holds the contents (payload) of the message. The
payload can be a text message, byte message, map message, stream message, or object
message. The properties element is JMS providerspecific and varies from one JMS provider
to another.
Point-to-point
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
2
N 2 1 consumer
N
queue consumer
a ble
Publish/subscribe
f e r
Each message may be delivered to multiple subscribers.
ans
1 n - t r
n oconsumer
s a
) a
h d1e consumer
N 2 1
c om t Gui
i b m en 1
i n Stud
topic consumer
@
in this
r k j a
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
R K two types
JMS supports l of messaging: point-to-point and publish/subscribe.
N A
In point-to-point messaging, messages are stored in a queue until they are consumed.
K O
One or more producers write to the queue and one or more consumers extract
messages from the queue. A queue may have many receivers, but only one receiver
receives each message. The JMS consumer sends an acknowledgment after
consumption of a message; this results in purging of the message from the queue.
In publish/subscribe messaging, producers publish messages to a topic, and the
consumer subscribes to a particular topic. Many publishers can publish to the same
topic, and many consumers can subscribe to the same topic. All the messages
published to the topic by the producers are received by all the consumers that are
subscribed to the topic. By default, subscribers receive messages only when the
subscribers are active. However, the JMS API supports durable subscriptions that
ensure that consumers receive messages that were published even when the
subscribers are not up and running. These messages are persisted by the JMS provider
and are either sent to the consumer when it becomes active again or purged from
storage if the message expires. The JMS producer can be set either to persistent or
non-persistent mode. The messages are not persisted in the latter case and can be
used only for nondurable subscriptions.
WebLogic
Server
Lookup connection factory.
JNDI
JMS Server
a ble
f e r
ans
n - t r
The application server provides
a no
management for connections,
h a s
transactions, and security for JCA
o
adapters and other deployed applications.m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cServer
A R
The Oracle WebLogic architecture includes the following set of system-level contracts:
N
KO Connection management: Enables application components to connect to a back-end
application and leverage any connection pooling support of the Oracle WebLogic Server
container. This leads to a scalable and efficient environment that can support a large
number of components that require access to a back-end application.
Transaction management: Enables an application server to use a transaction manager
to manage transactions across multiple resource managers. Most adapters support only
local transactions (single-phase commit) and not XA transactions (two-phase commit).
The Oracle adapters that support XA transactions include MQ Series, JMS, AQ, and
Database.
Security management: Provides a comprehensive, flexible security infrastructure that
is designed to address the security challenges of making applications available on the
web. WebLogic security (via OWSM) can be used stand-alone to secure WebLogic
Server applications or as part of an enterprise-wide security management system that
represents a best-in-breed security management solution.
WebLogic Server
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
JMS Server
Application 1
Application 2
Application 3
a ble
f e r
ans
n - t r
a no
Deployed Connection
h a s Message
Applications Pool ) i e
Destination
d
c om t Gu
Note: The diagram shows the JMS i b m running
Server e n within the
WebLogic Server, but that need innot beSthe d
tu case.
n @ s
r k jai e thi
o n a 2014,uOracle
s and/or its affiliates. All rights reserved.
( k e to
Copyright
J AIN icens
WhereasR Kthe subjectl of system contracts is generally outside the scope of this class, it is
O NAnoting that one of the services specified by these contracts is connection management,
worth
K or the creation and management of connections to back-end systems. An important concept
in connection management is connection pooling. Rather than opening connections on an as-
needed basis, connections with data and services are established, configured, cached, and
reused automatically by the application server. Connection pooling enhances application
performance and scalability, particularly when many connections are required simultaneously
to a given database or other back-end system.
Note: Configuration of these connection resources is done within the Oracle adapter by using
Fusion Middleware Control. This configuration must be done before the adapters can be fully
configured within a composite application.
WebLogic Server
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Oracle WebLogic
JMS JMS Server
Adapter
a b le
f e r
a n s
Supported features include:
r
n-t include:
Supported JMS servers
JMS topics and queues Active MQ no
Byte, text, and map message types Apaches a
JMS headers and properties
) a
h de
AQ JMS
JMS message selector
Durable JMS subscriber c om tTIBCO
IBM
G uiJMS MQSeries
WebSphere
i b m en
in Stud
Persistent and non-persistent publication
@
in this
r k j a
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
The JMSR Kadapter usesl a messaging model that separates service consumers from service
O NA This messaging model is defined by using Web Services Description Language
providers.
K (WSDL), which describes the operations exposed by the adapter.
In an outbound message flow, the JMS adapter acts as a service provider. The adapter
receives a normalized message from the SOA infrastructure, converts that message to a JMS
message, and then sends the message to a JMS destination. In an inbound message flow,
the JMS adapter acts as a message consumer. The adapter converts the JMS message that it
receives from a topic or queue to a normalized message, and then sends the normalized
message as part of the message exchange to another component as a service request.
The JMS adapter supports JMS topics and queues. It supports byte, text, and map JMS
message types. The Adapter Configuration wizard provides the Native Format Builder wizard
for consuming native data payloads at run time. The adapter supports the JMS message
selector for performing filtering while subscribing to JMS topics and queues. (This parameter
is based on the SQL 92 language for filtering messages based on the fields present in the
JMS header and properties section.)
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceconfigured in the runtime environment, before the deployment of a
N AR application, which includes a JMS adapter that references these resources.
JMS resources
composite
must be
KO Using the WebLogic Administration web-based console, log in as the administrator (with
username weblogic, and the password that was specified when WebLogic Server was
installed) and configure the following JMS resources:
A JMS destination, such as a queue or topic
A JMS connection factory
A JMS adapter connection pool that is associated with the JMS connection factory
Note: The JMS adapter connection pool JNDI name is needed to configure the JMS
resources on the design-time JMS Adapter Configuration wizard pages when you add a JMS
adapter to a composite application.
1
3 le
2 r a b
s f e
- t r an
n no
s a
h a
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
To configure a JMS destination, log in to the WebLogic Server Administration console as the
N
Oadministrative user. On the Domain Structure navigation bar, expand Services > Messaging
K and select JMS Modules. On the JMS Modules page, click the SOAJMSModule link. On the
Settings for SOAJMSModule Configuration tab page in the Summary of Resources table,
click New.
1. Select the desired resource option (for example, Topic), and click Next.
2. Enter a configuration name (such as demoTopic) and the JNDI name (such as
jms/demoTopic) and click Next.
3. Select SOASubDeployment for the Subdeployment type. Select the SOAJMSServer
option in the JMS Servers table. (The SOAJMSServer is automatically created during
installation of SOA Suite.) Click Finish.
Note: The response page indicates that the configured resource was created successfully.
The new resource appears as an entry in the Summary of Resources table on the Settings
for SOAJMSModule page.
a ble
f e r
ans
n - t r
3 a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce factory with a JNDI resource name, perform the following
N AR
To create
steps:
the JMS connection
KO
1. On the Create a New JMS System Module Resource page, select the Connection
Factory resource type option. Click Next.
2. Enter the following Connection Factory Properties:
- Name (such as demoCFactory) as a configuration name
- JNDI (such as jms/demoCFactory) for the JNDI resource name string
Click Next.
3. Under Targets, verify that you have the correct Servers check box selected and click
Finish.
The Summary of Resources table contains the newly created resource.
connection factory.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Unlike R
connection lice and message destinations, connection pools are defined in
K J factories
O NA with an adapter. Resource adapters are applications that are deployed to the
association
K WebLogic Server. Their deployment configuration includes runtime connection parameters,
including the back-end application connection information, the JNDI name to be used, and
other configuration information, including connection pooling parameters.
The Resource adapter deployment information can be edited in Fusion Middleware Control by
selecting Deployments. A table of deployments is listed, which provides access to the JMS
adapter. Click the adapter to access its settings.
In the resulting display, click the Configuration > Outbound Connection Pools tab to create or
edit a connection pool.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
Redeploy the JMS adapter b
ni Stude
to activate these changes. i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
To associate a JMS connection pool to the appropriate connection factory name, navigate to
KOtheNJmsAdapter > Configuration > Outbound Connection Pools tab, and then do the following:
1. Expand the factory entry oracle.tip.adapter.jms.IJmsConnectionFactory under the
Outbound Connection Pool Configuration table. Locate and click the JNDI name link for
the connection pool that you previously created.
2. On the Settings page, change the ConnectionFactoryLocation property value to the
JNDI name value that you specified for the connection factory.
3. After saving the property value changes, update the deployment for the JMS adapter.
Click Deployments.
4. Select the check box next to JmsAdapter and click Update.
5. Verify that the correct deployment plan is selected, click Next, and click Finish.
a ble
f e r
Message Destination ans
n - t r
Message Type
Delivery Mode a no
Priority ) has de
Time toco m
Live
G ui
i
b
ni Stud
m ent
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
Message Destination
N
KO The name of the message destination is part of the configuration of a publishing JMS
adapter. This destination must already be configured in the target application server.
Message Type
The message type parameter indicates which JMS Message type is to be produced.
Supported values are bytes, text, and map.
Delivery Mode
When a durable topic subscriber is unavailable, messages are not lost. The Message
Server retains the messages until they are retrieved or they expire. When a topic
subscriber is nondurable, the client sees messages on a topic only when that subscriber
is active. If the subscriber is inactive, and messages are published, the messages are
lost. By default, topic subscribers are durable. If message throughput supersedes
reliability, set the Durability property to nondurable.
which it is received by the consumer can be changed. (Default value is 4. The valid
values are 0 through 9, where 0 is the lowest priority and 9 is the highest.)
Time to Live
Time to Live indicates how long the message is retained by the Message Server. If it
has not been received by all eligible consumers by this time, the message is
automatically purged by the message server.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
JMS
Adapter
(consumer)
a ble
f e r
ans
n - t r
Destination Name
a no
s
Message BodyaType
h
Messagem )
Selector
o t Gu ide
m en c
i b
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K Name l
Destination
N A
K O The destination name specifies the name of the message destination.
Message Body Type
The Message Body Type parameter indicates which JMS Message type is to be
produced. Supported values are byte, text, and map.
Message Selector
A message selector allows a consumer to receive a subset of available messages by
filtering message property values. The selector is defined as a property of a message
consumer. The syntax and functionality of a message selector are similar to a SQL
WHERE clause. For example, the message selector JMSType LIKE 'invoice*' AND
JMSRedelivered = 'false' ensures that the consumer receives only messages
where the JMSType message property is set to invoice AND the JMSRedelivered
message property is set to false.
Message selectors can be used effectively, but their overuse can impact the
performance of the Message Server. In this case, it may be more desirable to publish
messages to multiple destinations and configure selected subscribers accordingly.
The JMS adapter can interact only with a JMS Server that
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARb
Answer:
N
KOFalse. Applications that exchange data via JMS do not have to reside within
WebLogic Server.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
DB DB
Adapter Adapter
a ble
f e r
ans
n - t r
Select
a no
Insert
poll h a s
call e
)
Update
c o m G uid
Delete
i b m ent
Merge
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
The graphic l illustrates that a Database adapter exposes database operations that
K in the slide
O NA
can be implemented and used by the components in a composite application. The Database
K adapter provides a WSDL interface to define the operations and message structure in an XML
format, enabling it to be used as a service by the composite application components.
The Database adapter configuration is defined in the Adapter Configuration wizard, which
enables you to specify one of the following types of operations:
Data manipulation operations (insert, update, merge, and delete)
Query operations (select)
Custom SQL statements
Calls to stored procedures, in which the adapter honors any logic in the stored
procedure and acts as a call relay interface
Note: Query and DML operations are managed and executed by the TopLink Java framework
that performs the SQL database operations. For all operations (including calling stored
procedures), the conversion of data between XML input to and output from the native format
that is used in the database is performed by the Database adapter.
Supply a name
for the service.
a ble
f e r
an s
n - t r
Adapter wizard a no
h a s
opens.
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cea Database adapter, complete the following steps in JDeveloper:
A R
To create and configure
N
O1. In the Composite Editor, drag a Database adapter into the External References (or the
K Exposed Services) column. The example shows the Database adapter being dragged
into the External References column. The Adapter Configuration wizard is displayed. On
the Welcome page, click Next to proceed with the remaining steps to configure the
adapter.
2. Specify the name of the service.
Note: Recall that the adapter itself is transparent to the composite application. This service
appears as one more web service invocation to the application.
Subsequent slides cover the remaining steps to configure a Database adapter by using a
query operation (SELECT statement).
design
time a ble
f e r
run ans
time n - t r
a no
h a s
m ) This ide
Specify the JNDI name of the connection.
c o G u
name must match the connection
b m Database
pool
e t
n adapter.
factory
name configured for the
in Stui
runtime d
i n @ is
r k j a t h
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
On theR
Service l
K Connection page, click the Browse icon to select an existing database
N A
Oconnection created in the JDeveloper IDE, or click the Add icon to create a new IDE or
K application connection. The details for the connection selected or created are displayed in the
Connection field.
Note: When you select a database connection, the JNDI Name field is populated with the
connection name prefixed with eis/DB/. In the example in the slide, the SOA database
connection creates the JNDI name eis/DB/SOA. The JNDI name must match the JNDI
connection factory resource configured for the Database adapter that is deployed in the
WebLogic Server runtime environment. The JNDI name already exists. In the SOA Quick
Start installation, it is automatically provided. In an enterprise installation, the administrator
will have provided it.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce wizard then offers a choice of operation types. Subsequent wizard
N AR
The Adapter
pages
Configuration
vary depending on the choice of operation type. The choice of operation types include:
KO Call a Stored Procedure or Function enables you to execute a database stored
procedure or function.
Perform an Operation on a Table enables you to select any or all of the following
options: Insert or Update (Merge), Insert Only, Update Only, Delete, Select, and Query
by Example.
Poll for New or Changed Records in a Table enables reading and publishing new or
changed records, and is useful to an inbound Database adapter that is implemented as
an exposed service in a composite application.
Execute Pure SQL is used for creating a custom SQL string.
Note: The Do Synchronous Post to BPEL (Allows In-Order Delivery) option can be
selected when the Poll for New or Changed Records in a Table operation type is selected.
These changes are delivered in order as asynchronous events to a BPEL process
component.
a ble
f e r
an s
n - t r
a no
h a s
o m )
u ide
From the list of displayed tables, we specify m c nt G
which tables to use. b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cslide,
A R
In the example in the you explore the configuration for a Select operation.
N
KO1. Click Import Tables to open the Import Tables window.
2. In the Import Tables window, select the schema. Enter Name Filters if desired, and click
Query.
- The Available column is populated with a list of tables.
3. Select a table from the Available list and click the single right arrow icon to move it to the
Selected column. When you have finished selecting the tables, click OK.
4. You are returned to the Select Table page with the selected tables listed.
On the Select Table page, verify the addition of the selected table, and click Next.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
On theR
Attribute licepage, you can deselect the attributes that you do not wish to query.
K J Filtering
NAMake sure that appropriate attributes are chosen for insert operations, unless you are
ONote:
K sure that the database provides default values for the attributes that you omit.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c statement
SELECT t G
The stem of b the
de n
i ni Sgenerated.
is automatically t u
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K e
J querylicparameters
You can R create and conditions for a SELECT operation. The example in the
A
N creates a parameter called ccNum, which is added to the query and used in a condition
slide
KOto retrieve credit card data with a specified ID. The actual value for the ccNum parameter is
supplied at run time. The steps to define and use the parameter are as follows:
1. On the Define Selection Criteria page, next to the Parameters field, click Add.
2. In the Parameter Name window, enter a parameter name and click OK.
3. On the Define Selection Criteria page, with the parameter name defined and populated,
next to the SQL field, click Edit to define the query criteria (conditions).
a ble
f e r
ans
n - t r
a no
The completed expression is
h a s
added to the SELECT statement.
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce window, click Add to form the first expression.
A R
In the Expression Builder
N
OIn this example, with the expression selected, configure the first argument as cardNumber in
K the Query Key column, the Operation (EQUAL by default), the second argument as Parameter,
and select the ccNum parameter. Click OK to add the condition to the query.
Note: The Expression Builder allows you to create multiple conditions separated by logical
operators (AND and OR).
These properties
are specific to the
Database adapter.
a ble
f e r
Specify a
an
These properties s
query timeout. - t r
are common to
n
all JCA adapters.
a no
h a s
Configure the
o m )
u ide
number of retries
before flagging m c nt G
b
ni Stude
an error. i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
On theR K J Options
Advanced lice page, you can configure database-specific values in the following
NA
Osections:
K JDBC Options: Sets a query timeout. A value of zero means it waits indefinitely. Max
Rows determines the maximums number of rows fetched per round trip.
Auto-Retries: Attempts the specified number of retries before flagging an error. Interval
is the number of seconds between retries. The Backoff Factor determines a delay to
increase the wait time between retries. A value of 2 doubles the interval after each retry.
The Max Interval is the longest wait time between retries.
Native Sequencing (Oracle only): This is used for INSERT operations, and specifies
that the primary key is assigned from the selected sequence, which can be searched for
or created.
Interaction Options: Get ActiveUnitOfWork forces all operations invoked in the same
global transaction to use the same connection. This guarantees that subsequent
operations can see the changes from earlier operations. Emulated two-phase commits
use the same connection. MERGE and INSERT operations are committed when the
global transaction completes. Therefore, it also alters when WRITE operations occur.
Detect Omissions allows the MERGE and INSERT operations to ignore empty or missing
XML elements. If Detect Omissions is not selected, missing or empty elements are
stored as NULL values.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
WebLogic Server
Application 1
Application 2
Application 3
a ble
f e r
ans
n - t r
a no
Deployed h a s
Applications Connection m ) e
idDatabase
o
c nt G u
(with Database Pool m
adapters)
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cthe
A R
Like the JMS adapter, database connection defined in the Database adapter at design
N specifies a JNDI name in the form of eis/DB/connection-name, which is used to
time
KOlocate a connection for the target database at run time. The runtime server environment must
be configured with the same JNDI resource name and associated with a JDBC connection for
the target database server. After making configuration changes to the Database adapter
resources, the Database adapter configuration must be updated to be available for
applications.
Note: There is no need to restart the WebLogic Server instance after redeployment.
Configuration of the Database adapter should be completed and redeployed when there are
no application instances running in the runtime environment. All adapter runtime configuration
settings that depend on the adapter runtime services should be made and deployed before
deploying applications. This concept applies to any of the adapter configurations available in
the runtime environment that do not conform to the WebLogic Server production
redeployment feature requirements.
J AIN icens
R
In general, l is started by a service when it is invoked by a client, and ends when
Ka transaction
A
OtheNservice operation completes. If the invoked service completes successfully, the
K transaction started is committed; otherwise errors roll back the transaction.
With the Oracle SOA Suite 12c platform, a transactional service can be implemented as a
Java web service, a Database adapter, a JMS adapter, and the AQ adaptereach of which
can be invoked from the Mediator and BPEL components.
Note: SOAP endpoints, File adapter, and FTP adapter service implementations are non-
transactional; that is, they do not join existing transactions and start new transactions (if any).
In each case, transactional boundaries depend on the context, configuration, and environment
of the services that are implemented and invoked. Transaction semantics are different for
services that are invoked synchronously as compared with services that are invoked
asynchronously.
Note: In the case of multiple operations with a database (for example, insert, delete, and
update), these multiple operations constitute a single transaction.
Entry Mediator DB
request
Point Adapter
response
a ble
f e r
an s
A synchronous Mediator provides
n - t r
bidirectional routing and transformation
of request and response messages. a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
In this R
practice, ice a composite application that receives a credit card number and a
K J you lcreate
NA order total. The application uses a Database adapter to query credit card
Opurchase
K information in an Oracle Database. Based on the results of that query, a status of VALID or
INVALID is returned.
To create this application, you:
Create a new SOA project
Add a Database adapter that is configured to perform a select operation on the
database
Add a synchronous Mediator, defining a WSDL interface based on the elements of the
file creditcheck.xsd
Deploy and test the composite application with both valid and invalid credit card
numbers
a ble
f e r
an s
n - t r
a no
In this practice, you recall and apply the skills that you havehlearned a s so far.
You create a project to consume the messages produced
o m u ide practice.
) in the previous
You determine the components to add, and howc to configure t Gthem.
b m n
i ni Stude
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
In this R
optional, lice practice, you create a new SOA project that is configured to
K J unstructured
NA the messages that are sent to the queue in the previous practice. The messages
Oconsume
K pass through the application unchanged and are written to a file.
To: $out.property.jca.jms.JMSProperty.Artist
a ble
f e r
Set the Message Selector: Artist LIKE '%Berry
an s
n - t r
JMS a no
Adapter
h a s
(consumer)
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
In this R
optional liceyou modify your previous SOA project so that JMSProducer sets a
K J practice,
NA
Ouser-defined message property to a specific value. You then modify JMSConsumer to use a
K message selector so that only a subset of the published messages are received and written to
a file.
KO
N
ARK
J l
(
AIN icens
a r j a
kon e to u
k se
i
in@ this
b m
o
ni Stude
m ) h a
c nt G u
a
ide
s
n no
- t r an
s
f e r a b
le
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Introduction to BPEL
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Objectives
J AIN icens
RK l
NA
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
orchestration
f e r
ans
BPEL Engine
n - t r
a no
h a s
BPEL com Gui
) de
i b m ent
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
K canl be incorporated into a business process through the use of the Business
MultipleRservices
O NA Execution Language, or BPEL. The BPEL specification defines the XML grammar that
Process
K allows you to describe a business process. This process may (among other things) invoke
services, manipulate data, and throw faults.
Multiple services are orchestrated by a BPEL engine (such as the Oracle BPEL Process
Manager) by using the BPEL, WSDL, and XSD files. In the context of BPEL, the term
orchestrating means to coordinate the flow of information to and from clients and between the
services invoked by the BPEL process to implement all or part of a business process. The
engine creates representations of the process (instances of the process) in an application
server (such as WebLogic).
In Oracle SOA Suite 12c, a BPEL process is a component of a SOA composite application,
which receives and returns data through service entry points. The service entry points can be
wired to a BPEL process component, which processes the data and interacts with the external
references (external services) of the composite application. When a message is received, the
BPEL engine creates a new process instance and starts it. The engine is in charge of executing
the business logic specified in the BPEL process.
BPEL Process
Partner Links Partner Links
Interface Partner
Client Link
External
r a ble
sfe
Service
n
n - tra
o
an
The service interface (WSDL) Activities make up the Partner links represent a
describes the BPEL process
operation and the associated
BPEL process flow or
sequence of instructions ha des
reference to the external
services that are invoked
)
request and (optional)
response message structures.
to be executed.
c om t Gui
by BPEL process activities.
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
The key K
elements ofla BPEL process are:
A
KON A service interface, which is the WSDL that describes the BPEL process operation and
associated request and optional response message structures. A BPEL process can be
exposed as a service for a composite application. The service interface provides the
BPEL client with a way to interact with the BPEL process component.
Activities, which are the actual XML elements that make up the BPEL process flow or
sequence of instructions to be executed. This usually involves invoking other services to
perform the function required for a business process implementation.
Partner links, which represent a reference to the external services that are invoked by
the BPEL process activities. In the JDeveloper Composite Editor, when you wire a BPEL
process component, an external (service) referencea partner linkis created in the
BPEL process component. A partner link describes the roles played for the interaction
between the BPEL process and the service that it invokes.
WSDL describes
message types.
a ble
f e r
Imported into WSDL
an s
n - t r
a no
h a s
XSD describes
o m )
u ide
message structures.
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceprocess interacts with other web services. To connect with those
N AR the BPEL process imports the information stored in the WSDL for each service.
By definition,
services,
a business
O
K Recall from the conversation about WSDL that these documents in turn import information from
the XSD files. Therefore, a BPEL file typically includes a series of <import> statements that
enable the process to leverage the information stored in each services WSDL and XSD files.
BPEL partnerLink
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
WSDL partnerLinkType
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce a relationship between the BPEL process and the invoked service
N ARa role that each plays in the interaction. To identify the roles and relationships that are
Each interaction
through
represents
KO
applicable in an interaction, a BPEL process uses a partner link and a partner link type.
A partner link, which is defined in the BPEL source, describes the roles that the BPEL process
and the invoked service play. Each role is associated with a port type (operation defined in the
WSDL), which determines the message data structures the process and the invoked service
can manipulate in their respective roles. A partner link is configured with a name, a partner link
type, and one role for synchronous interactions or two roles for asynchronous interactions.
A partner link type, which is defined in a WSDL document, describes the possible interactions a
service can perform, thereby characterizing the conversational relationship between two
services by specifying roles for each type of interaction offered by the service. A partner link
type defines one or two roles.
One role indicates that the service can complete the conversation without a callback.
Two roles indicate that there is a requirement to receive a callback from the service.
A role is associated with a port type, which is defined in the WSDL of a service, which
determines the operation performed by the role and the message structure received in a
request or returned as a response within the context of the conversation.
Receive
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Request
Output Message
a ble
Assign
f e r
ans
Reply n - t r
Reply
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
The BPEL engine is responsible for managing the data values used by the business process.
N values include data passed to the process via the invoking client partner, and the reply
Typical
O
K data to be sent back to that partner. Similarly, input and output messages for invoked services
may need to be created or tracked or both. Finally, the process may have the need to maintain
data internally, such as sequence numbers and so on. All this data can be stored in BPEL
variables. The BPEL process file declares its variables before the sequence of activities is
begun. An example appears in the slide.
Note: Local variables can be utilized within a Scope activity, which we will discuss later in this
lesson.
Receive
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Request
Output Message
a ble
Assign
f e r
an s
Reply n - t r
Reply
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
lice into discrete steps, or activities. The BPEL specification identifies
K J is organized
A BPELRprocess
NA of activities with a variety of applications. One group of activities includes primitive, or
a number
O
K basic, activities. These activities may instruct the BPEL engine to invoke an operation on some
service to wait for a message to be received from a client, to generate the response of an
input/output operation, to copy data from a source to a destination, to indicate that something
went wrong, or a number of other tasks.
Three different activities are used for interacting with partners. The first of these is the Receive
activity. Receive represents the input (receipt of a message) of a WSDL operation provided by
the process. An example is shown in the slide.
Attributes of the Receive activity include the partnerLink, as well as the portType and operation
of the process that the partner is targeting. The Receive activity takes the incoming message,
puts it in the specified variable, and ends.
The createInstance attribute is of particular importance here. The BPEL script is a blueprint for
a process, but that process is instantiated by the BPEL Service Engine only when a
createInstance attribute set to yes is encountered.
the message, a Reply activity is also necessary. The partnerLink, operation, and portType
attributes for the Reply activity should match those of the corresponding Receive activity.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
1 Receive
Request:
<input>Name</input>
2 Assign
Concatenates
Client "Hello " + Name
a ble
Response: 3 Reply f e r
<result>Hello Name</result>
ans
n - t r
a no
Returns the response
with a Reply activity) h
as e
c om t Guid
i b m en
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K BPELl process:
A synchronous
A
KON Contains activities that should not take a long time, because the client waits for the
response
Obtains the request with a Receive activity
Returns the response with a Reply activity
When you create a synchronous BPEL process, Oracle BPEL Process Designer automatically
creates a BPEL process template with a Receive activity and a Reply activity. You create
additional processing tasks between the Receive and Reply activities.
The slide illustrates the simple design of a HelloUser BPEL process. The process is short-
lived, and sends a response (a Reply) to its invoker. It meets the criteria for a synchronous
process. The sequence of activities in the HelloUser process design is as follows:
1. Receive a request XML message that contains a name string and that is input from the
client (invoker).
2. Assign the text "Hello" concatenated to the name string that is received as input to the
result message.
3. Reply with the result XML message (output data) that is sent to the client in response.
1 Receive
2 Some number of
long-running
intermediate steps
Client
3 Receive
Invoke a ble
f e r
ans
n - t r
a no
h a s
The final Invoke operation is a callback.
(Omit the final Invoke activity for a one-
way operation.)
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceprocess:
A R
An asynchronous BPEL
N
O Contains activities that may take some time
K Obtains the request with a Receive activity
Returns an optional response with a callback that is implemented with an Invoke activity
The basic structure of an asynchronous BPEL process flow, as created by the Oracle
JDeveloper Create BPEL Process wizard, comprises the following items:
1. A Receive activity at the start of the flow
2. Some number of long-running intermediate activities
3. An Invoke activity at the end of the flow
Oracle BPEL Process Manager automatically manages the correlation between the clients of
the invoked process by using WS-Addressing techniques. This enables a long-running process
to invoke the client when the process is complete. The final Invoke operation is a callback.
The client should not have to wait for an asynchronous process to complete before it responds
and must provide a way for the invoked process to call it back to obtain the result (response).
Note: The slide shows an asynchronous process structure created by Oracle BPEL Process
Designer when using the Asynchronous BPEL Process template.
Receive
Request
a ble
Client Invoke Partner f e r
ans
n - t r
Assign Output Message
a no
h a s
Reply
o m )
u i de
Reply
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce a BPEL process and its partners must conform to a particular
N AR structure. These structures are defined by the service WSDL, and usually consist of
Data exchanged
message
between
KO
XML elements described by an XML schema document.
The two most commonly used variables are inputVariable, which receives the client
request, and outputVariable, which contains the client response. Each service invoked by
the business process also has an associated input variable, and if it returns a response, a
variable is defined to store that data.
Activity 1
Request
Activity 2
a ble
client Activity 3 f e r
ans
n - t r
(nested)
a no
Sequence
h a s
Reply o m ) Sequences
u ide can be nested.
m c nt G
Reply (not shown: A Sequence
i b
n Stud e must contain at least one
@ isi activity.)
i n
a r kja se th
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ca ecollection of activities to be performed in sequential order. A Sequence
N AR
A Sequence contains
KO used to logically group related steps, thus simplifying larger business processes.
can be
Receive
Request
a b le
Client Assign Output message f e r
an s
n - t r
(nested)
a no
Scope
h a s
Reply o m )
u idecan be nested.
m c nt G
Reply
Scopes
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
The Scope Kactivity isl used to manage complexity and provide a container and context for other
NA within a BPEL process. It may contain constructs such as variable definitions, fault-
activities
O
K and event-handling definitions, and others. A Scope is a structured activity that contains one
other (mandatory) activity (which may itself contain other activities). Scopes may be nested.
Note: Scopes are important in BPEL processes in a number of different ways. This lesson
focuses on Scopes as they relate to variables. In the lesson titled Handling Faults in
Composite Applications, we discuss Scopes as they relate to fault handling and compensation.
BPEL Process
Built-in
Types
XML Schema Scope
Element Variable
Type Type
<types>
WSDL Local
Global
a ble
</types>
Variable
Variable
f e r
Message ans
Type n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce at the process level are called global variables. They are visible to all
N
the AR within the BPEL process and are present for the lifetime of the process. Variables
Variables that
activities
are created
KO
that are created within a scope are called local variables. They are visible to activities only
within their own scope, and they are discarded when the scope ends.
When created, a variable in BPEL is assigned a data type. That type determines its structure
and memory (size) requirements. Variable types can be derived from built-in XML data types,
such as string, boolean, int, and others. They can also be derived from an XML element
type defined in an XML schema document (XSD) file, or can be described by a message type
defined in the imported or inline XML schemas of a WSDL document.
Note: It is a best practice to keep common element type definitions in a centralized XML
schema document to enable sharing across cooperating services.
Source
<from> <to> Target
Variable Variable
Transform
defines
a ble
Source-def.xsd Transform.xsl Target-def.xsd
f e r
ans
n - t r
BPEL Run Time a no
h a s
o m )
u ide
m c nt G
b
ni StudProcessor
XSLT e
Source XML
@ i Target XML
n
jai e thi s
r k
a 2014,uOracle
s and/or its affiliates. All rights reserved.
o n
k e to
Copyright
(
J AIN icens
R
If a given K l involves many copy statements between complex data structures, it
Assign activity
may
O NA be preferable to use the transform activity and the associated design-time visual
K mapping capabilities inherent in the XSLT Mapper.
Transformations are implemented as a BPEL Assign activity with a BPEL extension annotation
that enables the design-time visual representation to be a Transform activity. The <from>
element defines an expression that uses the ora:processXSLT function, which is an Oracle
extension service to BPEL. This extension enables the runtime engine to execute the
transformation in the XSL processor provided by the Oracle Application Server Java EE
container service infrastructure.
The graphic in the slide shows the design-time components, where a BPEL Transform is
created from which the XSLT Mapper is opened to create an XSL file that defines the mapping
rules for converting elements from a Source-def.xsd to a Target-def.xsd. The BPEL run
time shows the Transform.xsl file being used by the XLST processor to convert a source
XML structure to a target XML structure.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Answer:RaK
J lice
O NAReceive represents the input (receipt of a message) of a WSDL operation provided by the
True.
K process. The process is instantiated by the BPEL Service Engine when a createInstance
attribute set to yes is encountered.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
ans
n - t r
a no
View and edit the
h a s
process as a
model, or as XML. o m )
u ide
are displayed inm
c nt G
Client and service partners
their
b
i lanes.
respectivenswimlanes. de
i swim
t u
j a in@ this S
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
The slide shows the JDeveloper BPEL Editor with a visual representation of the process
N on the Design tab. The Design tab is divided into three swimlanes:
diagram
O
K The left partner link swimlane contains the BPEL process service interface that clients,
applications, or components use to interact with the BPEL process component.
The right partner link swimlane contains external service references.
The middle swimlane contains the BPEL process activities that form the process flow.
The main editor window has a Source tab to view and edit the BPEL XML source that was
created in the Design view, and a History tab to view historical changes. The Component
Palette contains components that can be added to your BPEL process flow.
The Log windows enable you to view design-time errors and check validation results.
The Property Inspector shows properties for a subset of selected objects.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
ValuesR
can licefrom one variable to another with simple drag-and-drop actions in the
KbeJ assigned
A pane.
NAssign
Edit
K O
a ble
f e r
ans
t r
The XPath function library
n -
is categorized by type.
a no
h a s
Variables are available
o m )
u ide
in a tree structure.
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cassignments
A R
More complex variable can be created with Expression Builder. With it, XPath
N
expressions and function calls can be invoked to assign values to target variables.
KO
a ble
The Flow Trace lists each f e r
an s
step of the test and its state.
n - t r
a no
h a s
Click the BPEL o m )
u ide
process to access
m c nt G
the audit trail. b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceprocess are the same as those for any composite application. If the
N AR application service entry point operation selected for the test is a synchronous
The steps
composite
to test a BPEL
O
K operation, the test page is refreshed with the response or fault information on the Response tab
page.
For synchronous and asynchronous operations, the Launch Message Flow Trace link is always
visible, enabling you to drill down into the details of the composite application execution. To
view the results of an asynchronous operation test, you must click the Launch Message Flow
Trace link.
When you click the Launch Message Flow Trace link, a new web browser window is opened
with the Flow Trace page for the composite application instance. On the Flow Trace page in the
Trace section, to view the audit trail for the BPEL process, click the BPEL component link name
in the Trace tree.
The Audit
audit trail
Trailallows
allows
you to examine values
a ble
at each activity.
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
J e
liclink
ClickingRaK component in the Trace section of a Flow Trace page opens the Audit Trail tab
A
N For a BPEL process, the execution sequence of activities in the process is displayed,
page.
KO
either in completion or up to the activity that the process executed (if still active). On the Audit
Trail tab page, you can expand the activity sections and their child nodes to examine the effects
of that activity and the payload (data) changes made.
Next to the Audit Trail tab, you can see the following additional tabs:
The Flow tab displays a visual form of the process flow, similar to the BPEL model in the
JDeveloper BPEL Designer.
The Sensor Values tab enables you to view the BPEL sensor data (if any) produced by
the activity, variable, or fault sensors implemented in the BPEL process.
The Faults tab displays the details of any fault conditions that arise during the BPEL
process execution. (Faults are discussed in the lesson titled Handling Faults in
Composite Applications.)
a ble
f e r
ans
n - t r
a no
h a s
The Visual Flow o m )
lets u ide
you click an
m c activity t G
andi b d e
view information.
n
@ in Stu
j a i n t h is
a r k s e
n
ko e to
Copyright 2014, uOracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
The Visual l a graphical representation of the activity sequence executed by the
KFlow provides
NAprocess. On the Flow tab page, you can click each activity icon to open and view the
BPEL
O
K details for that activity in its Activity Detail window.
Note: If the BPEL process is still executing, click the refresh icon (on the top-right corner of the
page) to get an updated view of the process over time.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Answer:RbK
J lice
O NAIn Oracle SOA Suite 12c, a business process is built as a service component within a
False.
K composite application.
J AIN icens
RK l
NA
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce a composite application that includes a simple BPEL process. The
R
In this practice,
Aprocess you create
N
BPEL accepts input, and calls the credit card validation project that you built in the
KO
previous practice.
KO
N
ARK
J l
(
AIN icens
a r j a
kon e to u
k se
i
in@ this
b m
o
ni Stude
m ) h a
c nt G u
a
ide
s
n no
- t r an
s
f e r a b
le
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Objectives
Interaction Patterns
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
alternative conditions.
a ble
f e r
an s
n - t r
If can be nested.
a no
h a s
Activities are executed if
Use the Empty
o m )
u ideUse Expression
activityto
m cdo nothing. t G the test tocondition
Builder define
condition is true. n
i nib Stude for the If.
@
in this
r k j a
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
R
In BPEL K conditional
2.0, l branching is defined with the If activity. An If element includes:
A
KON A condition to be evaluated
One or more activities to be executed if the condition evaluates to true
An <else> branch, which includes one or more activities to be executed if the condition
evaluates to false
An If activity may also include one or more ordered <elseif> branches, each with a condition
to be evaluated. Only one branch is executed; that is, the first <elseif> branch that returns a
true result is processed, and no other branch is evaluated.
Note: For the XPath expressions and conditions that are created in XPath Expression Builder,
it is recommended that you use explicit type conversion where appropriate to avoid subtle
problems that can arise from implicit type conversion in an XML context. For example, XML
data is usually treated as string data, and comparing two numerical strings performs a string-
based comparison that may not yield the intended result for a numerical value comparison.
activities to be processed
concurrently.
a ble
f e r
ans
n - t r
a no
h a s
The Flow completes
o m )
u ide
when all activity
m c nt G
sequences are finished. b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce implements the processing of concurrent sequences of activities. A
R
In BPEL, the
Aactivity Flow activity
O N
Flow may contain one or more branches, each with its own activity sequences that are
K processed simultaneously. Each branch of the flow must contain a Sequence activity, which in
turn may contain additional activities (including a nested Flow activity). Flow branches are
specified at design time. At run time, a Flow terminates when all flow branch sequences have
completed.
Receive
a ble
2
Solution: Edit the partner link
f e r
an
Set the nonBlockingInvoke
s
for the synchronous service.
n
property to true.- t r
1 a no
h a s
4
o m )
u ide
m c nt G
b
ni Stude 3
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceSequence construct are processed sequentially. A synchronous
N AR
The activities in a BPEL
O activity in a Flow branch causes the remaining Flow branches to wait until the
Invoke
K synchronous exchange is completed. This has the effect of serializing the execution of Flow
branches. However, by setting the nonBlockingInvoke partner link binding property to
true, the Invoke activities are executed in separate threads.
The nonBlockingInvoke property has a default value of false, in which case the
invocation is executed in the same thread as the BPEL process instance. When this property
value is set to true, a separate thread is spawned to do the invocation so that the Invoke
activity does not block the instance.
To add the nonBlockingInvoke property to a partner link, perform the following steps:
1. In the BPEL Designer window, right-click a partner link and select Edit.
2. In the Edit Partner Link window, click the Property tab, and then the Create Property icon.
3. Select the nonBlockingInvoke value from the Name drop-down list, and click OK.
4. In the Edit Partner Link window, replace the text Property Value with the value true,
and click OK.
The property value is inserted inside the BPEL component element in the composite.xml
file.
Both sequential
and parallel looping
a ble
are supported. Declare the starting f e r
Declare start and end
and final values for
ans
the loop counter.
n - t
values for the loop. r
a no
h a s
In BPEL 2.0, the forEach
o m )
u ide
activity performs looping
m c nt G
iterations sequentially N times b
ni Stude
over a given set of activities. i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce both sequential and parallel looping iterations. By default, the
N ARactivity performs looping iterations sequentially N times over a given set of activities
The forEach
forEach
activity supports
O
K that are defined within a Scope activity. For instance, the forEach activity iterates over an
incoming purchase order message where the purchase order message consists of N order
items. The enclosed Scope activity must be executed N+1 times, with each instance starting
only after the previous iteration has completed.
In parallel iteration, all looping iterations are started at the same time and processed in parallel.
Parallel iterations are useful in environments where sets of independent data are processed or
independent interaction with different partners is performed in parallel. In these scenarios,
execution of the N+1 instances of the contained Scope activity occurs. Each copy of the Scope
activity has the same counter variable that you specify. Each instances counter variable must
be uniquely initialized in parallel with one of the integer values beginning with the starting
counter value and proceeding up to and including the final counter value.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
a ble
f e r
ans
n - t r
The Wait activity pauses for a a no
specified amount of elapsed time
h a s
or until a specified date-time.
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce process by using the Wait activity. The Wait activity pauses for a
N AR amount of elapsed time or until a specified date-time.
You can
specified
suspend a BPEL
KO The slide shows the configuration window for a Wait activity. You can use an expression to
calculate the time period for which the process will wait or the time it waits until.
For example, if you set a Wait for 2 minutes, the BPEL Designer creates the following Wait
element:
<wait name="Wait_1" for="'PT2M'"/>
Here, the P designator must always be present and precede the year (Y), month (M), and day
(D) parts, each of which is preceded by a number, if present. The T precedes the time parts for
hour (H), minutes (M), and seconds (S). If you use an expression to set the wait time, the
resulting string must conform to the following format: P1Y1M1DT1H1M1S.
For example, a Wait for 1 year, 1 month, 1 day, 1 hour, 1 minute, and 1 second is:
<wait name="Wait_1" for="'P1Y1M1DT1H1M1S'"/>
An example of a Wait until a specified date and time is:
<wait name="Wait_2" until="'2007-02-28T12:43:59'"/>
Note: The time format conforms with the ISO 8601 international time format standard.
message, just as a
time, and provides
Receive activity does.
an optional timeout.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ceto wait for a message (just as a Receive activity does), but with an
N ARtimeout. To achieve this, it includes two branches:
The Pick
optional
activity is used
KO One or more onMessage branches receive a specific message from an operation that is
exposed by a service through a partner link.
Zero or more onAlarm branches implement a wait time.
One branch is selected before the other, based on the occurrence of the associated event.
After the Pick activity has accepted an event for handling, other events are no longer accepted.
The possible events are the arrival of some message in the form of the invocation of an
inbound one-way or request-and-response operation, or an alarm based on a timer (analogous
to an alarm clock).
The Pick activity completes when one of the branches is triggered by the occurrence of its
associated event.
J AIN icens
K continues
A WhileRactivity l to repetitively execute a single activity (or a set of activities in a
NA or Scope) if the specified condition is true. When the condition becomes false, the
Sequence
O
K loop terminates.
To add and configure a While activity, perform the following steps:
1. Drag a While component from the Component Palette to the process diagram.
2. Click the View Condition Expression icon and construct the conditional expression in
Expression Builder.
3. Expand the While activity and drag another activity, Sequence, or Scope, into the body of
the While activity.
Note: When working with a While activity, treat it as a traditional programming loop construct,
such that you:
Perform an initialization before the loop
Evaluate the condition before entering the loop
Execute the body of the loop if the condition is true
Increment or modify the variables that affect the condition, such as the example for using
a counter, as shown in the slide
<while name="While1">
<condition>$i <= $numItems and $inStock=true()</condition>
<sequence name="Sequence1">
<assign name="Assign_prodid">
<copy>
<from>$inputVariable.payload/ns2:product[position()=$i]/ns2:prodId</from>
<to>$Invoke_check_getInternalStoreView1_InputVariable.parameters/ns4:prod
Id</to>
</copy>
a ble
</assign>
f e r
ans
n - t r
For dynamic index expression, use
either the XPath syntax a no
[position()=num] or simply
h a s
the value [num].
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce processing, you may need to index XML array structures. Accessing
N
the ARelement of an XML array uses the following XPath expression syntax:
When performing
nth
dynamic
KO
/parent/array[n]/child
Here, the value n is enclosed in square brackets to form the index (starting from 1) for a
specific XML array element. For example: To obtain the price of the second item in a purchase
order, the XPath expression could be /OrderItems/Item[2]/price.
Note: For dynamic index expression, use the XPath syntax [position()=2].
The Flow and forEach activities are the two looping constructs
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
Answer:RbK
J lice
O NAThe While and forEach activities are the two looping constructs that are available in
False.
K BPEL. The Flow activity implements processing of concurrent sequences of activities.
Web Services
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Updating Variables
Basic Activities
Invoking and Providing Web Service Operations
Receive: Waits for an initiating message or an asynchronous callback response message
from a service
Invoke: Enables you to invoke a service (identified by its partner link) and specify an
operation for this service to perform
Reply: Allows the process to send a message in reply to a message that was received
through a Receive activity
Updating Variables and Partner Links
Assign: Manipulates XML data to copy the contents of one variable to another
Validate: Provides the ability to validate variables against schema definitions
Transform and XQTransform: Process XSL and XQuery Transformations that map
source elements to target elements to update variables
Looping Execution
Conditional Branching
onMessage a ble
Pick If f e r
onAlarm
an s
n - t r
SOA Components a no
BPEL Extensions
h a s
o m )
u de others!
iMany
Human Task Business Rules
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
Structured Activities
N
KO
Execution Context
Scope: Consists of a collection of nested activities that can have their own local
variables, fault handlers, compensation handlers, and so on. A Scope activity is
analogous to a coding block in structured programming languages.
Sequential and Parallel Processing
Sequence: Contains a collection of activities to be performed in sequential order
Flow: Executes two or more branches of activities in parallel (concurrently)
Looping Execution
While: Supports repeated performance of a specified iterative activity. The iterative
activity is repeated until the given while condition is no longer true.
ForEach: Processes multiple sets of activities sequentially or in parallel
RepeatUntil: Executes the body of the activity at least once. At that point, a condition is
tested. If the condition is true, the activity ends.
SOA Components
Human Task: This Oracle BPEL Extension provides for the invocation of a Human Task
service component.
Business Rule: This Oracle BPEL Extension provides for the invocation of a Business
Rules service component.
Other Extensions
Many other BPEL Extension activities are available on the Component Palette. To learn
a ble
more about them, refer to the Developing SOA Applications with Oracle SOA Suite 12cf e r
documentation. ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
1 2
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce calling an asynchronous service. To do this, you build a composite
N AR with two BPEL processes.
This practice
application
demonstrates
KO Note: In this practice, you build a synchronous process, which calls an asynchronous process.
This would rarely, if ever, be considered a suitable design pattern in the real world, but it works
well to illustrate many of the activities that were discussed in this lesson.
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
The first Kthese is anl asynchronous BPEL process. The process uses the While and Wait
of
NA to loop for a specified amount of time. The time is specified by a value passed in the
activities
O
K incoming message.
The AsyncProcess
The incoming message
waits the specified
specifies a numeric
number of seconds.
value, which is passed
to the AsyncProcess.
The instructions for this practice and those that follow include
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Objectives
Faults: Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Faults are:
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
faults, including:
Mediator configuration options
BPEL language constructs
The Fault Management Framework
Enterprise Manager
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
Faults: Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Mediator
Routing Rule
Faults Section
return Return to the initial fault
to caller caller
1
Route to a service
a ble
Publish an event
f e r
ans
n - t r
a no
route to a service publish )anhevent e
as
c o m Guid
2
m en3 t
i b
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
In a Mediator l when you create a routing rule for a target service that defines one
K component,
orN A faults (in its WSDL), the Faults section becomes visible. In the Faults section of a
more
O
K routing rule, you can add a fault handler to:
1. Return a fault from the target service to the caller of the Mediator component, provided
that the WSDL of the Mediator component supports returning faults to its clients
2. Forward a fault from the target service to another service to deal with the fault message,
such as a logging and notification service. You can forward faults whether or not the
Mediator defines faults in its WSDL interface.
3. Publish an event
When the Fault section appears in the routing rule, an initial fault routing handler is created.
The target service set for the initial fault routing is:
Set to the initial caller of the Mediator component, if the Mediator component defines
faults in its WSDL that can be returned to its caller
Not set to any target, if the Mediator component does not define any faults in its WSDL
interface. In this case, you must forward the fault to a target that you configure.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARa
Answer:
N
KOTrue. A synchronous Mediator can return a fault to the caller of the Mediator, provided that the
WSDL of the Mediator component supports returning faults to its clients.
Faults: Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
BPEL Process
Operation
a ble
f e r
ans
n - t r
a no
h a s
Calling Application o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce in several ways. A fault can be returned by a called service. BPEL
R
BPEL faults
Acan can be raised
N
faults be caused by situations encountered during run time, including mismatched types
KOin an Assign activity, uninitialized variables, out-of-memory conditions, and so on.
Depending on the nature of the fault and the design of the BPEL code, it may be possible to
recover a fault, or to take some sort of mitigating actions before exiting gracefully. In this
section, you learn more about the behavior of BPEL faults and the language constructs that
are available to you to plan for and respond to fault conditions.
KOfaults have a name and a reference to a message definition, as shown in the example in the
slide.
To define a business fault for a synchronous service (WSDL does not support the creation of
fault elements for one-way or asynchronous operations), perform the following:
1. In an XSD, define a fault element containing a structure for error information. The
element can be as basic as a single string to contain an error message.
2. In the WSDL, create a WSDL message whose structure is defined as the XSD type.
3. In the WSDL, create a fault part in the process operation and associate it with the
correct message structure.
Note: Choose meaningful fault names that reflect the business fault condition, because the
fault names are used in the Mediator Faults section of the routing rules and BPEL process
Throw activities.
Receive
Request
a ble
Client Assign Output Message f e r
an s
n - t r
(nested)
a no
Scope
h a s
Reply o m )
u idecan be nested.
m c nt G
Reply
Scopes
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
Recall Rfrom l titled Introduction to BPEL that the Scope activity is used to organize
K the lesson
O NA within a BPEL process into logical units of work. A Scope is a structured activity that
activities
K contains one other (mandatory) activity (which may itself contain other activities). Recall also
that Scopes may be nested. Even if no Scopes are explicitly added to a process, there is an
implied Scope at the process level. Scopes are important in BPEL processes in a number of
different ways, but within this lesson, we focus on Scopes as they relate to error handling and
compensation.
catch
the (implied) process-level Scope.
catchAll
If no fault handler is present for an error condition within the current Scope of execution, the
fault is automatically propagated to the parent Scope, until the process-level Scope is
reached. If no suitable fault handler is found at the process level, the default fault-handling
rules of the BPEL Process Manager server are invoked.
a b le
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
catch
If
condition
a ble
invoke
f e r
ans
n - t r
isError a noelse
h a s
o m )
u ide
m c ntReply G Reply
b
ni Stude
Fault Response
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce a fault to its client, as opposed to handling it internally. This is
N ARas propagating a fault. For synchronous operations, the Reply activity is used to return
A BPEL
known
process can return
O
K the fault. To return a fault to the process client, perform the following:
1. Define the business fault in the process WSDL for the synchronous process operation.
This includes associating the fault with the correct message structure.
2. Terminate the BPEL process with a Reply activity that is configured with the Fault
QName of the business fault that is defined in the WSDL.
The BPEL element syntax of a Reply activity that returns a fault in a synchronous interaction
is:
<reply name="ReplywithBusinessFault
partnerLink="client"
portType="client:CatchRtFaultBPELProcess"
operation="process"
variable="businessFaultVar"
faultName="client:CreditCardInvalid"/>
Note: The fault variable is optional. Ensure that the Reply with fault activity is part of a
conditional branch, as shown in the slide example where a fault handler catches the fault
thrown in the <case> branch. The Reply executes either in the conditional branch or in the
fault handler. The process should still contain a Reply activity for the successful response.
Oracle SOA Suite 12c: Build Composite Applications 8 - 17
Returning Faults from an Asynchronous Process
invoke
If
pick
condition
a ble
f e r
ans
n - t r
onError onResult isError a noelse
h a s
o m )
u ide
m c nFault t G Response
b
ni Stude
callback callback
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
KJ e
licservice,
For anR
asynchronous because a fault response cannot be returned as an immediate
N A
Oresponse, the options are to return a fault message through the same callback operation as
K the normal response, or to use a different callback operation.
Remember, clients making asynchronous requests do not wait for a reply. Therefore, to report
faults from an asynchronous process, you can use a callback operation, where the BPEL
process uses an Invoke activity to send a fault response in a callback either on the same port
type as the success response or in a separate callback port type.
The slide illustrates the first strategy: The BPEL client uses a Pick activity with two
onMessage branches: one for the onResult (success) and another for the onError (fault)
callback. The asynchronous BPEL service returns either the success or fault response with an
Invoke activity.
<portType name="BPELAsynchCallbackResponse">
<operation name="onResult">
<input message="client:BPELSuccessResponseMessage"/>
</operation>
<operation name="onError">
<input message="client:BPELFaultResponseMessage"/>
</operation>
a ble
f e r
</portType>
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
NA
KO
Import RuntimeFault.wsdl
into your process WSDL.
import
a ble
f e r
ans
n - r
Add a Catch to a
t
Scope and select
the desired system
a no
h a s
fault from the
o m )
browser list.
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cebe caught by using the following steps:
R
BPEL runtime
AImport faults can
N
1. RuntimeFault.wsdl into your process WSDL. RuntimeFault.wsdl is
KO seeded into MDS from soa.mar inside soa-infra-wls.ear during its deployment.
Note: A copy of soa.mar (a JAR or ZIP file) is deployed to soa-infra in the WebLogic
Server (WLS) domain.
2. In a scope, add a Catch branch and double-click the Catch icon.
3. In the Catch window, click the Browse (flashlight) icon to open the Fault Chooser, in
which you can expand System Faults and select one fault, such as bindingFault.
4. In the Catch window, you can auto-create (or browse for) a variable that has a message
type of bpelx:RuntimeFaultMessage.
<catch faultName="bpelx:bindingFault"
faultName="runtimeFaultVar">
...
</catch>
Process
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Catch
someFault
If
condition
a ble
f e r
ans
n - t r
throw
someFault
else
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A BPEL
A Rfault can be deliberately raised by using the Throw or Rethrow constructs. The Throw
N declares the name of a fault and optionally provides a variable to associate data with
Oactivity
K the fault.
<throw faultName="tns:pymtFault"/>
Thrown fault conditions can be managed internally by the same BPEL process by using a
Catch or CatchAll branch in an enclosing Scope.
Note: Any unmanaged fault messages are handled by the BPEL Process Manager engine,
and may not be propagated to the invoker of the BPEL process unless you include a Reply
activity that is configured with fault information.
Before you can throw a fault message, consider defining a message structure type for the
fault message data. If you intend to propagate the fault to a client, you must define the
message structure and fault information in the WSDL operation that is used to invoke the
BPEL process.
To throw a fault, perform the following:
1. Create a Throw activity in your process where the business fault occurs.
2. Configure the Fault QName and Fault Variable fields for the Throw activity.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARa
Answer:
N
KOFor a synchronous service, a fault can be returned as a response, instead of expected data,
whereas for an asynchronous service, because a fault response cannot be returned as an
immediate response, the options are to return a fault message through the same callback
operation as the normal response, or to use a different callback operation.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARb
Answer:
N
KOFalse. The CatchAll element is used to intercept and deal with all faults that are not caught by
an associated Catch element. However, the CatchAll element is always optional. A
faultHandlers container may contain zero or one CatchAll element.
Faults: Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
J AIN icens
R
In general, l is started by a service when it is invoked by a client, and ends when
Ka transaction
A
OtheNservice operation completes. If the invoked service completes successfully, the
K transaction that is started is committed; otherwise errors roll back the transaction.
With the Oracle SOA Suite 12c platform, a transactional service can be implemented as a
Java web service, a Database adapter, a JMS adapter, or the AQ adaptereach of which can
be invoked from the Mediator and BPEL components.
In each case, transactional boundaries depend on the context, configuration, and environment
of the services that are implemented and invoked. Transaction semantics are different for
services that are invoked synchronously compared with services that are invoked
asynchronously.
Note: SOAP endpoints, File adapter, and the FTP adapter service implementations are non-
transactional; that is, they do not join existing transactions and start new transactions (if any).
a ble
f e r
an s
n - t r
Process payment (fault)
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cein BPEL is similar conceptually to exception handling in Java,
N AR processes require a different approach to error handling. A business process may
Although
business
fault handling
KOcontain multiple, discrete transactions. The overall business transaction can fail or be
cancelled after many enclosed transactions have already been processed. It may then be
necessary to explicitly reverse or offset those individual transactions that were completed
before the fault.
The diagram in the slide shows a simple process that handles a request to enroll in a training
course. After receiving the request, the process invokes a web service that requests a seat in
a given course, and decrements the number of available seats. The next activity processes
the customers payment information. If problems are encountered while processing the
payment, a fault message is returned by the web service. In that case, the debit of the
available seat count (which is already completed) must be cancelled, reversed, or otherwise
compensated for.
BPEL includes several activities that provide the capability to define compensation actions.
The first of these constructs is the compensation handler. A compensation handler is a
container for activities that perform compensation actions. Compensation handlers are
attached to the activity to be reversed, which may be either an Invoke element or a Scope.
<scope name="myScope">
<variables>
...local variables declared here
</variables>
<compensationHandler>
<sequence name="compSequence">
...compensation activities defined here
r a ble
</sequence>
n s fe
</compensationHandler>
n - tra
<sequence name="mainSequence">
...normal activities defined here s a
no
</sequence> ) ha de
m Gui
</scope> co m ent
i b
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
BPEL includes
R l
K the compensationHandler construct to allow the definition of compensation
A
N to undo successfully completed activities in the case of a fault. Compensation handlers
logic
KOare associated with Scope and Invoke activities. A compensationHandler may contain
only a single activity, although that activity can be a Sequence or a Scope, either of which
may contain multiple activities. A compensationHandler specifies how to undo or
compensate the result of the particular activity with which it is associated. A
compensationHandler may run only after its parent activity has completed normally.
Compensation
compensateScope
Handler
catch
compensateScope
a ble
Compensation
f e r
Handler
ans
n - t r
catchAll
a no
h a scompensate
m Gu ) i d e
The Compensate activity resultsc in o
i b
the execution of all compensation
m ent
in Scopes.
handlers for all completed
@ S tud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R K l
BPEL provides two ways to trigger compensation handlers. The first of these is the
A
KON Compensate activity. This construct is used within a faultHandlers (within a Catch or a
CatchAll) or compensationHandler element. The Compensate activity causes
compensation of all Scopes immediately enclosed within the Scope (or process) that contains
the fault handler or compensation handler with the Compensate activity. This compensation
occurs in the reverse order of completion of the Scopes.
<compensate/>
The Compensate activity requires no property configuration.
The second way to trigger compensation handlers is by using the CompensateScope activity.
The CompensateScope activity enables compensation for one specified Scope or Invoke
element enclosed within the Scope that contains the handler with the CompensateScope
activity. Like the Compensate activity, the CompensateScope activity is used within a
faultHandlers (within a Catch or CatchAll) or compensationHandler element.
<compensateScope name="CompensateScope1" target="myScope"/>
The CompensateScope activity has two properties: the name (which may be arbitrary), and
the target, which specifies the name of the scope whose compensation handler should be
executed.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
Answer:
A Rb
N
KOFalse. A compensationHandler specifies how to undo or compensate the result of the
particular activity with which it is associated.
Faults: Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Fault returned
client Invoke partner
a ble
f e r
a n s
The Fault Management n -t r
o
Reply
Reply
Framework eliminates
need to code s a n the
each invoke
)
activity hforaeachdpossible
e
m condition.
ofault u i
m en c t G
i b
@ in Stud
j a in this
a r k s e
n
ko e to
Copyright 2014, u
Oracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
If a fault K during
occurs l runtime in an Invoke activity in a process, the framework catches the
NAand performs a user-specified action that is defined in a fault policy file that is associated
Ofault
K with the activity. If a fault results in a condition in which human intervention is the prescribed
action, you perform recovery actions from the Oracle Enterprise Manager Fusion Middleware
Control Console. The Fault Management Framework provides an alternative to designing a
BPEL process with excessive error handling for Invoke activities.
Mediator
fault
Routing Rule
returned
a ble
f e r
an s
n - t r
The Fault Management
Framework can catch faultsa no
a s
returned by services, and those
h
o m )
u ide
encountered internally, such
duringas
m c nt G
message transformation and
other mediator activities.
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
OracleR K J provides
Mediator lice sophisticated error-handling capabilities that enable you to
O NA an Oracle Mediator service component for error occurrences and corresponding
configure
K corrective actions. Error handling enables an Oracle Mediator to handle errors that occur
during the processing of messages and also the exceptions returned by outside web services.
You can handle both business faults and system faults with Oracle Mediator.
Business faults are application-specific and are explicitly defined in the service WSDL file.
You can handle business faults by defining the fault handlers in Oracle JDeveloper at design
time. System faults occur because of some problem in the underlying system, such as a
network not being available. Oracle Mediator provides fault policybased error handling for
system faults.
1
Define a Fault Policy Document.
a ble
f e r
ans
n - t r
a no
Select the name of the fault.
h a s
o m )
u ide
2
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i cedocument, perform the following steps:
A R
To define a fault policy
N
O1. In JDeveloper, select File > New > From Gallery. In the Categories pane of the New
K Gallery dialog box, select SOA Tier > Faults. In the Items pane, select Fault Policy
Document and click OK.
2. In the Fault Policies editor, name the policy and specify the Fault Name from the drop-
down list.
a b le
f e r
an s
n - t r
2
a no
h a s
Edit the properties of o m )
u ide
the chosen action. m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce a default action, perform the following steps:
A R
To specify and configure
N
O1. Select the desired action from the Default Action drop-down list. This defines what
K action or actions the policy will take when activated. On the Actions tab (not shown),
highlight default-retry. Click the Pencil icon to edit the action.
2. In the Properties pane for the selected action, configure the parameters for that action.
The fault-policies.xml file is created in the project under the SOA folder.
a ble
2 f e r
an s
n - t r
a no
Associate the policy with h a s
the desired component,
o m )
u ide
reference, or service.
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
J
K policies
To bindRthe ltoicaecomposite application, or a component within a composite
NA perform the following steps:
Oapplication,
K 1. On the Composite Editor toolbar, click the Edit Composite Fault Policies icon. The
Composite Fault Policies screen is displayed. Here you can associate fault policies with
the composite or the components therein.
2. In the Composite Fault Policies dialog box, select the policy from the drop-down list to
the right of the desired component.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i c e
ARa
Answer:
N
KOTrue. The Fault Management Framework provides error handling that is external to the SOA
composite and does not impact the Mediator or BPEL design or run time.
Faults: Overview
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
a ble
f e r
an s
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
OracleREnterprise lice Fusion Middleware Control provides access to fault information
K J Manager
O NA
and fault-management capabilities during runtime operations. Each composite application
K home page provides ways for you to search for, view, manage, and act on recoverable faults.
A composite application instance Flow Trace page also provides quick access to fault
information for management when using Enterprise Manager Fusion Middleware Control.
In addition, component-specific home pages (not shown in the slide) also provide ways for
you to search for, view, manage, and act on recoverable faults.
Note: Not all faults are recoverable. For example, in Mediator components, fault policies
apply to parallel routing rules, not sequential routing rules. For sequentially processed routing
rules, a fault is returned to the caller who is responsible for handling the fault. If the caller is an
inbound adapter, rejection handlers can be defined to manage the (rejected) error messages.
a ble
f e r
an s
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce shows the Flow Trace for a composite application that executed a
R
The example
Aprocessin the slide
N
BPEL called SimpleBPEL, which encountered a fault condition. In this case, the
KOSimpleBPEL process attempted to invoke a service that was not available.
After initiating a test of the composite application that contains the SimpleBPEL process, the
fault seen in the screenshot was encountered. Because of the fault policies associated with
the composite application, the human intervention action was applied. This enables the SOA
administrator to recover the fault by using Enterprise Manager Fusion Middleware Control.
The administrator must first locate the composite application instance in which the fault
occurred, and click the instance link to navigate to the Flow Trace page shown in the slide.
If a fault is recoverable, a Recover link is visible in the table containing the list of faults and the
error messages. To proceed with recovery, click the Recover link. This opens the Faults
tabbed page of the component in which the fault occurred (see the next page, titled
Recovering a Fault Condition, for an example) where you begin to examine the details of the
cause and take corrective action.
Note: You can also click the SimpleBPEL instance link under the Trace tree, and click the
Faults tab on the SimpleBPEL component instance page.
1
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
Recover.
a ble
f e r
ans
n - t r
a no
3 h a s
o m )
u ide
Select recovery action
details.
m c nt G 2
i b d e
@ in Stu Take corrective action.
j a i n t h is
a r k s e
n
ko e to
Copyright 2014, uOracle and/or its affiliates. All rights reserved.
(
J AIN icens
R
After you Khave located l the instance page for a component that has incurred a fault condition,
O NA
you can click the Faults tab to view the fault information. The fault information may or may not
K provide sufficient details to determine the cause of the fault and help you to make a decision
about what action to take. In the example in the slide, the SimpleBPEL process attempted to
invoke a service that was not available. The fault policy definition included an action that
requested human intervention. Human intervention actions are visible in the page section that
is displayed when you click the recoverable fault in the Faults section. As shown in the slide,
to recover from the service unavailable scenario, perform the following steps:
1. On the Instance for the component page, click the fault entry with the Recoverable
status. This causes the instance page to be split into two sections. The top section
contains the fault information, and the bottom section provides a set of recovery options.
2. Take corrective action to fix the source of the problem. In this case, the unavailable
service is started again.
3. Return to the Instance for the component page. Select and enter appropriate values to
implement the human intervention actions. In the example, the invoke operation is
retried by selecting the Retry option from the Recover Action drop-down list, entering a
suitable payload in a selected variable (inputVariable), and clicking Recover.
Note: If the Retry recovery action is successful and you selected a fault policy action derived
from the fault policy file, such as my-java-handler, from the After Successful Retry drop-
down list, the selected fault policy action is executed.
The slide shows the different recovery action options that you can select on the recovery
page. The self-explanatory recovery actions are:
Retry, to retry the activity
Abort, to terminate the instance
Replay, to throw a replay scope exception. All activities in the scope are executed
a ble
again. f e r
ans
t r
Rethrow, to rethrow the exception. In this case, you delegate exception handling back to
n -
the instance.
a no
h a s
Continue, which continues the instance as if normal processing took place by marking
the activity as a success
o m )
u ide
c nt G
Note: You can also modify the instance variable information that is available (in scope) to the
m
b
ni Stude
faulted activity. This can be useful if data must be corrected subject to operation policies and
i
j a in@ this
constraints. Therefore, you have a wide range of options. The choice of action selected
depends on the fault condition and if appropriate corrective action can be taken.
a r k se
( kon e to u
J AIN icens
RK l
N A
KO
a ble
f e r
an s
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce a fault to its client, as opposed to handling it internally. This is
N ARas propagating a fault. For synchronous operations, the Reply activity is used to return
A BPEL
known
process can return
O
K the fault. To return a fault to the process client, perform the following steps:
1. Define the business fault in the process WSDL for the synchronous process operation.
This includes associating the fault with the correct message structure.
2. Terminate the BPEL process with a Reply activity that is configured with the Fault
QName of the business fault that is defined in the WSDL.
The BPEL element syntax of a Reply activity that returns a fault in a synchronous interaction
is:
<reply name="ReplywithBusinessFault
partnerLink="client"
portType="client:CatchRtFaultBPELProcess"
operation="process"
variable="businessFaultVar"
faultName="client:CreditCardInvalid"/>
a ble
f e r
an s
n - t r
a no
In anticipation of building error
h a s
handling, you enclose both
ide
invocations in a scope, and
m ) then enclose the enrollment
o
c nt G u
invocation in a second (nested)
b m scope activity, shown here by
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i ce
A R
N
KO
a ble
f e r
an s
n - t r
a no
You addh aa
s to the outer
m
Scope, ) which willidbeeinvoked if a specific
Catch element
You add a compensation handler to the
c ofault G u by BookingService.
is returned
nested Scope that will reverse the seat
b m The e t
nCatch element will include a
assignment when invoked.
i d
in Stu compensation handler.
CompensateScope to invoke the
i n @ is
r k j a t h
n a u s e
( ko e to
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
J AIN icens
R K l
NA
KO
callGreeting
Unauthorized reproduction or distribution prohibited Copyright 2016, Oracle and/or its affiliates
fault-policies.xml
fault-bindings.xml
sayHello
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
In this R
practice, ice a fault policy with the Fault Policy wizard and associate the fault
K J you ldesign
NAwith the fault policy binding file. You are provided a pair of composite applications that
Opolicy
K interact, but do not (yet) have any fault policies associated with them.
The SayHello project is the classic Hello World project. It concatenates the string Hello and
an input string that is received as part of the project invocation. The CallGreeting
[asynchronous] project accepts an input string that you provide, and then passes that string
when it invokes SayHello.
a ble
f e r
ans
n - t r
a no
h a s
o m )
u ide
m c nt G
b
ni Stude
i
j a in@ this
a r k se
( on t2014,
kCopyright o uOracle and/or its affiliates. All rights reserved.
A I N nse
K J l i e
cSayHello.
A R
You shut down project When project CallGreeting attempts to invoke the service, a
N fault is raised. To manually recover the fault, in Enterprise Manager, you examine the
remote
KOFlow Instances for project CallGreeting. When the Recovery Required link is displayed, you
are provided the options to Retry or Abort.
After restarting project SayHello, you select Retry, and observe that the Flow Trace is
updated, indicating the completion of the instance.