Thursday, October 17, 2013

DB Adapter Polling using Sequencing File - SOA 11G

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.

Step1: Open up your DB adapter wizard and select "Poll for new records or changed records" in the operatrion tab and in step 8 of After Read screen, select Update a Sequencing File.

Step2: Click next. In next window that pops up, select the sequencing file by passing the complete physical path.I have created a sequencing file on my server only under my servers logs directory.In sequence ID field, select the field from table which will act as sequence ID and on basis of which DB adapter will poll for new records.In my case I have selected Transacion ID.Complete the all steps and design your BPEL process.
Step3: Now If you look at my table structure, there are two columns Transaction Id and Notes.Our DB will poll on Transaction ID. Let me explain you, how this sequencign file concept works.
You have to create one sequencing file and in that file you will enter value of only that field which will always be incremented in ascending order in the table when new records are being inserted. Lets say in table we have 3 records with transaction ID as 1,2 and 3. In my sequencing file I will enter 1 and save it.Now Our DB poller will poll for all records with transaction ID greater than 1(current value in sequencing file) and value in the sequencing will automatically will be changed to 3. Next time new records inserted with trabsactiond ID greater than 3, all those records will be polled and so on.

Step4: I have created one sequencing file with transacion ID value as 4304.Please note only sequence ID(transaction  ID in our case) value should be there in file, nothing else.
Step5: In my table I have 3 records that have transaction ID greater than 4304. All those records will be polled. Verify the same on EM under instances Tab.
Step6: Also verify your sequencing file to reflect the updated value of transaction ID as 4393.
In this way DB poller based on sequencing file works.
Hope this post is helpful to you.

Happy Learning,
Cheers,
Karan



No comments:

Post a Comment