Thursday, 1 January 2015

Changing Endpoint in Business service in OSB

Before we start thinking of the ways available to achieve this task. We need to think the cases where exactly it’s required.

1.     As per environment, where the service is getting deployed we need to change endpoint url of the business service. (Static and well planned)
2.     As per the input from user we need to call the Business service dynamically with the same service contract. (Dynamic)
3.     Business service which belongs to external vendor has suddenly changed the URL, we need to accommodate the change ASAP. (Static and adhoc)

In my opinion the solution will also vary as per the use case:

For first case: we can write scripts to change the endpoint url in .bz service itself. As Business service URLs will be available as per the environment, while deploying only we can change the url. So that once the service is deployed it will be pointing to correct backend system. This is more generic in terms of implementation.

Also in OSB console, we can generate customize file for the project, which contains all the data which can be configured like endpoint URL. So we can make use of customized file as well to do endpoint configuration for different environments.

For Second Case:  This can be done by using dynamic routing, where the format of the request remains same only the endpoint needs to be decided at the runtime.
Also, we can use routing options, where we can set the targetendpoint url. We can create the targetendpoint url dynamically in xq and then save it in routing options.

For Third Case:  where the URL is static and has been changed for some environment, we can
This can be done by Login to sbconsole and in the Proxy Service Message Flow and click on Edit Route
Select Request Actions and select URI

Wednesday, 26 November 2014

Basics of Oracle AQ

Oracle Advanced Queue, as the name suggests has all the queue features. The added advantage which oracle AQ offers is the oracle DB, means we can have a persistent queue which will be stored in db.

Oracle AQ follows some basic structure to store the message in queue.
first of all we need to create AQ table which will be having queues and then can schedule propagation and create subscribers.

Just to quote the definition from Oracle
 "Oracle Advanced Queuing (AQ) is a database-integrated messaging infrastructure
in Oracle Database 11g. AQ leverages the functionality of the Oracle database to
store messages in persistent queues. All operational benefits of the Oracle database
such as High Availability, Scalability and Reliability are applicable to the messages
and queues in AQ. "



When I had to work on AQ the basic confusion I had was
how propagation and subscribers are different ?
and when to use what ?

well the basic difference that I understood was, Creating subscribers is a way to tell the corresponding queue can be dequeued by the declared subscriber. So that if there is any rule or transformation required for that subscriber then it will be done while dequeuing operation only.

Propagation is pretty straightforward. As soon as message comes or as per settings(time and delay) the message will be propagated to other queue, this queue can be in the same database or it exists in some remote db.

Sample troubleshooting steps:

1.      1.  Check if the database link to the destination database has been set up properly. Make sure that the queue owner can use the database link. You can do this with:
Select count(*) from table_name@dblink_name;


2.       2. Check whether Queues are enabled for enqueue/dequeue:
Select * from USER_QUEUES where name =  'QUEUE_NAME';

