Middleware
It provides a mechanism for the process to interact with other processes running on multiple network machines.
Advantages that middleware could provide are:
- Independence from network services
- Independence from operating system calls
- Reliability
- Availability
- Scalability
There are four basic types of middleware
TP Transaction
Processing Monitor
RPC Remote Procedure call
MOM Message oriented Middleware
ORB Object request Broker
Enterprise resource planning (ERP)
Enterprise resource planning (ERP) is business process management
software that allows an organization
"To use a system of integrated applications to manage the business
and automate many back office functions
Related to technology, services and human resources."
It is a business software system that allows an organization to automate
and integrate with the various business processes sharing common data across
enterprises.
ERP software typically integrates the different facets of an operation
like product planning, development, and manufacturing, sales, marketing etc.
Using a single database, application, and interface.
Oracle Fusion Middleware?
Oracle Fusion Middleware is a collection of
standards-based software products that spans a range of tools and services.
Oracle Fusion Middleware offers complete support
for development, deployment, and management.
What is Oracle SOA Suite Tool
" SOA Suite tool is a middleware tool
from Oracle which is based upon SOA concept comes under
Oracle Fusion Middleware stack. We use this tool for integration
purpose. i.e. This tool is used to integrate two system/applications etc."
What is SOA?
Service oriented Architecture
"SOA stands for Service Oriented Architecture. SOA is not any tool,
rather is a concept and there are many tools in the market based upon this
concept. In this SOA Concept, we use SOA layer as middle or intermediate layer
between services so that these service can communicate with each
other"
Service Oriented Architecture (SOA) is used to develop Enterprise applications
by using a collection of services which communicates each other.
Service-Oriented Architecture (SOA) is a set of principles and methodologies
for designing and developing software in the form of interoperable services.
è It is a design
pattern or software architecture which provide service to other application.
è It is implemented as
web service.
This enables to
Ø Reuse functionality
Ø Have loose coupling
between functionalities
Ø Abstract
implementation
Ø Allow
multiple protocols to talk to each other
SOA:
Ø Reusability
Ø Distributed
deployment
Ø Interoperability
Ø Compensability
Key Role:
Ø Service consumer
Ø Service provider
Ø Service registry
SOA key technologies include:
ØXML
ØWebservice
ØSOAP
ØWSDL
ØUDDI
ØXPATH
ØQUERRY
SOA Benefits:
Ø Increase response
time
Ø Help businesses
become more cost effective
Ø Separate consumers
and services
Ø Loose Coupling:
This means that the service requester has no knowledge of the technical details
of the provider’s implementation, such as the programming language, deployment
platform, and so forth. The service requester typically invokes operations by way
of messages — a request message and the response — rather than through the use
of APIs or file formats.
Ø Cost Cutting
Ø Better reuse: Build
new client functionality on top of existing Business Services.
Ø Well defined
interfaces: Make changes without affecting clients
Ø Easier to maintain :
Changes/Versions are not all-or-nothing
Ø Better flexibility
SOA Principles:
Ø Loose Coupling
Ø Reusability
Interoperability: In SOA, We can easily communicate btn different
component in SOA.
Ø Flexible
Ø Service
Autonomy
Ø Service Contract
Ø Service Abstraction
Ø Discoverability
Ø Service statelessness
Scalability: Without
affecting code we can add different adapter
Architecture of SOA:
Service Oriented Architecture is an architectural design which includes
collection of services in a network which communicate with each other.
It’s an architecture solution to build an integrate systems, applications,
process and businesses.
SOA architecture is viewed as five horizontal
layers. These are described below:
· Consumer
Interface Layer:
o This layer is used by
customer
o These are GUI based
apps for end users accessing the applications.
· Business
Process Layer:
o Provide the business
process flow. Also accommodates new changes in business easily.
o These are
business-use cases in terms of application.
· Services
Layer: These are whole-enterprise, in service inventory.
· Service
Component Layer: are used to build the services, such as functional and technical
libraries.
· Operational
Systems Layer: It contains the data model.
Basic architecture of a Service Composite in Oracle
SOA Suite.
· Service components −
BPEL Processes, Business Rule, Human Task, Mediator. These are used to
construct a SOA composite application.
· Binding components −
Establish connection between a SOA composite and external world.
· Services − Provides an
entry point to SOA composite application.
· Binding − Defines the
protocols that communicate with the service like SOAP/HTTP, JCA adapter, etc.
· WSDL − Defines the
service definition of a web service.
· References − Enables a
SOA composite application to send messages to external services
· Wires − Enables
connection between service components.
What is SCA
Ø Assembling the
service components into a SOA composite application.
Ø SCA provides a
programming model that model allows creating service components written with a
wide range of technologies
Ø Provide a framework
for building applications using SOA
Ø Define a composite
application where set of services are assemble together
Ø Provide a assemble
model to wire together new services and existing services
Ø Extend
and compliments existing approaches to implements services.
Ø Designed based on
open standards such as webservices.
SCA can made up of:
Ø BPEL Process
Ø Mediator
Ø Human task
Ø Business Rules
SCA simplified the entire lifecycle
Development:
è JDev can be used to
develop all components.
Deployment:
è All components are
grouped together in a composite and during compilation, we get a single
file called SAR
è SAR can be versioned
as one, deployed as one and managed as one
Monitoring:
è EM allows to trace
the entire flow, giving ability to drill down into components of a composite
5 key element of SCA
1) composite: Deployment unit
2) Service: Entery point into the composite,
Exposed Service:Service expose by the component that are callable from
outside.
3) Components: Provides the logic to be used with in the composite.
4) Refrence: Refers to internal and external services.
5) wire : Connects services,components and references.
3 sections in composite.xml
Exposed Services | Service Components | External References
Binding Components
Exposed Services & External References
Responsible to interact with outer world from SOA
Benefits of SCA?
Below are the major benefits of SCA.
1. Easier Development: No need to write lengthy code as we get all
components prebuilt.
2. Easily compose a assembly (composite) by just linking different these
prebuilt components.
3. Better re-usability
Composite
Ø Basic unit of SCA
Ø It is collection of
different service component ex:BPEL, Mediator etc.
Ø SOA composite
is a assembly comprises of one or more than one pre-build components. In SOA
composite we wires different components together to perform required business
functionality.
Ø Service Component
that implement business logic
Ø Binding to enable
communication between Service Component and external service or between
composites.
Ø Wiring that connects
components with the composite to enable communications.
Mediator
"The mediator component enables data routing between the service
consumers and provide based on routing rules"
It support both Synchronous and Asynchronous routing of data.
VETO- Validate, Enrich, Transform, and Operate.
BPEL
Business process Execution Language
Process Orchestration
Ability to build and deploy business process.
Coordinates multiple service to complete a business process.
Oracle Business rules
Enables business to change their decisions and policies
Human Task
It enable business processes to involve human interactions.
It involves assigning and routing tasks to correct users and
groups
SOA PATTERNS
Synchronous
Asynchronous
One-way
BPEL - Adapters
Adapters enable to integrate the BPEL process service component with
access to file systems, FTP servers, database tables, database queues, sockets,
Java Message Services (JMS), MQ, and Oracle E-Business Suite.
Advanced Queuing (AQ)
For interaction with a queue. AQ provides a flexible mechanism for
bidirectional, asynchronous communication between participating applications.
Oracle Business Activity Monitoring (BAM)
For publishing data to data objects in an Oracle BAM Server.
Database
For interaction with Oracle and non-Oracle databases through JDBC and
Oracle Business Intelligence (which is a special data source type).
FTP and File
For file exchange (read and write) on local file systems and remote file
systems (through use of the file transfer protocol (FTP)).
Java Messaging Service (JMS)
For interaction with JMS. The JMS architecture uses a one client
interface to many messaging servers architecture.
Message Queue (MQ)
For message exchange with WebSphere MQ queuing systems.
Oracle Applications
For interaction with Oracle Application's set of integrated business
applications.
Oracle B2B
For browsing B2B metadata in the metadata service (MDS) repository and
selecting document definitions.
Sockets
For modeling standard or nonstandard protocols for communication over
TCP/IP sockets.
Adapter
Transactional Adapter
Ø Database
Ø JMS
Ø WebService
Non Transactional Adapter
Ø File
Ø FTP
There are two types of request
Inbound: something which is
coming from outer world toward us.
It will be always implicit (we need not to be initiated)
Outbound: where we r sending
It will be always explicit (need to be initiated)
Database Adapter
->It is used to communicate with oracle database or 3rd party
database by leveraging underlying jdbc connector/drivers.
-> Has the input/ output messages that are easily converted into xml.
->Support synchronous calls from BPEL/mediator.
Operation type:
o Call a stored procedure or functions
o Perform an operation on a table.
o Poll for new or changes records in a table.
o Execute pure sql.
DB Adapter Configuration in weblogic server
In weblogic server console
Create JDBC Data Source
o Set JDBC data Source Properties.
o Configure transaction options- XA or Non-XA
o Configure connection properties
o Test Connections
Deploy new JDBC Data Sources by selecting target server
Create an outbound connection pool for DB adapter.
Add JNDI name of new JDBC data source in properties values of outbound connection pool.
JMS Adapter
Is used to send or receive messages from JMS queue or
topic.
Supports both inbound and outbound adapter
service.
An inbound adapter service receive data from an external messaging
system and transforms it into a xml message.
An outbound adapter service sends data to a target application by
transforming an XML message into the native format of the given adapter.
Supports byte,text, and map message types.
Supports JMS headers and properties.
Support jca.message .encoding property
Operation Types:
o Consumer message
o Produce message
o Request/reply
JMS Adapter Configuration in Weblogic server:
Create an outbound connection pool for JMS Adapter.
In the JNDI name field, enter the JNDI name that you want to use to
obtain the new connection instance.
Ex: eis/wls/queue
Add JNDI name of new JDBC Data source in properties values of the
outbound connection pool.
FILE and FTP Adapter
It is used to exchange (read\write) files on local systems
or remote file system using FTP(File transfer protocol).
Operation types:
Oracle File adapter:
o Read file (inbound operation)
o Write file (outbound operation)
o Synchronous read file (outbound operation)
o List files (outbound operation)
Oracle FTP Adapter:
o Get File (inbound operation)
o Put File (outbound operation)
o Synchronous Get File (outbound operation)
o List Files (outbound operation)
The oracle file and FTP adapter can read and write the
following file formats
o Xml(both xsd and dtd based)
o Delimited
o Fixed positional
o Binary data
o COBOL Copybook data
FTP adapter configuration in weblogic server
console
Update the deployment profile for FTP adapter.
Creat a new security credential Map entry for eis/FTP/FTPAdapter.
Enter EIS username and password details.
How to Poll Single file from FTP/File location
which has multiple files ?
Lets take one example if we have include file wild card as *.txt and
there are 2 files available at File/FTP Location. So read operation will read
both the file and create two instance and created time will be same for both
the instance. To avoid such scenario and read only one file at a time, we need
to use below property in jca file.
<property name="SingleThreadModel"
value="true"/>
<property
name="MaxRaiseSize" value="1"/>
SOA Templates
With the introduction of templates sharing of code between teams become earlier and development efforts reduced. There are three types o
f templates
introduced.
Project Template
Component Template
Custom Activity Template
Template is term used for re-usable component. When we talk about
templates in SOA these refers to re-useable stuff related to services, project
and component.
Project Template: This template contains full
project along with all the artefact’s, components and references. We can create
project template from Jdeveloper 12c, when we create this template from
Jdeveloper 12c then template location gets added to the Jdeveloper preferences
automatically but when we need to use external templates then we need to add
external template location in the Jdeveloper. We can build new application from
this project template, this new application imports all the artefact’s,
components and references which are there in project template.
Component Template: This template contains
service components. We can create template from any composite component. It
also contains all reference components and resources which are there inside
that component. You can find this template in the SOA composite application's
Components window and it appears as a custom service component.
E.g. a BPEL process which calls database adapter can be used as
component template. Once we build template from this BPEL, that template
contains all the components, references and artefacts which are inside that
BPEL process. Please note that this BPEL need not to be complied and need not
to be complete.
Custom activity Template: This template
contains an activity of a BPEL process which may include assign, transform,
invoke, and receive and partner link. We can use this template in the same BPEL
or in any other BPEL. This template also contains all the variables, references
and artefacts which are related to that activity. Custom activities will
be available in the BPEL palette.
BPEL Sub-process
Sub-process is introduced in this launch which helps to reduce
redundancy. Suppose we need to update database table 3 times in one flow so
instead of add 3 different invoke to same BPEL, create sub-process which update
the database table and use that sub-process 3 times in that BPEL. There are two
types of sub-processes.
Standalone sub-process
Inline sub-process
Sub Process act like a bundle which contain a piece of BPEL code which
we can re-use inside same BPEL or different BPEL in same composite. Sub process
contains fragment of BPEL code. Benefit of sub process is that it
increases developer productivity and chances of human error got reduced.
Suppose we have a piece of code which we need to use at multiple places in one
BPEL or in one composite so instead of writing same logic/code again and again
in BPEL, we can create sub process of the logic/code and call it where ever
required in that BPEL or in different BPEL but in same composite. So whenever
we need to make any change into the logic/code we need not to do that change at
all places, we just need to do that change in sub process and that change will
reflect at all place wherever we call that sub process.
Sub processes are supported for only BPEL 2.0; it is not supported for
1.1 version. In the first release of 12c, we cannot use sub processes across
multiple composites i.e. sub processes can be used inside same composite only.
Inline Sub-Process
As name suggests this sub process is in line to parent BPEL
process means this can’t be used outside parent BPEL process. Inline sub
process contains group of activities which we can re-use within one BPEL
process only. This sub process is not visible in composite view as this is part
of parent BPEL. This sub process is visible in palette under sub process.
We need to use call activity to call this sub process inside BPEL process.
Below is real time example which explains the use of inline sub
processes.
E.g. suppose we receive the sales order from source system, once we
receive the sales order, first we update the source system that we receive the
sales order successfully, secondly after we receive the order, we do required
validations and submit the order to target system, after we submit, we again
send status back to source system that order is successfully submitted. In both
the cases we update database flag in source system. Here we can use inline sub
process, we can put activities which update the status in source database in
one scope and create an inline sub process from it. Once we have inline sub
process created, we can use call activity to call that sub process to update
the receive status and submit status. So if in future there is any change in
table structure or table columns then we need to make that change only in sub
process and that will reflect at both the places.
Standalone Sub-Process
As name suggests this sub process act as standalone inside one composite.
Standalone sub process is similar to inline sub process, except we can use it
outside of parent process. This sub process contains group of activities that
can be re-used across other BPEL processes. Similar to inline sub process we
use call activity to invoke standalone sub process. This sub process is also
visible in palette under sub process.
Parallel Flow in a BPEL Process
Parallel flows are especially useful when you must perform several
time-consuming and independent tasks.
A BPEL process service component must sometimes gather information from
multiple asynchronous sources.
Because each callback can take an undefined amount of time (hours or
days), it may take too long to call each service one at a time.
By breaking the calls into a parallel flow, a BPEL process service
component can invoke multiple web services at the same time, and receive the
responses as they come in. This method is much more time efficient.
Execution of Parallel Flow Branches in a Single
Thread
Branches in flow, flowN, and forEach activities are executed serially in
a single thread.
To achieve pseudo-parallelism, you can configure invoke activities to be
nonblocking with the nonBlockingInvoke deployment descriptor
property. When this property is set to true,
the process manager creates a new thread to perform each branch's invoke
activity in parallel.
Creating a Parallel Flow
You can create a parallel flow in a BPEL process service component with
the flow activity.
The flow activity enables you to specify one or more activities to be
performed concurrently.
The flow activity also provides synchronization.
The flow activity completes when all activities in the flow have
finished processing.
Note: Branches in a flow activity are
executed serially in a single thread.
A flow activity typically contains many sequence activities.
Each sequence is performed in parallel.
FLOW
The BPEL Code determines the number of parallel branches.
The flow activity provides a mechanism to specify one or more sequence
of activities to be performed concurrently.
The BPEL Code determines the number of parallel branches. However the
number of required branches could vary depending on the available information.
flowN
Create multiple flows equal to the value of N. which defined at run time
based on data available and logic within within the process.
An index variable increments each time a new branch is created, until
the index variable reaches the value of N.
Types of Faults
Let us now see the different types of faults.
Business faults
Occurs when application executes THROW activity or an INVOKE receives
fault as response. Fault name is specified by the BPEL process service
component. The fault handler using Fault name and Fault variable catches this
fault.
Runtime faults
This is thrown by the system. These faults are associated
with RunTimeFaultMessage and are included in
http://schemas.oracle.com/bpel/extensionnamespace.
Ways of Fault Handling
Throw Activity
Throw activity explicitly throws the fault. The catch block catches this
fault and the corresponding actions get executed thereby.
· Using throw activity, you
can throw business faults & within the created scope, you can catch this
fault and redirect to the caller (consumer) to take action.
· Instead of the above
approach, you throw the same fault caught in catch
activity of the created scope. In the main scope, you can catch
this fault using the catchall activity.
Error Handler Framework (EHF)
The 2 main files used in EHF are −
Fault-Policy.xml
Fault-Bindings.xml
Whenever the BPEL process throws an error, the EHF will check whether
the error exists in Fault-Bindings.xml files. If so, the action in the
Fault-Policy.xml file will be taken. If the action is not found, the fault will
the thrown and it will be handled in the catch block.
Fault management framework (Fault-Policy.xml and Fault-Bindings.xml) is
kept inside a SOA Composite.
Fault-handlers like catch and catchall are inside a BPEL to catch all
faults, but
fault policies will only be executed when an invoke activity
fails.
BPEL - Multiple Application Interactions
Correlation
multiple application interactions with BPEL
· When there are more than two
applications involved in a transaction.
· This A-to-B-to-C-to-A
transaction pattern can handle many transactions at the same time. Therefore, a
mechanism is required for keeping track of which message goes where.
· This can be handled using
WS-Addressing or correlation sets.
Note − The difference between responding from a synchronous and
asynchronous BPEL process is that the synchronous service uses a reply activity
to respond to the client and an asynchronous service uses an invoke activity.
Correlation Sets
Correlation sets are used to uniquely identify process instances. You
provide each correlation set with a unique name and then define it by one or
more properties. Each property has a name and a type (for example, string or
integer).
Property Alias
The property alias for each property in the correlation set needs to be
defined. A property alias is a mapping that binds the property with the input
or output values.
No comments:
Post a Comment