Thursday, December 26, 2013

OSB References

1. Quick Start Guide for various service composition in OSB:
http://docs.oracle.com/cd/E23943_01/doc.1111/e15020/service_composition.htm

2. Quick Start Example for OSB, just download and import to OEPE
https://java.net/projects/oraclesoasuite11g/pages/OSB


Wednesday, November 13, 2013

Oracle Service Bus Performance and Best Practise

1. wsdl choice - XML Schema choice element allows only one of the elements contained in the <choice> declaration to be present within the containing element.
Either DN number or MAC number is mandatory, here we can use choice keyword instead of min/max attribute

2. Canonical object need to be presented in the Meta data source such that it can be reused apporiately . Due to this we can avoid frequent transformation and translation of data, This improve the performace of the syste,

 3.  When service is expected to hit number of concerent request (may be in 1000s) which cannot be handled by the business service then we can make apply Throttling in OSB such that number of concurrent request send to the business service can be reduced which yield in better performance than burdening the business service which cant able to handle larger set of request.

why we need OSB throttling ?
Every system has its own capacity means it can process only certain number of message at one time, if we try to send messages beyond its capacity then that system's performance can degrade or in worst case it can crash. So to avoid all this we can use OSB throttling feature to send limited messages to target system.

http://soawork.blogspot.in/2013/01/throttling-in-osb.html

4. In developement we can enable the Trace option in SBConsole such that we can find the rootcause of the exception and to find which stage encounter the issue
You can enable execution tracing from View a Proxy Service page of the Oracle Service Bus Administration Console.

Execution Tracing

Oracle Service Bus enables you to trace messages without having to shut down the server. This feature is useful in both a development and production environments. Execution tracing allows administrators, support engineers, and systems engineers to troubleshoot and diagnose a message flow in one or more proxy services.
For example, if one of your proxy services is failing and you want to find out at which stage the problem exists, you can enable execution tracing for that proxy service. After tracing is enabled, the system logs various details extracted from the message flow such as stage name, name of the pipeline, and route node name.
The entire message context is also printed, including headers and message body. When a fault occurs in the message flow, additional details such as error code and reason are logged. Execution tracing occurs at the beginning and end of each component in the message flow, which includes stages, pipelines, and nodes. Actions are not traced individually.

5. Load Balancing
https://blogs.oracle.com/christomkins/entry/load_balancing_in_oracle_servi

6. Exception Handling
http://www.oracle.com/technetwork/articles/soa/luttikhuizen-fault-handling-2-1940722.html

7. How to use Adaptor in OSB
http://guidoschmutz.wordpress.com/2010/08/14/oracle-service-bus-11g-and-db-adapter-part-ii-the-video-2/



Monday, November 11, 2013

Oracle OSB -- WSDL Import - Invalid resource selected while importing

Oracle OSB -- WSDL Import - Invalid resource selected while importing  

 

* Check whether there is compilation error in the wsdl. If there is compilation error then above error will be thrown.

* Check whether service element is added and it pointing to the deployed server location.

* When to use Routing and when to use Service Callout

http://jaredsoablogaz.blogspot.co.uk/2013/01/choosing-between-route-service-callout.html

 

Thursday, November 7, 2013

OSB Quick reference for message process and OSB calling Asynch BPEL process

Good example for OSB calling Asynch BPEL process
http://soawork.blogspot.co.uk/2012/12/call-asynchronous-webservice-from-osb-over-http.html


Quick reference for OSB  message process.

Action Use to... Available in
Assign
Assign the result of an XQuery expression to a context variable.
  • Pipeline stage
  • Error handler stage
Delete
Delete a context variable or a set of nodes specified by an XPath expression.
  • Pipeline stage
  • Error handler stage
Insert
Insert the result of an XQuery expression at an identified place relative to nodes selected by an XPath expression.
  • Pipeline stage
  • Error handler stage
Java callout
Invoke a Java method, or EJB business service, from within the message flow.
  • Pipeline stage
  • Error handler stage
MFL transform
Convert message content from XML to non-XML, or vice versa, in the message pipeline. An MFL is a specialized XML document used to describe the layout of binary data. It is an Oracle proprietary language used to define rules to transform formatted binary data into XML data, or vice versa.
  • Pipeline stage
  • Error handler stage
Rename
Rename elements selected by an XPath expression without modifying the contents of the element.
  • Pipeline stage
  • Error handler stage