2.1            If the queues are disabled for enqueue/dequeue, then we can start it by using following sample command:
EXECUTE DBMS_AQADM.START_QUEUE(QUEUE_NAME => QUEUE_NAME');

commit;

3.       3.  Check messages in the queue:
select *  from AQ$QUEUE_TABLE_NAME;
4.      4.  Check the subscribers for  the queue :

select * from ALL_QUEUE_SCHEDULES;

Common AQ Errors(copied from Oracle docs):



ORA-1555
You might get this error when using the NEXT_MESSAGE navigation option for dequeue. NEXT_MESSAGE uses the snapshot created during the first dequeue call. After that, undo information may not be retained.
The workaround is to use the FIRST_MESSAGE option to dequeue the message. This reexecutes the cursor and gets a new snapshot. FIRST_MESSAGE does not perform as well as NEXT_MESSAGE, so Oracle recommends that you dequeue messages in batches: FIRST_MESSAGE for one, NEXT_MESSAGE for the next 1000 messages, then FIRST_MESSAGEagain, and so on.
ORA-24033
This error is raised if a message is enqueued to a multiconsumer queue with no recipient and the queue has no subscribers (or rule-based subscribers that match this message). This is a warning that the message will be discarded because there are no recipients or subscribers to whom it can be delivered.
ORA-25237
When using the Oracle Streams Advanced Queuing navigation option, you must reset the dequeue position by using the FIRST_MESSAGE option if you want to continue dequeuing between services (such as xa_start and xa_end boundaries). This is because XA cancels the cursor fetch state after an xa_end. If you do not reset, then you get an error message stating that the navigation is used out of sequence.
ORA-25307

Flow control has been enabled for the message sender. This means that the fastest subscriber of the sender's message is not able to keep pace with the rate at which messages are enqueued. The buffered messaging application must handle this error and attempt again to enqueue messages after waiting for some time.

This white paper contains all the basic info about AQs:

http://www.oracle.com/technetwork/database/features/data-integration/oracle-aq-tech-wp11-2-191324.pdf

Fundamentals of BPEL

To Start with, BPEL (Business Process Execution Language), is an OASIS standard executable language for specifying actions within business processes with web services. Source Wiki

So if we say BPEL we mean a standard language, whose basics will not change as per the implementing companies/product. All we need is BPEL engine to run the BPEL code. This engine can be open source or licensed one, depending on the additional features we may require for the product/service to be developed.

For example we have few companies IBM, Oracle, WSO2 which strictly follow BPEL (OASIS) standards and provide additional features on top of the basic BPEL.

Latest version of BPEL is 1.2 -->2.0 which was revised from 1.1.

Few differences are :

New Activities 2.0


  • activity to repeat the set of activities . Replace the FlowN activity in BPEL 1.1 version.
  • - Use this activity if the body of an activity must be performed at least once. The XPath expression condition in the repeatUntil activity is evaluated after the body of the activity completes.
  •  -- - Replaces the switch activity in BPEL 2.0 - This activity enables you to define conditional behavior for specific activities to decide between two or more branches. Only one activity is selected for execution from a set of branches.
  • Changed to
  •  - to compensate the specified child scope
  • A activity has been added to fault handlers this activity enables you to rethrow a fault originally captured by the immediately enclosing fault handler.
New activity types:- repeatUntil, validate, forEach (parallel and sequential), rethrow, extensionActivity, compensateScope 
Renamed activities:- switch/case renamed to if/else, terminate renamed to exit 
Termination Handler:- added to scope activities to provide explicit behavior for termination
Variable initializationportType attribute:- The attribute "portType" of messaging activities such as "receive," "invoke," "reply," "pick," and "onEvent" is no longer mandatory and can be omitted

Source: http://www.albinsblog.com/2012/09/difference-between-bpel-11-and-bpel-20.html#.VR5s3cbCkRY



Just To summarise and revise ;) 

Messaging:- In BPEL 1.1 there is no defined behavior for a process that receives a message for a request-response operation and finishes without replying. In BPEL 2.0, such a scenario would have trigged a new BPEL standard fault called "missingReply" fault.

Source : http://pushplsingh.blogspot.in/2011/10/comparison-between-bpel-11-and-20.html


Coming back to BPEL, since I am from Oracle SOA suite background I would share my learnings in BPEL in terms of features and extensions provided by oracle.



Oracle extensions: 

Email 

Java Embedding activity:
we can embed Java code snippets directly into the BPEL process using the Java BPEL exec extension.
When we drag a Java Embedding activity into a BPEL process in Oracle BPEL Designer, the  element and bpelx:exec tag are automatically added.

IM

Replay

Transform

Dehydration Store :As discussing this will require more than one blog..there is one informative blog for dehydration you can refer to : http://www.soatutor.com/2012/08/dehydration-in-bpel-oracle-soa-suite-11g.html

Dehydrate
Over the life cycle of a BPEL instance, the instance with its current state of execution may be saved in a database. When a BPEL instance is saved to a database, the instance is known as being dehydrated. The database where the BPEL instance is saved is called a dehydration store.

Skipping dehydration
  • For Synchronous processes that do not need to be durable, you can turn off the dehydration mechanism by setting the following properties at process or engine level:
  • Skipping dehydration will increase performance with a cost of auditing.
  • By Default, all BPEL processes are dehydrated regardless of whether they are Synchronous or Asynchronous process.
  • Set inMemoryOptimization to true.
  • Set completionPersistPolicy property to faulted or Off.
  • Asynchronous process invocation messages are always saved to the dehydration store.
  • Durable process are always dehydrated regardless of the settings of the persistence properties.
