Wednesday, 19 February 2014

Oracle SOA 11G-Working With BPEL

We are going to see,how to implement Hello World in BPEL Process.It is a basic tutorial for all those willing to learn SOA.Without any more words, lets start with the tutorial.Let me just give you a brief overview of BPEL process.We will create one synchronus BPEL process that will accept string as an input and will return the same string in output concatenated with "Hello".So lets start desigining our BPEL process step by step.

Prerequisite for this tutorial
1. Oracle JDeveloper
2. Oracle SOA Suite
3. Weblogic Server


Oracle SOA 11G-File Adapter Tutorial

File adapter is basically used to read,write files locally on your server.
There are mainly 4 operations in FILE adpater namely:
  • READ: its an inboun operation that reads a file from given dir path
  • WRITE: outbound operation to write files to a location specified under directory path
  • SYNCHRONUS READ: outbound operation used to read a file in middle of the process
  • LIST FILE: outbound operation to list all the files in a given directory

SOA 11G-Composite Sensors

Composite sensors provide a method for implementing trackable fields on messages. Composite sensors enable you to perform the following tasks:
  •     Monitor incoming and outgoing messages.
  •     Specify composite sensor details in the search utility of the Instances page of a SOA composite application in Oracle Enterprise Manager Fusion Middleware Control. This action enables you to locate a particular instance.
  •     Publish JMS data computed from incoming and outgoing messages.
  •     Track composite instances initiated through business event subscriptions.

SOA 11G-Getting and Setting JMS Header Properties

Sometimes there is requirement where you are required to set some JMS header values and then send the jms message to the client or consumer may interact with you via jms queue and sends some user defined properties in the JMS header.In BPEL 11G, we can easily set or retreive these values.

Oracle SOA 11G-Database Adapter Tutorial

Oracle JCA adapter for DB enables a BPEL process to communicate with Oracle databases or third party databases through JDBC. The Oracle Database Adapter service is defined within a BPEL process partner link by using the Adapter Configuration Wizard of Oracle BPEL Process Manager (Oracle BPEL PM).

There are number of operations avilable that you can perform with DB adapter namely :

  • Call a Stored Procedure or Function :Select this option if you want the service to execute a stored procedure or function.

  • Perform an Operation on a Table: Select this option for outbound operations. You can select Insert or Update, Insert Only, Update Only, Delete, Select, or any combination of the six. 

  • Poll for New or Changed Records in a Table:  Select this option for an inbound operation (that is, an operation that is associated with a Receive activity). This operation type polls a specified table and returns for processing any new rows that are added. You can also specify the polling frequency.
  • Execute Pure SQL: Useful when dealing with arbitrarily complex statements, aggregate queries (result is not row-based), and XMLType columns.

Adding nodes and creating variables in XSL - Oracle SOA 11G

Today I am gonna write about,how to use summation function in XSL and how to create a cariable and use it in your xsl. Actually,there was a requirement in our project,which was like adding some values of some fields in the input and based upon the sum we required to pass some value to the target system.So, to accomplish this we used sum function, that is available in xslt.

I will be demonstrating it taking one example.Suppose we have some fields that are coming in the input such as A,B,C and we need to add all these values and see whether its sum is greater than zero or less than zero.If the sum is greater than 0, we will pass say "pass" and if its other way around we will pass say "fail" to the target system.I have create a sample BPEL process for this usecase.Process is very simple: it is exposed as webservice and taking input from the client and after doing aforesaid transformation and logic will publish the message in jms Queue.I will just explain the XSL part.


SOA 11G-Polling using Sequencing File in DB Adapter

I will be explaining today steps to create a polling DB adapter based on sequencing file.Most commonly used After Read "Logical Delete" strategy, I have explained already in one of my previous posts.So, I will just explain configuration required for sequencing file polling DB adapter. Remaining configuration, how to configure DB adapter , please refer to my post on DB adapter tutorial.

Service Oriented Architecture(SOA)