Replace
Replace a node or the contents of a node specified by an XPath expression. The node or its contents are replaced with the value returned by an XQuery expression.
A replace action can be used to replace simple values, elements and even attributes. An XQuery expression that returns nothing is equivalent to deleting the identified nodes or making them empty, depending upon whether the action is replacing entire nodes or just node contents.
The replace action is one of a set of Update actions.
  • Pipeline stage
  • Error handler stage
Validate
Validate elements selected by an XPath expression against an XML schema element or a WSDL resource. You can validate global elements only; Oracle Service Bus does not support validation against local elements.
  • Pipeline stage
  • Error handler stage


Request-Response messaging with JMS

We need two queues, the RequestQueue where the request is sent to and consumed by the
replier, and the ResponseQueue where the answer/reply is sent to by the replier and then
consumed by the initial requester.


Thursday, October 17, 2013

Bpel Flow Activity For Parellel Process.


Pareller But Sequential using Flow activity :)

When we need to build a composite bpel service where we need to invoke several services in parallel for performance reasons we need to use Flow activity.  Branches in flow, flowN, and forEach activities are executed serially in a single thread (that is, the Nth branch is executed only after N-1 execution has completed). Execution is not completely parallel. This is because the branches do not execute in concurrent threads in this mode. Instead, one thread starts executing a flow branch until it reaches a blocking activity (for example, an synchronous invoke). At this point, a new thread is created that starts executing the other branch, and the process continues. This creates the impression that the flow branches are executing in parallel. In this mode, however, if the flow branches do not define a blocking activity, the branches still execute serially.


Parellel and Purely Parrelel using Flow:

First, you should go ahead and implement your flow with as many branches as required each with a service invocation.  You should then have a process that looks similar to the one below. 
To execute these invocations in parallel, double click on each partner link on the right side of the BPEL process.  Go to Properties and add a new property.  Select nonBlockingInvoke from the list and set the value to true.

Below link has an example for combination of Invoking Asynchronus webservice in parellel way by using Flow and Pick activity.
http://sathyam-soa.blogspot.in/2013/10/learner-series-oracle-bpel-receive-pick.html


Tuesday, October 15, 2013

Oracle SOA Transaction in BPel and Mediator

Oracle SOA Transaction in BPel and Mediator:

Oracle SOA Transaction in BPel and Mediator:

BPel:
Transaction in BPel is depends on the idemponent value of invoke activity.
If the idemponent value is set to false then new transaction is created after that invoke. Also dehydrate the invoke idemponent false activity. Point to be noted here is all the resources which are getting used is binded with XA transaction. If resources are binded with XA transaction something like webservice then we need to use compensating transactions



Mediator:
Transaction in mediator uses the existing transaction from the callee if the transaction exist else it will create a new transaction.

Syn Routing
In case of sync routing rules, they will be all executed in the same transaction, and if an error occurs, a rollback will be issued.

Note: in this case even a fault policy that is configured against a mediator fault will NOT trigger.

Explanation for Fault Policy not getting triggered:
In below scenario there are three invoke activities, in syn routing all are under one transaction. If second invoke fails then both invoke 1 and 2 is rolled back.  Concidered fault policy is written to retry when remote fault occurs. If fault policy is triggered then retry will be happening only for Invoke 2 but Invoke 1 is already rolled back hence fault policy is not triggered during synch routing.

Invoke 1

Invoke 2 ---> Exception (RemoteFault)

Invoke 3

 
Asynch Routing:
In case of async routing rules, each rule will be executed in a new transaction, and if errors occur, a rollback will happen, and a fault policy can be configured to react to it.


Refence:
http://www.oracle.com/technetwork/articles/soa/wli-bpel-transactions-088255.html
https://blogs.oracle.com/soabpm/entry/soa_suite_11g_-_transactions_b

Dehydration Process

Dehydration Process:
 
Dehydration is persisting the transaction in DB. This will be used as a point from which the Bpel Manager to retry the process. If there are three invoke point in a process if system restared in second invoke point and if its dehydrated then during rerunn of the instance process will start from third process instead of rerunning the first two invoke.
 
Durable processes incur one or more dehydration points in the database during execution. Dehydration is triggered by one of the following activities:
 
  • Receive activity
  • OnMessage branch in a pick activity
  • OnAlarm branch in a pick activity
  • Wait activity
  • Reply activity
  • checkPoint() within a <bpelx:exec> activity

Sunday, October 13, 2013