Dehydration Tables
  1. Cube_Instance: Stores the information about the composite instance that gets created.
  2. Cube_scope: Stores information about the scopes and variables declared and used.
  3. DLV_Message: All the incoming payload details are stored.
  4. Invoke_Message: All the outgoing message payload details are stored.
  5. Audit_Trail: Used to store information of the xml that is rendered in EM console.

Link Referred :http://manoharsr.wordpress.com/2013/05/13/dehydration-in-soa/

Wednesday, 10 September 2014

Message Throttling, Service Virtualisation, Load Balancing and Service Result Cache features of OSB

Message Throttling, Service Virtualisation ,Load Balancing and Service Result caching features of OSB are some of the main features of OSB which gives it an added advantage over other integration tools..


Message Throttling -
A common problem with integration is the risk of overloading a particular web service. When the capacity of a web service is reached and it continues to accept connections, it will most likely start to deteriorate.

Limiting the Concurrent Number of Requests
Limiting the concurrent requests for a Business Service cannot be set at design time so you have to use the built-in Oracle Service Bus Administration Console to do it (/sbconsole). Follow these steps to enable it:
In Change Center, click Create to start a new Session
Select Project Explorer, and navigate to the Business Service you want to limit
Select the Operational Settings tab of the View a Business Service page
lIn this tab, under Throttling, select the Enable check box. By enabling throttling you
pSpecify a value for Maximum Concurrency
pSpecify a positive integer value for Throttling Queue to backlog messages that has exceeded the message concurrency limit
pSpecify the maximum time in milliseconds for Message Expiration a message can spend in Throttling Queue
lClick Update
lClick Active in Change Center to active the new settings


Service Virtualisation - 
Service virtualization is an approach to deploying and managing services.

A core principle of SOA is to ensure that any service consumer can access any service provider - and from any platform. This has been considered as key principle in OSB and it provides robust way of Vitalizing the Service. It’s a great value add in SOA Architecture.

This we can achieve in OSB, by doing,  protocol transformation, message transformation and by routing the service to the end system(backend) dynamically. 

Service Result Cache - 
Service Result Caching is one of the options that you can use when you want to improve Oracle Service Bus performance. Service Result caching is used when we have business service which connects to external service which returns somewhat static response. So by using Service Result Caching we don’t hit external service for same request instead it will take the response from cache which improve the OSB performance

Load Balancing:
lIn Oracle Service Bus you must define at least one endpoint URI for a business service. When you define multiple endpoint URIs for a business service you must define one of the following load balancing algorithm:
pRound robin
pRandom
pRandom-weighted
pNone

lThe load balancing algorithm controls the manner in which business service tries to access the endpoint URI. 
Round-robin - This algorithm dynamically orders the URLs that you enter in the Endpoint URI field for this business service. If the first one fails, it tries the next one, and so on until the retry count is exhausted. For every new message, there is a new order of URLs.
Random - This algorithm randomly orders the list of URLs that you enter in the Endpoint URI field for this business service. If the first one fails, it tries the next one, and so on until the retry count is exhausted.
Random-weighted - This algorithm randomly orders the list of URLs that you enter in the Endpoint URI field for this business service, but some are retried more than others based on the value you enter in the Weight field.
  None - This algorithm orders the list of URLs that you enter in the Endpoint URI field for this business service from top to bottom.


Some quick FAQs :


1. when you deploy the service does caching get refreshed ?
Ans: It will not be refreshed, when proxy service is redeployed. But will be refreshed when BusinessService(where actual caching is happening) is deployed.

2. When you change the service through console and then redeploy the service from eclipse does it overwrite the changes like monitoring and throtlling, endpoint uri  ?
Ans : It will overwrite endpoint uri.
Monitoring - no
Throttling - no

As Monitoring and throttling are done from SB console these values will remain as is.

3. For Load balancing when we set offline URI option for the unavailable business service , Will offline URL will be offline after deployment ?
Ans. yes it will be offline, till its time is over or we make it online through console.