Service-oriented architecture (SOA) is a software design methodology based on structured collections of discrete software modules, known as services, that collectively provide the complete functionality of a large or complex software application.

SOA defines how to integrate widely disparate applications for a Web-based environment and uses multiple implementation platforms. Rather than defining an API, SOA defines the interface in terms of protocols and functionality. An endpoint is the entry point for such a SOA implementation. XMLis often used for interfacing with SOA services.

SOA 11G-Passing JNDI name to JCA Adapters

We can pass the JNDI name to any JCA adapter (JMS,DB,File) at runtime as well.All we need to do is configure one property inside the invoke activity that will pass jndi at runtime to the JCA adapter.Just go to the source of your invoke activity where you need to pass the jndi at runtime.

Oracle SOA 11G-Unit Test Cases for SOA Composites

           Today I will be describing how to create, deploy, and run test cases that automate the testing of SOA composite applications. You can also create test cases for testing BPEL process service components included in the SOA composite application. Test cases enable you to simulate the interaction between a SOA composite application and its web service partners before deployment in a production environment. This helps to ensure that a process interacts with web service partners as expected when it is ready for deployment to a production environment.

In this type of testing, wires, service binding components, service components (such as BPEL processes and Oracle Mediator service components), and reference binding components are tested.

Unable to Edit Database/File Adapter in JDev - SOA 11G

There is one issue that lots of people faces while importing an existing SOA project into JDeveloper.For instance, you have a composite that is polling records from DB and writing it into some file. After importing when you try to edit DB or File adapter by double clicking the wizard simply wont open up. Strange isnt it.
Even if you reimport the same project it will still not open.What could be the issue here.

Tuesday, 18 February 2014

Oracle SOA 11g-Handling Rejected Messages

Today, I would be explaining how do you handle rejection messages in BPEL. Rejection messages are basically the messages your composite receives but its not as per the format expected by your service , due to which BPEL instance do not get created. So your flow doesnot goes into your BPEL and there is no way to handle that exception in your code.

Below is the extract taken from Oracle:

The messages that error out before being posted to the service infrastructure are referred to asrejected messages. For example, the Oracle File Adapter selects a file having data in CSV format and tries to translate it to XML format (using NXSD). If there is any error in the translation, this message is rejected and are not be posted to the target composite.
Primarily, adapters and binding components are the generators of rejected messages.

To handle such scenarios where you need to take specific action if you get rejected messages, you can use fault management framework. Lets do it step by step.

Oracle SOA 11g- JMS Adapter

1.Introduction

Oracle JCA Adapter for JMS (Java Messaging Service), enables an Oracle BPEL process or an Oracle Mediator component to interact with JMS.To work with JMS adapter one can use either queues or topics.
In queue message are exchanged through point to point interaction and in topics message are exchanged through publish-subscribe model.In publish-subscribe model,messages are sent to the publisher and can be read by many subscriber clients.
Here i will implement one usecase where one BPEL process will get message from one jms queue and the same message will be published in another queue.It shows how to consume and publish message in JMS Queue.These queues are present in the weblogic application server.

Consume Message : Enables the adapter to consume (receive) inbound messages from a JMS destination.
Produce Message : Enables the adapter to produce (send) outbound messages for a JMS destination.
Request/Reply   : Oracle JMS Adapter supports both synchronous and asynchronous request reply interaction pattern.



Oracle SOA 11G- Event Delivery Network

Event Delivery Network (EDN) is one of the most important feature in Oracle SOA Suite 11g which is used to define the Event Definition Language. Event Definition Language contains Events which are defined using XML language.

Here, I will implement file adapter to get information about employee details using a file, the data from this file is transformed and routed to Database Adatper.Two Mediators are involved here,one is Event Publishers and another one event subscriber.The File Adapter reads the file and sent the data to the event publishers, the subscriber receives the data from the event publishers and sent to the Database Adapter.
Implementation of EDN is as follows: