Wednesday, April 6, 2011

Service-faileover and service-wieght parameter in opmn.xml

Service-faileover and service-wieght parameter in opmn.xml

This parameter will help to give more priority to the service which is running on two nodes
As we know ,2 instance of esb_dt of oc4j can not run at the same time.
so inorder to implement HA on esb_dt we use this parameter .

In the below example we will give service-weight as 100 for node 1 and service-weight as 75 to node 2
So at any point of time we node 1 is down then only node 2 est_dt will start .

Node 1




Node 2













Service failover is mechanism to specify a critical process that must be run somewhere in an Oracle Application Server cluster if service is disrupted on a processing server. This enables you to preferentially select which processes must be kept running.

Any process-type opmn.xml file element may be configured as a service fail-over such that, once started, OPMN will ensure that the configured number of processes for the service are running on Oracle Application Server instances somewhere in the cluster.

You can configure which Oracle Application Server instances will participate in the service fail-over on an instance by instance basis. You can configure each instance for preferential selection of running the process on available instances.

Only one process-set may be defined for each process-type configured as a service fail-over. Only one process will be run for each service fail-over instance.

Note: You should restart the servies after making any changes to opmn.xml

Tuesday, April 5, 2011

Oracle BPEL vs Oracle ESB

BPEL

1. A markup language for composing multiple services into an end-to-end business process

2. A workflow and process flow language
- Synchronous and asynchronous interactions
- Parallel processing
- Exception management
- Provides a way to integrate a set of heterogeneous services to implement business processes

3. Oracle BPEL Process Designer provides a wizard-driven model approach to exposing various systems and services as a Web service through WSDL generated to publish operations that can be performed by the service.

4. Oracle BPEL can be used for integration code but its not designed/optimised for it.. Oracle BPEL is a Business Process Execution Language and as such its optimised for managing and coding business processes, whereas an ESB is quite simply a highly efficient intergration product. Its principle objective is to join two different services together quickly, efficiently and bi-directional.

5. Primarily BPEL is used for Orchestration, data enrichment and also for Human interaction whereas ESB is used for Store and forward transport of data.

6. BPEL is used for bringing together multiple services. There is much more functionality and allows implementation of complex business logic

7. BPEL takes care of the stateful, long running, orchestration steps

8. BPEL operates on the canonical definitions of your business objects – such that
your BPEL process is clean (minimal transformations, assigns) with the focus on
the basic business logic and related compensatory error-handling logic
9. BPEL takes care of the stateful, long running, orchestration steps
- BPEL operates on the canonical definitions of your business objects - such that
your BPEL process is clean (minimal transformations, assigns) with the focus on
the basic business logic and related compensatory error-handling logic

10. Exception handling can be done in BPEL

11. BPEL can use Business rules, Human Workflow and Notifications.


Note
• ESB does not have the Sensors which can be used to monitor the activities that can send actions to Business Activity Monitoring (BAM) or database/jms.









ESB

1. ESB is quite simply a highly efficient intergration product

2. ESBs principle objective is join two different services together quickly, efficiently and bi-directional

3. Oracle ESB is not only quicker to “build” but its also quicker in its exection .An integration process in ESB product is approximately twice the speed of the same process in Oracle BPEL

4. ESB does not have the Sensors which can be used to monitor the activities that can send actions to Business Activity Monitoring (BAM) or database/jms

5. ESB is good for routing messages to multiple destination .It is also good for doing a transformation that have little or no business rules. This footprint is much smaller and incurs minimal overhead therefore the performance in better.

6. ESB (Enterprise Service Bus) implement messaging to enable services to be integrated in a message-based paradigm: both synchronous and asynchronous styles.

7. ESB virtualizes endpoints that BPEL is orchestrating

8. ESB is used for Store and forward transport of data.





So to recap

Use ESB when

You want a really low cost solution

Only need connectivity, simple transformations and routing

Use BPEL+ESB when

You need to code complex business logic
Integration with Workflow
Complex transforms potentially involving the database

Have Long running processes which may or may not be stateful.


The best practices around using BPEL and ESB together are as follows:
- BPEL takes care of the stateful, long running, orchestration steps
- BPEL operates on the canonical definitions of your business objects - such that
your BPEL process is clean (minimal transformations, assigns) with the focus on
the basic business logic and related compensatory error-handling logic

whereas,
- ESB virtualizes endpoints that BPEL is orchestrating
- ESB does the heavy lifting of transformations to and from the canonical definition to
endpoint definitions of the business objects

With an appropriately layered SOA architecture, one would look at ESB as a
repository of services that BPEL orchestrates. At deployment time, this layered
approach provides you the flexibility to dedicate servers to individual
tiers (BPEL and ESB) and thereby maximize the resource usage for your

Sunday, April 3, 2011

Sychronous and Asycnhronous BPEL Process.

ASynchronous process is one which you call need no wait for the response before proceeding further.You may just initiate the

asynchronous process and recive the response when you require it as part of your process.,hence you are not forced to wait for

the response .


Real life example of a Synchronous process: You call a friend and ask him to give you some information. While your friend is

finding out the information for you, you are on the call waiting for his response. Note that connection is not dropped


Real life example of an Asynchronous process: You call a friend and ask him to give you some information. You ask him to call