4. Load balancing algorithm in OSB Business service ?
 Round-robin - This algorithm dynamically orders the URLs that you enter in the Endpoint URI field for this business service. If the first one fails, it tries the next one, and so on until the retry count is exhausted. For every new message, there is a new order of URLs.

Random - This algorithm randomly orders the list of URLs that you enter in the Endpoint URI field for this business service. If the first one fails, it tries the next one, and so on until the retry count is exhausted.
Random-weighted - This algorithm randomly orders the list of URLs that you enter in the Endpoint URI field for this business service, but some are retried more than others based on the value you enter in the Weight field.
None - This algorithm orders the list of URLs that you enter in the Endpoint URI field for this business service from top to bottom.

5.  In result caching, what is the TTL(Time to live) by default?
Ans; Default expiration time is taken from OSB coherence config file- //config/osb/coherence/osb-coherence-cache-config.xml
By default it is set to 5 minutes,

6. In Result caching how and where we use xquery expression for  Expiration time ?
Ans. It is worth noting that the Cache Token may be specified as any expression you like, using the XQuery functional programming language.
XQuery has a rich syntax for constructing queries, including the use of many system libraries with common functions such as numeric operations and string manipulation.
Clear the cache explicitly
It might be that you can’t risk the cache becoming stale under certain circumstances.  If that is the case, rather than using a time parameter to manage the lifetime of the cached responses, mark critical requests with an additional flag and select XQuery Expression in the expiration time options to test for the existence of this flag.

7.where we will set the persistent level and priority while calling JMS queue ?
Ans: In JMS transport page of Business service we can set the message persistence.

For Message Priority, we can use transport header activity in Proxy service to set the priority for a message



8. what is this Tracing option in monitoring page ?
By using tracing option, we can actuallly see the message flow for that particular service in logs.Tracing messages in the Oracle Service Bus can give you a very good insight of what’s really happening inside your services. Message tracing can be very valuable for detailed monitoring the content of the requests (full) and give you insight on the amount of service calls going in your service (headers or terse).
The tracing information is stored in the server directory logs at the following location:
DOMAIN_HOME/domain/servers/server_name/logs/server_name.log

Source: http://jvzoggel.wordpress.com/2012/01/23/osb_tracing_runtime/

9. In Sbconsole, inside General Configuration, what is the use of state ?
Ans. It actually say whether the service is online(available) or offline.



Very useful brief Usage of operational settings,
"Copied From Oracle " - http://docs.oracle.com/cd/E28280_01/admin.1111/e15867/monitoring_ops.htm

Operational Settings for Services in the Administration Console
Operational SettingsUsageDefault Value When a Service is Created
State
Use this to enable or disable a service.
Enabled
Monitoring
Use this to enable service monitoring at a specific level or above. You can also use this to disable service monitoring for proxy services.
Disabled
Aggregation Interval
Use this to set the aggregation interval for the service.
10 minutes
SLA Alerts
Use this to enable SLA alerting for services at a specific level of severity or above. You can also use this to disable SLA alerting for a service.
Enabled
Pipeline Alerts
Use this to enable pipeline alerting for proxy services at a specific severity level or above. You can also use this to disable pipeline alerting for proxy services.
Enabled at Normal level or higher
Reports
Use this to enable or disable message reporting for proxy services.
Enabled at Normal level or higher
Logs
Use this to enable logging at a specific severity level or above. You can also use this to disable logging for proxy services.
In proxy service log actions, the severity level of the log actions must match the Logging severity level on the proxy service operational settings.
Note: To see log data in the log file or standard out (server console), Oracle WebLogic Server logging must be set to the following severity levels:
  • Minimum severity to log: Info
  • Log file: Info
  • Standard out: Info
For information on setting log severity levels, see "Using Log Severity Levels" in Oracle Fusion Middleware Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server.
Enabled at Debug level or higher
Execution Tracing
Use this to enable or disable execution tracing for proxy services.
Note: To see tracing in the log file or standard out (server console), Oracle WebLogic Server logging must be set to the following severity levels:
  • Minimum severity to log: Info
  • Log file: Info
  • Standard out: Info
