Oracle SOA Short Tutorial
Oracle SOA Short Tutorial
Tutorials
Chapter 1: Introduction
Chapter 2: What is SOA Suite ?
Chapter 3: SOA Suite Architecture
Chapter 4: SOA Suite Components
Chapter 5: BPEL
Chapter 6 : Mediator
Chapter 7: Business Rules
Chapter 8: Human Task
Chapter 9: Adapters
Chapter 10: Error Handling
hapter 1: Introduction
Oracle SOA Suite Introduction
Oracle SOA suite is a middleware tool that is used for integration, this tool helps two
system to exchange information between each other. This tool is based upon Service
Oriented Architecture.
Audience
This tutorial is designed for all the professional who interested in Oracle SOA Suite
development.
10g was the first version of Oracle SOA Suite tool when it was launched by Oracle and
then few years later Oracle launched 11g version, there are few sub versions under 11g
version also. Recently in 2014 Oracle has launched 12c version also. This tutorial is
based on Oracle SOA Suite 11g version.
Page 2 of 23
Prerequisites
You should know about below concepts before we start with this tutorial.
1. XML
2. XSD (Schema)
3. WSDL
4. SOAP
Service is a unit of work that perform some business function i.e. it is piece of code
written in any language that performs some business function. E.g. Card validation
function created in Java. Service is always local to you, not available to anyone. To
make it available to everyone we deploy it over web.
When we deploy any service over web, it become web service as anyone who so ever
has access can access that service over web. As shown below, external application
accesses the web service by passing required request parameter and in turn it receive
response message.
Web Service
Now we understood about service and web service, now let’s talk about SOA-Service
Oriented Architecture.
Page 3 of 23
SOA Concept
As we understood about SOA concept, now let’s talk about Oracle SOA Suite tool.
Oracle SOA suite tool is based upon SOA concept where we create services, manage
services and orchestrate services into composite application and business processes.
There are other middleware tools also in the market that are based on this SOA concept
but out of all these Oracle SOA Suite is most popular tool.
1. Very minimal or no coding required as we build business process and flow from pre-
build components and activities.
2. SOA Suite can be used to deliver more loosely-coupled services.
3. We can build new client functionality on top of existing Business Services.
4. Well defined interfaces- make changes without affecting clients.
5. It is standard platform which is service enabled and easily consumable by modern
Page 4 of 23
web applications.
6. It provides single design-time experience, single run-time infrastructure, end-to-end
monitoring and greatly simplifies the work of building, maintaining and monitoring
distributed SOA implementations.
7. It is hot pluggable means it can natively run on, other vendor’s middleware also.
WebLogic Server: It is an application server that is based upon J2EE and this has all
JDBC drivers, API’s, adapters etc. deployed. In earlier version of SOA suite i.e. 10 g we
use to have OC4J but 11g onward we use WebLogic as application server. We can also
deploy our custom application on this application server.
Oracle SOA Suite comprises of major four components as mentioned below and
discussed in detail in next chapters.
Web Service Manager: In short form, this is known as OWSM. This is used to
implement security in SOA suite tool. We need not to install this separately, this will get
install when we SOA suite tool, we need to select Web Service Manager Option while
creating domain. This brings pre built security policies that we can use to secure SOA
Suite functionality exposed to outside world, it also provide security policies to access
any secured service from SOA suite tool.
JDeveloper: It is IDE tool to develop SOA suite application and projects. By default this
tool does not SOA suite extensions so while doing the installation; we need to install
required SOA suite extensions to develop SOA applications and projects.
Page 5 of 23
Oracle SOA suite tool is based on SCA- Service Component Architecture, here we get
all pre built components, where we assemble all these components to build business
processes. That means as developer you need not to build these components, you just
need to assemble it. That assembly is known as SOA composite.
Below diagram depicts one SOA composites that comprises of different parts. This SOA
composite is equivalent to one assembly that built after we connect all the different
parts.
Page 6 of 23
SCA
C1, C2 are components in SOA composite e.g. BPEL, Mediator, Business Rules &
Human Tasks. These are also known as service components and these are the building
block for composite application. Every component is hosted on its own service engine.
S & R are known as binding components that are used to connect SOA composite with
external world. S is equivalent to Service binding that is used to connect to source and
R is equivalent to Reference binding that is used to connect to targets. As you see in
the diagram apart from composite level, every component also has its own service
binding and reference binding.
Dotted lines connecting C1 & C2 are known as wire. This enables you to graphically
connect the components in a SOA composite application.
Composite Overview
The following service components are available. There is a corresponding service
engine of the same name for each service component. All service engines can interact
in a single composite.
BPEL: BPEL stands for Business Process Execution Language. BPEL processes
provide process orchestration and storage of a synchronous or an asynchronous
process. You design a business process that integrates a series of business activities
and services into an end-to-end process flow. Details explanation is provided on BPEL
in next chapter.
Business rules: It enable you to design a business decision based on rules. This
component is used when user needs user interface to change their business policies
with time without any coding change.
Human task: It provides workflow modelling that describes the tasks for users or groups
to perform as part of an end-to-end business process flow. i.e. we use this component
when we require human intervention in our business process.
Page 8 of 23
Spring: It enables you to integrate Java interfaces into SOA composite applications.
Components Overview
Chapter 5: BPEL
BPEL stands for Business Process Execution Language. BPEL is an xml based
language for designing and running business processes. This product provides a
comprehensive, standards¬ based and easy to use solution for creating, deploying and
managing cross application business processes with both automated and human
workflow steps – all in service¬ oriented architecture.
BPEL is used for Service Orchestration. It is standard way for composing multiple
services into collaborative and transaction process flow. It is based on OASIS standard
called “Web Services Business Process Execution Language” (WS-BPEL).
Page 9 of 23
Overview
There are different parts of BPEL as mentioned below.
Service Interface: A WSDL describing the functionality of the BPEL process. The
service interface provides the end user a way to interact with the BPEL process
component using Service Interface / Service Binding.
Activities: units of work. The actual elements that make up the BPEL process flow or
sequence of instructions to be executed.
Partner links: also called Reference bindings. A partner link describes the roles played
for the interaction between the BPEL process and the service it invokes.
Oracle BPEL Process manager is based natively on BPEL – there is no import or export
of BPEL code. Moreover, it’s built ¬in support for standards such as XML, WSDL and
Web Services, XSLT, XPATH, JMS, and JCA makes this an ideal solution for creating
integrated business processes that are truly portable across platforms.
1. Synchronous Template: In this BPEL process response will return immediately after
the request is received. E.g. when you need some information from your friend, you give
him/her a call and he/she immediately reply with the required information.
Page 10 of 23
Synchronous Template
2. Asynchronous Template: In this BPEL process, response will come after some time
after request is received. E.g. when you call your friend for some information, you give
him/her a call but he/she doesn’t have that information immediately but he/she provide
you that information after some time.
Asynchronous Template
3. One Way Template: In this BPEL process, there is no response message; only
request message will be processed. E.g. when you call your friend to pass some
information but you don’t expect any response back.
Oneway Template
Page 11 of 23
Chapter 6 : Mediator
Mediator is one of the components of the Oracle SOA Suite tool; it provides mediation
capabilities such as selective routing, transformation, and validation capabilities. We
use mediator when components needs to exchange information within a composite as it
is very light mediation framework.
Overview
Features of Mediator
Routing Rules
It is the core features of Mediator component – the ability to route data between a
source and target. The routing is implemented by adding one or more Routing Rules to
Page 12 of 23
a Mediator. Each Routing Rule defines how data flows from a source to a target service,
may have additional properties that defined if the data needs to be validated, filtered,
and transformed.
Dynamic routing rule: These rules are used for asynchronous interactions only.
Business rules are used in these rules and endpoint is determined at run time from
business rules.
Static routing rule: These rules are used for synchronous and asynchronous interactions
and these are defined at design time.
Sequential: As name suggested, Oracle Mediator evaluates routing and performs the
resulting actions sequentially .Sequential Routing Rules execute in a single thread and
transaction as the caller. Oracle Mediator always enlists itself into the global transaction
propagated through the thread that is processing the incoming message. In case of
exceptions it rolls back all transactions.
• A decision component can be used within a SOA composite and used directly to run
business rules.
• A decision component can be used with the Advanced Routing Rules in Human
Workflow.
• A decision component can be used within a SOA composite and wired to a BPEL
component.
Page 14 of 23
Facts: Represent the data or business objects that rules are applied to.
Rules: A rule consists of two parts, an IF part which consists of one or more tests to be
applied to fact(s), and a THEN part, which lists the actions to be carried out should the
test to evaluate to true
Rule Set: As the name implies, it is just a set of one or more related rules that are
designed to work together.
Dictionary: A dictionary is the container of all components that make up a business rule;
it holds all the facts, rule sets, and rules for a business rule.
Page 15 of 23
1. Human interactions with processes, including assignment and routing of tasks to the correct
users or groups.
2. Deadlines, escalations, notifications, and other features required for ensuring the timely
performance of a task (human activity).
3. Presentation of tasks to end users through a variety of mechanisms, including a worklist
application (Oracle BPM Worklist).
4. Organization, filtering, prioritization, and other features required for end users to productively
perform their tasks.
5. Reports, reassignments, load balancing, and other features required by supervisors and
business owners to manage the performance of tasks.
Architecture
Page 16 of 23
In Human task service component, we have three parts. First part (Service Part) uses to
interact with BPEL process. Second Part (Client Interface) is used to interact with client
applications. In third part (Task Definition) we create require human task.
1. BPEL process invokes human workflow with human task activity.This creates a task in the
human task service component. The process waits for the task to complete.
2. There is metadata associated with the task that is used by the human task service component
to manage the lifecycle of the task. This includes specification of the following:
Who performs the task? If multiple people are required to perform the task, what is the order?
Who are the other stakeholders? When must the task be completed?
Page 17 of 23
How do users perform the task, what information is presented to them, what are they expected
to provide, and what actions can they take?
3. The human task service component uses an identity directory, such as LDAP, to determine
people’s roles and privileges.
4. The human task service component presents tasks to users through a variety of channels,
including the following:
Oracle BPM Worklist, a role-based application that supports the concept of supervisors and
process owners, and provides functionality for finding, organizing, managing, and performing
tasks.
Worklist functionality is also available as portlets that can be exposed in an enterprise portal.
Notifications can be sent to email, phone, SMS, and other channels. Email notifications can be
actionable, enabling users to perform actions on the task from within the email client without
connecting to Oracle BPM Worklist or Oracle WebLogic Server.
Chapter 9: Adapters
It is a JCA Binding component, which is a lightweight implementation that uses JCA
standards for inbound and outbound communications. It provides an interaction layer
between the integration server and another application. This enable interoperability with
heterogeneous applications, provided by different vendors, based on different
technologies and platforms. The JCA Binding component allows composite application
to integrate with a service exposed through the adapter as if it were a Web service. i.e.
These adapters help us to connect to external system for both inbound and outbound
interactions.
Overview
Page 18 of 23
Types of Adapters:
Types Of Adapter
Further technology adapter are of following types:
Page 19 of 23
a. Read file
b. Write file
c. Sync Read
d. File Listing
Page 20 of 23
JMS/AQ/MQ:
These adapters are used to read the messages from JMS, AQ & MQ. JMS is open/Java
standard, AQ (Advanced Queue) is oracle standard and MQ (Message Queue) is IBM
standard. We can perform below operations in these adapters.
a. Read
b. write
c. Sync Read & Write
Database:
This adapter is used to interact with database. we can connect to different databases
(like Oracle, DB2, SQL etc) using this adapter. In case we need to connect to non-
oracle databases then we need to import require drivers as these drivers are there by
default. We can perform below operations in this adapter.
Types Of Error
Business Faults:
When we have error or fault based on Business functions, it is known as business
faults. e.g. Invalid credit card number, Invalid age etc. These faults are user defined and
application specific.
We can have only one CatchAll block in one BPEL process but we can have more than
one Catch block in BPEL process. If we have both Catch & CatchAll block in one BPEL
then Catch block executed first.
Fault handling framework only handle faults that occurs during runtime in an invoke
activity in a process, the framework catches the fault and performs a user-specified
action defined in a fault policy file associated with the activity.
We need following two files that for policy driven fault handling:
Page 23 of 23
fault-policy.xml: This file defines one or more fault Policies with conditions and actions.
In this file we define what type of error we want to handle and what action we need to
perform when that fault occur. In one file, we can define more than one policy as each
policy will have one unique id.