you back when the information is ready and you disconnect the call. When your friend is ready with the information, he calls

you and gives you the information. Note that you don’t wait for a response from your friend and connection is lost. When your

friend is ready, he has to establish a new connection and then provide you the information


Suppose there are two processes SynchronousBPEL Process and Asychronous BPEL Process.As the name suggest former one is a

synchronous and later one is Asychronous BPLE Process .Also there is a third process which we will call as Client.
The client invokes the above process.

Case 1 :Client Invokes Synchronous BPEL Process.
1. Client invokes synchronous BPEL Process.
2. Synchronous BPEL Process gets inititated and start its operation while client waits for the response time from the

Synchronous BPEL Process.
3. Synchronous BPEL Process complete its opetations and send a response back to Client
4. Client continues and completes its processing

Case 2:Client invokes Asynchronosu BPEL Process.
1. Client invokes an Asynchronous BPEL Process.
2 Asynchronous BPEL Proces gets instatiated and starts its operation while client also continues to perfrom its operatiobs.
3 Asychronous BPEL Process complete its operation and call back with the response the message .


What is the difference between synchronous and asynchronous bpel process?
The synchronous process defines one two way operation port to receive the request and send the response .
Using the invoke activity the client invokes the synchronous bpel process on this port and waits to recieve the response on

the same port .As soon as the client receives the response from the bpel process it continues with its flow .On the BPEL

process side ,the sycnhronous bpel process gets instantiated on receiving the client and sends back the reply using the reply

activity on the same port on which the client is waiting .

In case of Asynchronous processs it is two one way operation ports are defined to receive the request and send the response.
On the client side ,the client uses the invoke activity to invoke the asycnhronous bpel process and continues with the flow .
If uses the reveive acitvity to recieve the response later in the flow .
The asynchronous bepl process recieves the request on one port and sends back the reply from another port(call back port)
To send the responsse the asynchronous bpel proccess invokes the client on the callback port using the callback activity .

For example in the real time, if the client needs an approval ,synchronous process should be implemented .As the proccess has

to wait for the aprroval to proceed.

Oracle BPEL Process Manager

Oracle BPEL Process Manager
1. Runtime for BPEL Process

BPEL Server Major Components
1. Core BPEL Engine
2. WSDL Bindings/Adapter Framework
3. Integration services


1. Core BPEL Engine :The core BPEL Engine is the run-time environment where BPEL Process are deployed and executed
2. WSDL Bindings/Adapter Framework :WSDL binding framework is responsible for communication with the BPEL Process deployed on the server
3. Integration Services :Provided additional services such as Transformation,Notification,Human Workflows .


BPEL Console
1. Can deplpoy,manage,administer and debug BPEL Process
2. Visual Process Flows
3. Audit trials
4. Debugging view of processes
5. Process history
6. Management of BPEL domains and their configuration

BPEL Desinger
1. Graphical based environment
2. Support for JDeveloper and Eclipse
3. JDeveloper provides some advanced feature which are not available in Eclipse


Dehydration Store
1. Store the process state in the databaase
2. Used for long running asychronous processes
3. Support Oracle,MS SQL ,DB2 database

To see the flow .from bpelconsole select any process and click on tab " flow "

Service Oriented Architecture

SOA is an approach for building systems that deliver application functionality as a set of self-contained business aligned services with well defined and discoverable interfaces
SOA decomposes a system in terms of services and focuses on loosely coupled message based interfaces
SOA modularizes business services and focus development efforts on exchange of business information required to support those functions

Web Services: A software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with XML serialization in conjunction with other Web-related standards


SOAP: is a set of conventions that specify a message format together with a set of rules that govern the processing of the message as it passes along a message path.
WSDL: is an XML vocabulary to describe Web services. It allows service authors to provide crucial information about the service so that others can use it.

UDDI: provides a centralized registry of metadata that can reference all kinds of information, including WSDL documents, policies, and others, and offers several powerful and flexible techniques for querying the registry.
BPEL: Business Process Execution Language (BPEL) is an XML-based language for creating a process, which is a set of logical steps (called activities) that guide a workflow

Basic Component of a SOA Infrastructure
1. Build/re-use Services ---> Web or Legacy Services
2. Connect ---------------> Adapters
3. Route & Transform ------> ESB
4. Externalize business rule ---> Rules Engine
5. Orchestrate -------> BPEL/BPM ENGINE
6. Involve human beings ------> HUMAN WORK FLOW
7. Security -------------> Global Security Framework

Enterprise Service Bus

Service consumers and providers may be loosely coupled or there is a need for synchronous, non-deterministic routing (where consumer requires a response but does not explicitly know the service provider).
There is a need to execute specialized functions based on the data, consumer, or provider before executing the business transaction (may include policy validation, transformation, and so on).

Service consumers and providers may be loosely coupled or there is a need for synchronous, non-deterministic routing (where consumer requires a response but does not explicitly know the service provider).
There is a need to execute specialized functions based on the data, consumer, or provider before executing the business transaction (may include policy validation, transformation, and so on).

There must be a way to connect end-point applications to the bus (either through re-architecting or via adapters), and it must be possible to operate them in a service-oriented model (Not all applications can be easily service enabled.