For information on setting log severity levels, see "Using Log Severity Levels" in Oracle Fusion Middleware Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server.
Disabled
Message Tracing
Use this to enable or disable message tracing for proxy services at a specific detail level or above. You can also set the payload limit (in kilobytes) and the default encoding.
Note: See note for Execution Tracing.
Disabled
Offline Endpoint URIs
Use this to enable or disable non responsive endpoints for business services. You can also specify the interval of time to wait before retrying the offline endpoint URI. You can enable or disable offline URIs for business services only.
Disabled
Throttling State
Use this to enable or disable throttling for a business service.
Disabled
Maximum Concurrency
Use this to restrict the number of messages that can be concurrently processed by a business service.
0
Throttling Queue
Use this to restrict the maximum number of messages in the throttling queue.
0
Message Expiration
The maximum time interval (in milliseconds) for which a message can be placed in throttling queue.
0
Result Caching State
Use this to enable or disable result caching for a business service
Enabled
Result caching is globally enabled by default

Tuesday, 2 September 2014

OSB VS BPEL, Which one to go for and Why...

OSB and oracle BPEL both are very popular tools for integrating the systems.

After going through some blogs, here is the quick info:

Basic Differences:

1. OSB is stateless and BPEL can be made stateless by setting the audit settings. However the audit settings turning off doesn't apply to mediator. 
2. OSB is far more superior in performance because it is stateless. In addition, it offers capabilities not supported in composite development such caching, throttling, and service virtualisation.
3. OSB has some severe limitations; the most serious being within transaction visibility, tracing, and metrics. It is either difficult, cumbersome, or impossible to find out if transactions have gone through the OSB engine and detailed, dynamic metrics are unavailable. 
4. OSB 11g cannot reference artifacts in the MDS (MetaData Store). Custom code is required for DVM support.
5. SOA Suite provides a better capability to handle transactions, compensation and asynchronous flows.
6. BPEL is better when the logic is complex as it has many inbuilt activities.
7. You dont get any monitoring and SLA management capability with Mediator and SOA. 
8. SOA Suite provides a better capability to handle transactions, compensation and Asynchronous.
9.As BPEL uses dehydration store to store the life cycle of a BPEL instance, it is very useful for long running processes.

Coming Back to OSB...
Few Features of OSB such as Service Result Caching, Message Throttling and service Virtualisation, makes it an ideal choice where Service Virtualization and 
 Message-Oriented Solutions are required.

Thursday, 19 December 2013

Fundamentals of Oracle AIA

Few weeks back I had to understand the oracle's AIA for our new project, since I am from OSB background relating to AIA was not a big task. When I was referring to blogs and oracle documents I made my notes which can help anyone to understand the basics..

Q. What is an AIA ?

Ans- Application Integration Architecture is oracle's set of best practices to integrate various systems/applications using SOA Suite middleware.
AIA is a complete integration solution for orchestrating agile, user-centric business processes across enterprise applications.

Q. What is foundation pack ?

Ans- If we have jdev installed in our machine we can easily download AIA foundation pack, by using help->softwareupadate (Update center).
Foundation pack basically contains the framework to build  AIA specific(concept wise) services ABCS. when we create ABCS using foundation pack, framework by default will create the skeleton of the service including error handling framework, thus reducing the manual effort.

Steps to install foundation pack in JDev- 


-Update JDeveloper with the SOA Suite Composite Editor plug-in from the Update center.

-Update JDeveloper with AIA Service Constructor plug-in from the Update center.
- Apply Freemarker 2.3.15 or higher needed by AIA Service Constructor.
       Download Freemarker template engine from http://www.freemarker.org.
       Put freemarker.jar (extracted from the downloaded zip file) in the jdeveloper/jdev/lib folder.

Q. What is canonical model ?
Ans-  A model which is in the simplest form possible based on a standard, application integration (EAI) solution. Most organizations also adopt a set of standards for message structure and content (message payload). The desire for consistent message payload results in the construction of an enterprise or business domain canonical model common view within a given context. (Source wiki)

Q. Terminology and building blocks?

Ans - 
EBO -EBOs are enterprise business objects based on the canonical object model. Reusable components representing a business object such as Sales Order, Party, Item, Customer etc. The Enterprise Business Objects are delivered as XML Schema Definition (XSD) files.

EBM - The Enterprise Business Message (EBM) defines the elements that are used as messages in service

operations. The EBM payload is a restricted view of the EBO content and it includes only the
content necessary to perform the specific operation. The Web Services accept EBMs as input and
return EBMs as output.


EBS -Enterprise Business Services (EBSs) are the foundation blocks in AIA. EBS represents the 
application independent web service definition for performing a business task.

ABM - An ABCS can be requester-specific or provider-specific. A requester ABCS accepts the request from the client application through a client-specific Application Business Message (ABM) and returns the response to the client application through a client-specific ABM.

The image is described in the surrounding text
ABCS -  Application business connector service is basically a service which speaks to any application can be CRM, BRM etc.
ABCS can be of two types requester or provider. Requester ABCS is the one which requests/calls other application EBS. And Provider ABCS is the one which which gets the request from other application's EBS.


The ABCS is responsible for the coordination of the various steps that are provided by several services, including:
 -Validation (if any)
 -Transformations - message translation, content enrichment, and normalization
 -Invocation of application functions
 -Error handling and message generation
 -Security
Let's say application A wants send some updates to application B. Then first application A's requester ABCS will have the application request(ABM) this ABCS will transform its request to another application specific request(EBM) then sends it to EBS. EBS when gets the request depending on the requirement it transforms the incoming request (EBM) to a particular application specific request(ABM) and the sends it application B's provider ABCS.

The image is described in the surrounding text

All images copied from oracle documentaion

Q. What is PIP ?

Ans- Oracle's AIA has PIPs for various domains like communication, which can help in reducing the manual effort and customer can directly focus on their requirement instead of focusing on the basic design and integration part. Pre integration packs or Pre built packages are the set of processes/services/delivarebles which when installed/deployed on SOA suite can directly integrate various systems like CRM, BRM, E-BS.

All we need to provide is the connection details to PIP and it will connect/integrate to the systems.

Oracle with their partners have come up with various PIPs, which can save lot of design and development time.


Here are few commonly used PIP in the current industry:
  • Siebel CRM Integration Pack for Oracle Order Management
  • Agile Product Lifecycle Management Integration Pack for Oracle E-Business Suite
  • Oracle Design to Release Integration Pack for Agile Product Lifecycle Management and JD Edwards Enterprise
  • Agile Product Lifecycle Management Integration Pack for SAP
  • Oracle Customer Master Data Management Integration Option for Oracle E-Business Suite
  • Siebel CRM Integration Pack for i-flex FLEXCUBE Account Originations
  • Siebel Call Center Integration Pack for Oracle Adverse Event Reporting System
  • Oracle Application Integration Achitecture for Communications
  • Oracle Primavera to the Oracle E-Business Suite
  • Oracle CRM On Demand to Oracle’s JD Edwards World


Q. AIA Extensions?

Ans- As we know AIA PIP comes with pre built integration pack, so once its installed/deployed we have integrated various systems. But as we know each customer/client/company will have their own requirement that depends on the customers they are serving.

To fulfil the customization needs as per the client we need to  update the ABCS, EBS, EBO this is called AIA Extension.


In AIA extension, we can extend all the components i.e. ABCS, EBS, EBM, EBO as per our requirement.


Extending ABCS - 


Extending EBS/EBM/EBO -

Oracle AIA facilitates the extension of delivered Enterprise Business Objects (EBOs) to accommodate the introduction of industry-specific and customer-specific needs.

Extending ABCs -  http://soawork.blogspot.in/2012/10/develop-extension-enabled-abcs-aia.html


Q. what is CAVS?

Ans- The Composite Application Validation System (CAVS) is a framework that provides a structured approach to test integration of Oracle Application Integration Architecture (AIA) services. The CAVS includes test initiators that simulate web service invocations and simulators that simulate service endpoints.
In the context of AIA, where there is a sequence of service invocations; spanning Application Business Connector Services (ABCSs), Enterprise Business Services (EBSs), Enterprise Business Flows (EBFs), and participating applications; the CAVS test initiators and simulators enable a layered testing approach. Each component in an integration can be thoroughly tested without having to account for dependencies by using test initiators and simulators on either end.

The CAVS provides value as a testing tool throughout the integration development life cycle:

Development
Quality assurance

Source -http://docs.oracle.com/cd/E23549_01/doc.1111/e17366/chapter.htm

Q. Versions available ?


Ans - 

AIA Version History and Tech Stack Implementation:

  • First stable version was 2.x series i.e 2.1, 2.2, 2.3, 2.4 and 2.5
  • AIA 2.x versions was deployed on SOA 10g  i.e OAS 10gR3 or Weblogic Server 9.2
  • Oracle service registry for SOA or Aqualogic service registry for Weblogic were mandatory components for 2.x series.

AIA 11g R1 :

  • Latest AIA release for Fusion Middleware Stack.
  • Weblogic 10.3 is the core base stack for deployment.
  • Deployed on SOA 11g R1 (11.1.1.2.0) which intern can install only on Weblogic 10.3
  • Use of service registry is optional, where as this was mandatory for AIA 2.x release.
  • Powered by Fusion Middleware 11g

Q. When to use OSB for AIA?
Ans-  If the ABCS needs to manage the state in the integration layer or to implement an asynchronous request-response message exchange pattern, then you should leverage BPEL technologies.
When to go for OSB AIA implementation   - 

  Completely stateless - there is absolutely no need to persist any state in the integration layer

  Short-lived processes
 Synchronous responses from downstream services or applications in case of flows involving federated queries
 No inter-dependencies between messages

Link Referred  -  http://www.oracle.com/partners/en/knowledge-zone/implementing-aia-service-bus-11g-362707.pdf


Q. When to use Mediator?

Ans- As Oracle Service Bus does not have the same capabilities as that of Oracle Mediator with
respect to processing of messages in an ordered manner even if they arrive in an unordered
manner.
In situations where the ordered processing of messages does matter we should use Mediator.

Resequencing in Oracle Mediator -

Link  -  http://docs.oracle.com/cd/E23943_01/doc.1111/e17364/completeabcs.htm#BEIFICFJ

In the Oracle AIA asynchronous message exchange pattern, participating applications push messages to the

Oracle AIA layer where they are processed in a store-and-forward fashion.

In this message exchange pattern, there is a need to process messages pertaining to the same object instance in the same

sequence in which they are generated. The Resequencer in Oracle Mediator helps to maintain correct processing sequence.

The sequencing is done based on the sequencing strategy selected. The mediator provides us with three types of resequencers:


Standard Resequencer

FIFO Resequencer
BestEffort Resequencer

Q. Can  Mediator be used as ABCS ?

Ans- The ABCS can be implemented in two ways:
The first approach is to make complete use of components that are built using Oracle Fusion Middleware technologies to make up the ABCS.
The service is implemented as a Mediator service or a BPEL process. This Mediator service or BPEL process performs the tasks required
The second approach is to build the transformation services, to a large extent, as part of the participating application.
This approach can be taken when the participating application's technology stack has the infrastructure to perform the transformations. However, a lightweight ABCS still must perform the translations related to cross-reference details.
In many situations, a single action cannot be mapped to a single API or operation in the provider application. The provider application might have very fine-grained operations and might also require that transaction management be handled by calling applications. In this case, the provider-side ABCS probably has a chatty conversation with the server application. The provider-side ABCS is also responsible for state management.

This type of ABCS can be implemented using only BPEL technologies and not through Mediator services.

Q. What if we can not rollback the whole transaction?
Ans- Sometimes an automatic correction of data or a reversal of what has been done in requester service is needed. The typical scenario is one in which an error occurs in the transaction and the transactions cannot be rolled back.In these situations, the requester application can implement the compensation service operation and pass the name of the service operation to the provider ABCS. The provider ABCS invokes this compensation service operation if there are errors. There may be a requirement to implement a compensating service for the requesting service.
For more info refer BPEL basics mentioned flow.

Q. What is an error handling framework in AIA?




Some basics of BPEL:


Q. Difference between Pick and receive activity ?

Ans- Pick enables BPELs to implement event-based business logic that forces the process to wait until an event occurs. Pick enables BPELs to wait for message event(s) that are defined
on onMessage or time condition alarm event(s) that are defined on

onAlarm. Pick activity have one or more onMessage and onAlarm activities where as in receive it contain only one
Receive:°° Part of the BPEL default template°° Waits for a client to make a request or processes asynchronouscallback responses from external services

Q. Error handling framework in BPEL ?

Ans- Fault handlers in BPEL are similar to try/catch clauses in modern programming languages such as Java. A fault policy configured with the fault management framework overrides any fault handling defined in catch activities of scope activities in the BPEL process. The fault management framework can be configured to rethrow the fault handling back to the catch activities.

Q.  Partner link ?

Ans - Web services from external party in BPEL terminology called Partner Link. Partner link is external Web services that perform specific tasks and return value as XML.

Q. Transaction rollback ?

Ans -Basically in synchronous transactions, whole flow comes under one transaction, so even the failure occur at last stage will lead to rollback the whole transaction.

But for asynchronous all the callouts can be seprate transactions..

Thus for rollback to work properly we need to set global transaction settings and few settings to make sure all the transactions are covered in one
transaction, thus can be rollbacked completely.
Steps -
1) Configure all BPEL processes with bpel.config.transaction=required in composite.xml.
2) Modify the generated WSDL file for the AQ or JMS adapter and add an output message, making it synchronous.
or
 Instead of going with Synchronous adapter, we can use – oneWayDeliveryPolicy to sync.

3) Configure the AQ or JMS adapter with jca.retry.all=true in composite.xml.

4) Use an XA data source.

Their is one more scenario, where we can not completely rollback the whole transaction. In this case we need to use

Compensation service feature where can call this service to undo all the tasks which were done in the failed transaction.
Link Referred - http://erikwramner.wordpress.com/2011/11/07/global-transactions-with-jms-or-aq-and-bpel-in-11g/



# To update the Composite wsdls to MDS follow the below steps.


1. FTP the WSDLs to AIAMetaData/AIAComponents/ApplicationConnectorServiceLibrary

2. Update the UpdateMetaDataDP.xml in aia_instances/AIA_DEV/config with the path composite wsdls placed in AIAMetaData/AIAComponents/ApplicationConnectorServiceLibrary
3. Set the env variables. /aia_instances/AIA_DEV/bin/aiaenv.sh
4. Run the ant script UpdateMetaData.xml in /AIA11.1.1.2.0/Infrastructure/Install/scripts.

5. Check whether the Build Sucessful.Refresh the MDS in JDev and check the new wsdl in AIAMetaData/AIAComponents/ApplicationConnectorServiceLibrary


------------------------------------------------------------------------------------------------------------

#Useful Links:
------------------------------------------------------------------------------------------------------------

BPEL sample program -  http://www.oracle.com/technetwork/topics/bpel-hello-world-128219.pdf

creating FIle based MDS -  http://www.orafmwschool.com/soa-11g-mds/
Deploying your canonical data model to MDS- http://redstack.wordpress.com/2011/02/28/deploying-your-canonical-data-model-to-mds/

working example -  http://www.orafmwschool.com/human-workflow-example/

fault maangement - http://www.orafmwschool.com/fault-management-tutorial/
------------------------------------------------------------------------------------------------------------

Just a Thought - 


After going through BPEL, Mediator, OSB, Human Task Flow, Business rules, I get lot of confusion as when to use what, I know most of you will not agree and will think in your mind that each has ther own use.

I agree but somehow I believe these all serve one purpose that is to integrate.
 I believe all of this confusion can be avoided and all these products/technologies can be clubbed into one.

Like Mediator and OSB - both of them provide similar capabilities,yes there are few basic differences in terms of performance and all.

But I feel these two products exist and are not clubbed into one just because of one reason. OSB was acquired from BEA ALSB, and mediator was Oracle's ESB.

These are two differenct product with same purpose.


Similarly BPEL, is for orchestration and choreography it has dehydration feature, it can directly call humanwork flow. But what is the need for all these features having only in BPEL.


Can't we have just one tool let's say E(Enterprise)-BPEL which will have same terminology throughout and will have all the features of BPEL, OSB, Mediator and can be used as per the need.


I know ther can be arguments like it be very heavy and can have performance impact.. Yes it can but these issues can be resolved if taken seriusly by Oracle.


- All are my own silly views - Sunny