<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2068794785432055688</id><updated>2024-10-25T03:16:01.649+05:30</updated><category term="SOA"/><category term="BPEL"/><category term="Oracle Fusion"/><category term="love"/><category term="nostalgia"/><category term="Movies"/><category term="Philosophy"/><category term="Technology"/><title type='text'>Passionate Vibes</title><subtitle type='html'>A journey through time and space, euphoria and despair, love and hate, reality and fantasy.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-7309145264317117296</id><published>2010-11-06T13:53:00.000+05:30</published><updated>2010-11-06T13:54:46.555+05:30</updated><title type='text'>Last Working Day</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; &quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;Dear Colleagues,&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;Today marks the &lt;a name=&quot;12b60eb9f8988c7c_OLE_LINK1&quot; style=&quot;color: rgb(92, 69, 32); &quot;&gt;&lt;/a&gt;&lt;a name=&quot;12b60eb9f8988c7c_OLE_LINK2&quot; style=&quot;color: rgb(92, 69, 32); &quot;&gt;&lt;/a&gt;culmination of my tenure at Wipro. And as oxymoronic as it may sound, I can’t help feeling this sweet sorrow as I brace myself up to leave port and embark on a new endeavor and &lt;a name=&quot;12b60eb9f8988c7c_OLE_LINK3&quot; style=&quot;color: rgb(92, 69, 32); &quot;&gt;&lt;/a&gt;&lt;a name=&quot;12b60eb9f8988c7c_OLE_LINK4&quot; style=&quot;color: rgb(92, 69, 32); &quot;&gt;&lt;/a&gt;bid adieu to this place that has been like a second home to me.&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;The past two years have been extraordinary. I still remember the poignant days from my first assignment here when we had to push the envelope each day to break new ground.  The project called for immense commitment and copious sacrifices and the team willingly obliged. That included not only burning midnight oil to meet the tight deadlines but also, and most reluctantly, cancelling a New Year trip to Goa. But all is well that ends well.  The inchoate hitches notwithstanding, our efforts eventually came to fruition and the project was a grand success and the compunction of not taking that trip to Goa was gleefully forgotten (I did eventually bunk office and took that trip afterwards&lt;span style=&quot;font-family: Wingdings; &quot;&gt;J&lt;/span&gt; ).  Had it not been for Chandra’s immaculate planning and Gaurav’s and Sudhir’s technical dexterity, it is beyond a shadow of doubt to assume that what we accomplished would never have been imaginable.&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;Life was a joy ride back then and I was cruising along briskly until I hit a brick wall. The devil-may-care attitude that I wore with mocking nonchalance came crashing down when I was diagnosed with cancer. In that one unfathomable moment I saw my entire life fall into pieces like broken glass. It was a life-changing event that veritably turned my perspective about everything on its head. I was shattered and devastated and distraught but I found great solace in the comforting words and gestures of my colleagues and friends who still believed that cancer could be beaten and that I deserved a second chance at life. They kept my faith up even when I was languishing in the vortex of despair. I wish to thank everyone here in Wipro for standing by me in those turbulent times.&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;I also wish to extend my heartfelt sense of gratitude to my superiors especially Chandra, Rajesh, Satyan, Nags, Sudhir, Gaurav, SriVidhya, Kotresh and Murali. Thank you for believing in my abilities and giving me a platform to showcase my skills. I did my best to stand up to your lofty expectations. I hope you enjoyed having me here as much as I enjoyed working with you. I sincerely believe that it was your commitment to quality, far-sighted vision and unwavering determination that propelled the project to the success that it eventually achieved. The people in the TED/HR department also deserve mention here, especially Jayshree. She single-handedly brought my affairs into order when I was ill. Despite the initial problems I was having with my insurance, she eventually sorted out everything. Thanks Jayshree. All the very best to all of you.&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;Special thanks are due to some of the most wonderful and fascinating friends I met here.  Deserving special mention amongst these are Anuradha, Sudipta, Ashok, Aparajeeta, Manish, Amiya, Amar, Manoj, Jayaram, Badrish, Anil, Lalit, Dev, Sowmya and Anju. You guys are terrific and you are my most prized possessions. If I were to thank each of you individually, I&#39;d have to write till eternity. So, let me cut the long story short and just say that I could always count on you no matter what. I wouldn&#39;t be the person I&#39;m today without you. If I were to sift out the single most precious take-away from here in Wipro, it would be you. Your presence lends meaning to my life. Thanks. I wish nothing but the very best for you. Saying good bye to you feels just like another session of chemo. I&#39;ll miss you.&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;Finally, I wish the company a successful undertaking and a long lasting success.&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt; &lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;“May the road rise up to meet you.&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;May the wind always be at your back.&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;May the sun shine warm upon your face,&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;and rains fall soft upon your fields.&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;And until we meet again,&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;May God hold you in the palm of His hand.”&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt; &lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;Good bye.&lt;/p&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/7309145264317117296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/7309145264317117296' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/7309145264317117296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/7309145264317117296'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2010/11/last-working-day.html' title='Last Working Day'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-2686923685217479748</id><published>2010-08-17T09:38:00.001+05:30</published><updated>2010-08-17T09:40:49.747+05:30</updated><title type='text'>Confessions of a motorist</title><content type='html'>&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;Driving in India For the benefit of every Tom, Dick and Harry visiting India and daring to drive on Indian roads, I am offering a few hints for survival. They are applicable to every place in India except Bihar, where life outside a vehicle is only marginally safer.&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;&lt;br /&gt;Indian road rules broadly operate within the domain of karma where you do your best, and leave the results to your insurance company. The hints are as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;Do we drive on the left or right of the road?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;The answer is &quot;both&quot;. Basically you start on the left of the road, unless it is occupied. In that case, go to the right, unless that is also occupied. Then proceed by occupying the next available gap, as in chess. Just trust your instincts, ascertain the direction, and proceed. Adherence to road rules leads to much misery and occasional fatality. Most drivers don&#39;t drive, but just aim their vehicles in the intended direction. Don&#39;t you get discouraged or underestimate yourself except for a belief in reincarnation, the other drivers are not in any better position.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;Don&#39;t stop at pedestrian crossings just because some fool wants to cross the road. You may do so only if you enjoy being bumped in the back. Pedestrians have been strictly instructed to cross only when traffic is moving slowly or has come to a dead stop because some minister is in town. Still some idiot may try to wade across, but then, let us not talk ill of the dead.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;Blowing your horn is not a sign of protest as in some countries. We horn to express joy, resentment, frustration, romance and bare lust (two brisk blasts), or, just mobilize a dozing cow in the middle of the bazaar.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;Keep informative books in the glove compartment. You may read them during traffic jams, while awaiting the chief minister&#39;s motorcade, or waiting for the rainwaters to recede when over ground traffic meets underground drainage.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;Occasionally you might see what looks like a UFO with blinking colored lights and weird sounds emanating from within. This is an illuminated bus, full of happy pilgrims singing bhajans. These pilgrims go at breakneck speed, seeking contact with the Almighty, often meeting with success.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;Auto Rickshaw (Baby Taxi): The result of a collision between a rickshaw and an automobile, this three-wheeled vehicle works on an external combustion engine that runs on a mixture of kerosene oil and creosote. This triangular vehicle carries iron rods, gas cylinders or passengers three times its weight and dimension, at an unspecified fare. After careful geometric calculations, children are folded and packed into these auto rickshaws until some children in the periphery are not in contact with the vehicle at all. Then their school bags are pushed into the microscopic gaps all round so those minor collisions with other vehicles on the road cause no permanent damage. Of course, the peripheral children are charged half the fare and also learn Newton&#39;s laws of motion en route to school. Auto-rickshaw drivers follow the road rules depicted in the film Ben Hur, and are licensed to irritate.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;Mopeds: The moped looks like an oil tin on wheels and makes noise like an electric shaver. It runs 30 miles on a teaspoon of petrol and travels at break-bottom speed. As the sides of the road are too rough for a ride, the moped drivers tend to drive in the middle of the road; they would rather drive under heavier vehicles instead of around them and are often &quot;mopped&quot; off the tarmac.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;Leaning Tower of Passes: Most bus passengers are given free passes and during rush hours, there is absolute mayhem. There are passengers hanging off other passengers, who in turn hang off the railings and the overloaded bus leans dangerously, defying laws of gravity but obeying laws of surface tension. As drivers get paid for overload (so many Rupees per kg of passenger), no questions are ever asked. Steer clear of these buses by a width of three passengers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;One-way Street: These boards are put up by traffic people to add jest in their otherwise drab lives. Don&#39;t stick to the literal meaning and proceed in one direction. In metaphysical terms, it means that you cannot proceed in two directions at once. So drive, as you like, in reverse throughout, if you are the fussy type. Least I sound hypercritical; I must add a positive point also. Rash and fast driving in residential areas has been prevented by providing a &quot;speed breaker&quot;; two for each house.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;This mound, incidentally, covers the water and drainage pipes for that residence and is left untarred for easy identification by the corporation authorities, should they want to recover the pipe for year-end accounting.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;Night driving on Indian roads can be an exhilarating experience (for those with the mental makeup of Chenghis Khan). In a way, it is like playing Russian roulette, because you do not know who amongst the drivers is loaded. What looks like premature dawn on the horizon turns out to be a truck attempting a speed record. On encountering it, just pull partly into the field adjoining the road until the phenomenon passes. Our roads do not have shoulders, but occasional boulders. Do not blink your lights expecting reciprocation. The only dim thing in the truck is the driver, and with the peg of illicit arrack (alcohol) he has had at the last stop, his total cerebral functions add up to little more than a naught. Truck drivers are the James Bonds of India, and are licensed to kill. Often you may encounter a single powerful beam of light about six feet above the ground. This is not a super motorbike, but a truck approaching you with a single light on, usually the left one. It could be the right one, but never get too close to investigate. You may prove your point posthumously. Of course, all this occurs at night, on the trunk roads. During the daytime, trucks are more visible, except that the drivers will never show any Signal. (And you must watch for the absent signals; they are the greater threat). Only, you will often observe that the cleaner who sits next to the driver, will project his hand and wave hysterically.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;This is definitely not to be construed as a signal for a left turn. The waving is just a statement of physical relief on a hot day.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black&quot;&gt;If, after all this, you still want to drive in India, have your lessons between 8 pm and 11 am-when the police have gone home and The citizen is then free to enjoy the &#39;FREEDOM OF SPEED&#39; enshrined in our constitution.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/2686923685217479748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/2686923685217479748' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/2686923685217479748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/2686923685217479748'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2010/08/confessions-of-motorist.html' title='Confessions of a motorist'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-294058669463055510</id><published>2008-10-13T12:27:00.002+05:30</published><updated>2010-04-24T22:54:09.290+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="nostalgia"/><title type='text'>Valediction</title><content type='html'>Dear Co-workers and Managers,&lt;br /&gt;&lt;br /&gt;I&#39;m fighting the jarring dissonance of myriad thoughts as I set myself up to write this final memo. As absurd as it may seem, I can&#39;t help feeling vehemently nostalgic at having to bid adieu to my first company, and also, concomitantly, I can&#39;t help feeling ecstatically rhapsodic in eager anticipation of a wonderful journey I am waiting to embark on.&lt;br /&gt;&lt;br /&gt;From being inducted into the organization two years back to the present day, I&#39;ve come a long way. It&#39;s been a momentous undertaking for me - one that has seen the crests of exhilaration and troughs of despair; fortunately, the crests have by far outnumbered the troughs. From the carefree indulging in the youthful exuberance during my training days in Mumbai, to learning to cope with the vicious pressure of meeting deadlines, life has indeed come a full circle. And before I depart from here, it only befits that I give credit where it is due.&lt;br /&gt;&lt;br /&gt;Foremost, special thanks are due to some of the most wonderful and fascinating people whose ingression into my life helped me see life in a new perspective. Deserving special mention amongst these are Abhishek, Amit, Amrita, Anil, Anitha, Bishnu, Chirag, Lalit, Mudita, Nancy, Neeraj, Piyush, Vanshika and Writu. If I had to thank each of you individually, I&#39;d have to write till eternity. So, let me cut the long story short saying that I could always count on you, which kind of makes me think that I must have done something genuinely angelic to deserve guys like you. I wouldn&#39;t be the person I&#39;m today without you. Your presence lends meaning to my life. Thanks. I&#39;ll miss you.&lt;br /&gt;&lt;br /&gt;My thanks are long due to Mr. Manojkumar Khandelwal. Of late you&#39;ve been looking despondent, which I would probably attribute to the anguish of watching your stocks plummet in the wake of the recent meltdown in the stock market (deliberate pun intended). I hope your stocks resurge with an even greater force than with what they went down. Apologize if I took liberties with you, but it&#39;s only you with who I could take liberties with. Despite me being several years junior, you always treated me like a friend. Your presence will be terribly missed. Have a wonderful life ahead.&lt;br /&gt;&lt;br /&gt;Also, I wish to extend my heart-felt sense of gratitude to my managers and co-workers for showing faith in my abilities and providing me a platform to showcase my skills. Special thanks to Mr. Raghunandhan Kadirvelu, my on-site project manager. The fact that the project was a plain sailing right through could be majorly attributed to your perspicacious competence. I&#39;ll regret not meeting you in person. It was an honor to work under you nonetheless. Thanks.&lt;br /&gt;&lt;br /&gt;And, last but not the least, thank you, Mr. Srinivasan Ranganathan for giving me the opportunity to make that presentation to Flowserve (if you can still remember). I&#39;ll never forget you walking up to my seat (after the presentation was over), shaking my hand, and then uttering, &quot;Great job, Chief. I&#39;m impressed&quot; - undeniably, a magnanimous gesture from you and a remarkably proud moment for me. I still savor that moment and always will. You never fail to dazzle me with your sophistication and pristine demeanor. Thanks.&lt;br /&gt;&lt;br /&gt;Finally, I wish the company a successful undertaking and a long lasting success.&lt;br /&gt;&lt;br /&gt;Once again, thank you very much. Good bye.&lt;br /&gt;&lt;br /&gt;Sincerely,&lt;br /&gt;Sankash Thakuria.</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/294058669463055510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/294058669463055510' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/294058669463055510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/294058669463055510'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/10/valediction.html' title='Valediction'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-8573164972060648821</id><published>2008-09-26T14:29:00.005+05:30</published><updated>2008-09-29T10:07:10.217+05:30</updated><title type='text'>Creating customized partnerlink bindings for deployment in different environments</title><content type='html'>&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;The problem&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Every BPEL process has a bpel.xml(deployment descriptor) file that provides information about the partners the BPEL interacts with. It does so by providing a partnerLinkBinding tag for every web service that the process invokes. Essentially, this tag gives the absoulute location of the WSDL file that is referred to by that partnerlink. A typical binding looks like this&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;partnerLinkBinding name=&quot;SayHi&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;property name=&quot;wsdlLocation&quot;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://nebulasky.blogspot.com:7777/orabpel/develop/SayHiService/1.0&amp;lt;/property%3E&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://nebulasky.blogspot.com:7777/orabpel/develop/SayHiService/1.0&amp;lt;/property&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/partnerLinkBinding&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Notice that the WSDL URL contains tokens like host, port, domain and revision of your web service. Since these values will differ in different environments(development, test, and production), your partnerLinkBindings too will change for different enviroments. A typical solution would be to have different bpel.xml files for different environments. This is the easy way but cumbersome and error-prone.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;The solution&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Fortunately, there is another way and which is much more simple. A customize ant task is provided that enables you to specify the property value for development and production environments in a single build file location. The customize task captures the changes between different versions of bpel.xml using the build file. This task can be used as a subtask of bpelc or as a standalone ant task. This is the subject matter of this post.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;Customize Ant Task&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Follow these steps to achieve the customization.&lt;br /&gt;&lt;br /&gt;1. Create a custom build.xml under the bpel directory of your project folder. Here you will specify WSDL URL contains tokens like host, port, domain and revision of your web service. Here is how the new build.xml will look like.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;project name=&quot;bpel.deploy&quot; default=&quot;compile&quot; basedir=&quot;.&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;target name=&quot;compile&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;bpelc input=&quot;${basedir}/bpel.xml&quot; out=&quot;${process.dir}/output&quot; rev=&quot;${rev}&quot; home=&quot;${bpel.home}&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;customize&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;partnerLinkBinding name=&quot;SayHiService&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;property name=&quot;wsdlLocation&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;a href=&quot;http://$%7Bhost_name%7D:$%7Bport_number/orabpel/$%7Bdomain_name/SayHiService/$%7Brev%7D/SayHiService?wsdl&amp;lt;/property&quot;&gt;&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://${host_name}:${port_number/orabpel/${domain_name/SayHiService/${rev}/SayHiService?wsdl&amp;lt;/property&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/partnerLinkBinding&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/customize&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/bpelc&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/target&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/project&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;2. Specify values for the host name, port, domain name, and process revision properties in the SOA_Oracle_Home\bpel\utilities\ant-orapbel-properties file. Here is an extract from the&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;file.host_name=nebulasky.blogspot.com&lt;br /&gt;port_number=7777&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;domain_name=develop&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;rev=1.0&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;# --------------------------------------------------&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;# END OF FILE&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Now, this is the only file you need to edit to take care of BPEL process migrations among various environents.&lt;br /&gt;&lt;br /&gt;3. Go to the main bpel.xml file located under the project folder and specify a new target to override the one that is already there in this file. Here the target name of compile is changed to compileTest.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;target name=&quot;process-deploy&quot; depends=&quot;validateTask, compileTest, deployProcess, deployTaskForm, deployDecisionServices&quot; /&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Now you need to create a new target by the same name(compileTest) in the same file. Within this you will provide the location to the custom build.xml file you created a few steps before. This way you shall override the target that already exists in the old build.xml file.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;target name=&quot;process-deploy&quot; depends=&quot;validateTask, compileTest, deployProcess, deployTaskForm, deployDecisionServices&quot; /&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;target name=&quot;validateTask&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;validateTask dir=&quot;${process.dir}/bpel&quot; /&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/target&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;target name=&quot;compileTest&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;ant dir=&quot;${process.dir}/bpel&quot;/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/target&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;target name=&quot;compile&quot;&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;4. Save the project. If you are using Jdeveloper in some other machine than the one where the application server is running, you need to transfer the project to the machine running the server. once this is done deploy the project using Ant. Fire up the developer prompt and navigate to the project directory and issue the following command&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;ant process-deploy&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;5. Go to the Oracle BPEL Console and ensure that the process was deployed successfully.</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/8573164972060648821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/8573164972060648821' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/8573164972060648821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/8573164972060648821'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/09/creating-customized-partnerlink.html' title='Creating customized partnerlink bindings for deployment in different environments'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-7887877033835503706</id><published>2008-09-05T18:19:00.002+05:30</published><updated>2008-09-05T19:29:51.461+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPEL"/><title type='text'>Calling concurrent programs from BPEL</title><content type='html'>When you are integrating some system with Oracle Apps, and especially if it involves an inbound data movement into Oracle, you will often find a situation where your BPEL process needs to call a concurrent program in Apps. Although, the the Oracle Apps Adapter supports this functionality, you&#39;d rather write your own procedure. The reason is when you call the Apps adapter, it merely calls the concurrent program and exits. Usually, you don&#39;t want that to happen, but rather wait till the concurrent program has finished execution. Assume that somewhere later in your BPEL process you want to access some of the base tables (populated by the concurrent program), but since the BPEL goes ahead with its execution you end up looking into those tables when the concurrent program is still running and data has not been populated properly yet. Ofcourse, you can add a wait activity, but then you will have to set the wait time manually because there isn&#39;t a way to know when the program will have finished. In this post I am going to show you how to handle such situations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For calling concurrent programs through PL/SQL Oracle provides a procedure submit_request. This procedure can be found under the fnd_request package. For calling a concurrent program you can directly call this procedure, however the &#39;wait&#39; problem would persist. So, we are going to create a wrapper around this procedure and call this wrapper instead. This procedure takes in excess of 100 parameters, but the good thing is you need not worry about all of them. Pass a few mandatory ones and you are through. Here are the parameters it takes as input&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;application: Short name of application under which the program is registered&lt;/li&gt;&lt;li&gt;program: concurrent program name for which the request has to be submitted&lt;/li&gt;&lt;li&gt;description(Optional): Will be displayed along with user concurrent program name&lt;/li&gt;&lt;li&gt;start_time(Optional): Time at which the request has to start running&lt;/li&gt;&lt;li&gt;sub_request(Optional): Set to TRUE if the request is submitted from another running request and has to be treated as a sub request default is FALSE&lt;/li&gt;&lt;li&gt;argument1..100(Optional): Arguments for the concurrent request&lt;/li&gt;&lt;/ul&gt;Here is the code&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;PROCEDURE submit_journal_import(&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt; p_source IN VARCHAR2,   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt; p_post_errors_to_suspense IN VARCHAR2 DEFAULT &#39;N&#39;,    &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt; p_start_date IN VARCHAR2,   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt; p_end_date IN VARCHAR2,   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt; p_create_summary_journals IN VARCHAR2 DEFAULT &#39;N&#39;,   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt; p_import_desc_flexfields IN VARCHAR2 DEFAULT &#39;N&#39;,   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt; p_run_id IN NUMBER,   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt; x_req_id OUT NUMBER&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;AS&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt; v_run_id INTEGER;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt; v_req_id INTEGER;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt; v_phase_code CHAR := &#39;R&#39;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;/*Set appropriate values for user_id, responsibility_id and application_id. These must exist in the apps.fnd_user and apps.fnd_responsbility_tl*/&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;apps.fnd_global.apps_initialize(0,   20420,   1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;x_req_id := apps.fnd_request.submit_request(&#39;SQLGL&#39;,   &#39;GLLEZL&#39;,   &#39;Journal Import - &#39; || _source,   NULL,   FALSE,   to_char(p_run_id),   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;&#39;2001&#39;,   p_post_errors_to_suspense, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;p_start_date,   p_end_date,   p_create_summary_journals,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;p_import_desc_flexfields&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;  DBMS_OUTPUT.PUT_LINE(&#39;after&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;  COMMIT;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;  DBMS_OUTPUT.PUT_LINE(&#39;The request id is&#39; || to_char(x_req_id));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;  /*&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;  Wait for the concurrent program to finish&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;  */&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;  WHILE(v_phase_code &lt;&gt; &#39;C&#39;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;  LOOP&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;    SELECT phase_code&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;    INTO v_phase_code&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;    FROM apps.fnd_concurrent_requests&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;    WHERE request_id = x_req_id;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;  END LOOP;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(204, 153, 51); font-style: italic;&quot;&gt;END submit_journal_import;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Observe that we have passed the appropriate values into the submit_request procedure. For more information on these refer the Oracle Applications documentation. But, before you can call this procedure you need to set up the Apps environment. This is done by calling the apps.fnd_global.apps_initialize procedure. This again takes three parameters&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;user_id&lt;/li&gt;&lt;li&gt;responsibility_id&lt;/li&gt;&lt;li&gt;responsibility_application_id&lt;/li&gt;&lt;/ul&gt;These values can be found in apps.fnd_user and apps.fnd_responsbility_tl tables.&lt;br /&gt;&lt;br /&gt;Also, notice that we have used a while loop that keeps looping over till the program has finished executing. Only when the program has completed, the procedure is exited.</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/7887877033835503706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/7887877033835503706' title='61 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/7887877033835503706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/7887877033835503706'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/09/calling-concurrent-programs-from-bpel.html' title='Calling concurrent programs from BPEL'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>61</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-5284922800296306462</id><published>2008-09-04T17:34:00.003+05:30</published><updated>2008-09-04T17:46:58.109+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Technology"/><title type='text'>Google Chrome: Redefining browsing experience</title><content type='html'>Google inched a step closer towards its tacit goal of reigning supreme in a new era of computing dominated by the web, when it hurled its brand new web browser (Chrome) at an expectant world this Tuesday. The new browser had been under wraps for quite sometime now until a weblog spilled the beans by releasing a comic book that brings to fore Google’s idea behind creating a new browser from scratch. Legions of elegant and hitherto unheard of features are on offer – at least the comic book claims so. Not everybody is amused though, and the first name to feature in that list is – you guessed it – Microsoft, who else?&lt;br /&gt;&lt;br /&gt;Google asserts that the internet has been through a never-seen-before evolutionary change and it only befits that the browsers follow suit. With Chrome it attempts to redefine user experience by leveraging the new capabilities of the web. Slowly and steadily, the web has become an overarching influence in people’s lives, embracing the flora and fauna of the computing ecosystem. At a time such as this, we need better alternatives for exploiting the gargantuan benefits the web offers, and Chrome is Google’s attempt to providing an answer.&lt;br /&gt;&lt;br /&gt;So what does Chrome have that others, notably Internet Explorer and Firefox don’t. It’s too early to come up with a viable answer to that question given that Chrome is still in its nascent stage. However, it does promise some very exciting features, some of which might lead Microsoft’s top bracket to loose some sleep.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;First Impressions&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;Chrome is available for download from &lt;a href=&quot;http://www.google.com/chrome&quot;&gt;www.google.com/chrome&lt;/a&gt;. Well, the installation is a breeze and before you know it, Chrome has imported all your bookmarks, passwords and browsing history from the browser you have been using. Presto! You are ready to experience the web in a way like never before. &lt;div&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmLduGXBNHr0-NV-O60Qh-tElh6FuP8un07msABKNHr1ZnL7K7HieFLB9_OMlVEkodH-zwdcCYsFaya4TZezaguZo_mcz3zy-Xo3FqLyOmh5HeCQV1WkI3_ZhVMcw_NIIMP4LGvi6DAN4/s1600-h/chrome+bookmark.jpg&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5242136950122434482&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmLduGXBNHr0-NV-O60Qh-tElh6FuP8un07msABKNHr1ZnL7K7HieFLB9_OMlVEkodH-zwdcCYsFaya4TZezaguZo_mcz3zy-Xo3FqLyOmh5HeCQV1WkI3_ZhVMcw_NIIMP4LGvi6DAN4/s400/chrome+bookmark.jpg&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;The first thing you notice (or rather not notice) is the minimalist design of the browser, with no status bar and hardly-there buttons. Google has deliberately kept things simple on the surface to enhance user experience, but you can rest assured of some marvelous tech wizardry that silently drives the Chrome. Like Firefox 3.0 or Internet Explorer 7.0(version 8.0 is available for download, but who cares), Chrome has tabs but there is a noticeable difference – the address bar (Omnibar if you prefer Google’s terminology) is below the tabs. And the Omnibar is not just an address bar – it doubles up as a search box as well and you have the normal autosuggest feature thrown in that makes browsing a walk in the park.&lt;br /&gt;&lt;br /&gt;Chrome presents you with a rather unusual home page – one that contains your recent bookmarks and most visited pages. Another great feature, I would think.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Rev it up&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;It feels much faster than its peers. For one thing Google uses V8 JavaScript Engine which, if rumors are to be believed, is nippier than others in the category. Also, Chrome uses multiprocessing to push the gas pedal – each new tab that you fire results in a new Chrome.exe being created in your machine unlike IE7 where you have only one process to take care of all the open tabs.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;What crash?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;Open a tab and you are starting from scratch. So while you are browsing, Chrome is creating and destroying processes all the time. Thus, even if a tab gets screwed up because of a memory leak and crashes, the others remain intact oblivious of the leak because each has its own block of memory. Cool stuff.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Open source&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;Google has developed it on top of Webkit which is an open source rendering engine and incidentally the same that powers Apple’s Safari. At the moment, add-ons aren’t supported, but that is only for now. Eventually, like in Firefox you should be able to wire up add-ons to Chrome.&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Developer’s playground&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Chrome has very elegant features that will have developer swooning over it. For one, there is a JavaScript console that facilitates debugging scripts like no other browser can. For another, you can see the HTML source of a page. Big deal, you say. The deal is Chrome shows you the line numbers too. I can see bloggers like me going hallelujah already. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7hbmLVHiYkHtZJLI19wwcQw2HjK6UZfZaLyKJSj7D3MUuWPDU7iGIS_q0U4-nHolHnWoc-n2KU3JqgwTgnw_tTAbboLElZPd1XK2B7mucyeLx8GrL6ie89MDmRGdGoVdHBX42_qOowLk/s1600-h/java+chrome.jpg&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5242136956463706018&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7hbmLVHiYkHtZJLI19wwcQw2HjK6UZfZaLyKJSj7D3MUuWPDU7iGIS_q0U4-nHolHnWoc-n2KU3JqgwTgnw_tTAbboLElZPd1XK2B7mucyeLx8GrL6ie89MDmRGdGoVdHBX42_qOowLk/s400/java+chrome.jpg&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;div&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Touch-me-not&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;Chrome offers you an ‘Incognito’ window that allows private browsing. Anything done from here is never logged on your computer and you have full access to your bookmarks and browsing history like you would have in any other window. &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Annoyances&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Not everything was smooth sailing though. I intended to write this blog on Chrome, but, unfortunately, it would not let me sign in to my blogger account. That apart, everything was a brezze.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Parting Thoughts&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Of course, Chrome is not perfect, but then, what is? In an age where technology seems to change faster than you can blink, it is too early to predict what the future holds for Chrome. But going by the recent stats, and with none other than Google pushing the envelope, Chrome surely seems to be heading in the right direction.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/5284922800296306462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/5284922800296306462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/5284922800296306462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/5284922800296306462'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/09/google-chrome-redefining-browsing.html' title='Google Chrome: Redefining browsing experience'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmLduGXBNHr0-NV-O60Qh-tElh6FuP8un07msABKNHr1ZnL7K7HieFLB9_OMlVEkodH-zwdcCYsFaya4TZezaguZo_mcz3zy-Xo3FqLyOmh5HeCQV1WkI3_ZhVMcw_NIIMP4LGvi6DAN4/s72-c/chrome+bookmark.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-4069116088111476762</id><published>2008-09-02T15:59:00.002+05:30</published><updated>2008-09-02T16:44:13.963+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Movies"/><title type='text'>Movie Review: Rock On</title><content type='html'>Rock on is an episode drawn out of the lives of four friends who share a common passion – music. But, in essence the movie isn’t as much about music as it is about seeing life in a new perspective, and about letting go of the inhibitions and following one’s heart.&lt;br /&gt;&lt;br /&gt;Aditya(Farhan Akhtar), Joe(Arjun Rampal), Rob(Luke Kenny) and KD(Purab Kohli) are four buddies who form a music band called Magik. Fame seems within spitting distance when the foursome wins a music contest and is signed by a TV channel to do an album. But destiny plays spoilt sport and an altercation ensues between Aditya and Joe on the sets of the channel, and they lose their golden chance to glory.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0WyyhNu8nuUqhgFWPTvZFVEhb8pLDFfGjC9vAIOotVCr1Ps8yu2h_yjSYK5emyLfjJbjobiiZKcOsdzXeuepWoByuTwJvFKjW53-ROYzB1UaB5tHRiazDuuqLVbWdAGEwRYsJwvD4MtA/s1600-h/luke-kenny_purab-kohli_arjun-rampal_farhan-akhtar___44556.jpg&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5241379692956477874&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0WyyhNu8nuUqhgFWPTvZFVEhb8pLDFfGjC9vAIOotVCr1Ps8yu2h_yjSYK5emyLfjJbjobiiZKcOsdzXeuepWoByuTwJvFKjW53-ROYzB1UaB5tHRiazDuuqLVbWdAGEwRYsJwvD4MtA/s400/luke-kenny_purab-kohli_arjun-rampal_farhan-akhtar___44556.jpg&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Ten years have passed since, and the entire four have left (or rather have tried to leave) the past well behind them and got on with life. Aditya has long given up his music, and is professionally successful as an investment banker but leads a lonesome and monotonous life despite having a caring wife, Sakshi (Prachi Desai). KD has moved into his father’s diamond business and hates it more than anything. Rob works with Anu Malik (who plays a cameo), and creates jingles for advertisements. Joe is hard pressed for money and it is left to his wife, Debbie (Shahana Goswami), to make ends meet.&lt;br /&gt;&lt;br /&gt;One day Sakshi finds an old box in the attic and upon opening it she finds some photographs of Aditya and his friends. Having realized that something is terribly amiss in her marital life with Aditya and that he has drawn himself into a cocoon, she decides to arrange for a reunion of the four, with the intent of lifting Aditya&#39;s spirits. Destiny connives, from then on a new journey ensues where the four must put behind their ego clashes and differences, and finish what they had left unfinished long ago.&lt;br /&gt;&lt;br /&gt;I wouldn’t say that the movie has a brand new story to tell. In fact, far from it, the story has a feeling of déjà vu attached to it and clichés abound, but it has been presented in such a beautiful manner that you simply fall in love with it. The best thing is it manages to remove the divide between celluloid and reality. It is almost like seeing yourself on the screen; the connection is instant and at an emotional level, and this is precisely where it manages to win hearts.&lt;br /&gt;&lt;br /&gt;Abhishek Kapoor, the director, has executed the script to near perfection and deserves kudos for it. The characters are well etched out and are easily identifiable with. Farhan Akthar – take a bow. He is impeccable and his acting is near perfect, sufficient to give even the seasoned actors jitters. Prachi, in her first movie, impresses, especially with her expressive demeanor, and so does Suhana Goswami as an estranged wife. Arjun Rampal comes of age and delivers his best performance till date.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVqQMGwhoFNhuvrXe2EG13Jpaa5ZXDKBd1qavQaBFKduBqwVcbhyphenhyphen7AylsOve-OXsNwt_FmIxU8YO4c5QoyydStVZmNjjczEwBdSzljH9Vvf8j17cIKjnMsgbfA7I0WfQv4N-gSpXrsjoM/s1600-h/farhan-akhtar___44558.jpg&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5241379693862547554&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVqQMGwhoFNhuvrXe2EG13Jpaa5ZXDKBd1qavQaBFKduBqwVcbhyphenhyphen7AylsOve-OXsNwt_FmIxU8YO4c5QoyydStVZmNjjczEwBdSzljH9Vvf8j17cIKjnMsgbfA7I0WfQv4N-gSpXrsjoM/s400/farhan-akhtar___44558.jpg&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Shankar, Ehsaan and Loy deserve a big round of applause for creating some breathtaking melodies. The lyrics are amateurish, but fit the bill completely for that is how the situation demands it. Kudos again to the producers for having the guts to use Farhan Akhtar’s vocals, and he doesn’t disappoint either.&lt;br /&gt;&lt;br /&gt;To sum it up, Rock On is a great movie that should go down well with everyone, especially the young. As already stated, the movie is about celebrating life and making the most of it and it does succeed to drive home that message. For that alone the entire team of Rock On, take a bow!</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/4069116088111476762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/4069116088111476762' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/4069116088111476762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/4069116088111476762'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/09/movie-review-rock-on.html' title='Movie Review: Rock On'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0WyyhNu8nuUqhgFWPTvZFVEhb8pLDFfGjC9vAIOotVCr1Ps8yu2h_yjSYK5emyLfjJbjobiiZKcOsdzXeuepWoByuTwJvFKjW53-ROYzB1UaB5tHRiazDuuqLVbWdAGEwRYsJwvD4MtA/s72-c/luke-kenny_purab-kohli_arjun-rampal_farhan-akhtar___44556.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-7695686221398290444</id><published>2008-09-01T12:12:00.007+05:30</published><updated>2008-09-02T10:15:34.389+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPEL"/><title type='text'>Calling executables/batch files/scripts from BPEL</title><content type='html'>&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;No direct way..&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;While working with a client, I was confronted with this problem - calling an executable from BPEL. The client was using PGP(Pretty Good Privacy) to encrypt/decrypt/sign files and my task was to write a BPEL prcoess that would perform these functions by calling the PGP program. Unfortunately, BPEL does not have an out of box functionality to address this. Thus I had to write a JAVA snippet that would do the task for me. The subject matter of this post is how to write the code. Though the code is specific to calling the PGP, it could be used for calling any executable with few changes. The essentials are the same.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Calling the code&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;There are three ways to incorporate the JAVA code into the BPEL.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Wrap the code in a web service&lt;/li&gt;&lt;li&gt;Use JAVA embedding and call the code directly&lt;/li&gt;&lt;li&gt;Use WSIF to call the codeYou can use any of these. &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;In my case the client wanted it as a web service, so that it could be resued as and when needed. &lt;/p&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;The JAVA code&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;My code has just one public class EncryptDecrypt and the following methods&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;public String pgpEncryptFile (String pgpEncryptCommand): This method takes the command for encrypting a file and returns &#39;Success&#39; if the encryption was successful or &#39;Error&#39; otherwise&lt;/li&gt;&lt;li&gt;public String pgpDecryptFile (String pgpDecryptCommand): This mehtod takes the command for decrypting a file and returns &#39;Success&#39; if the decryption was successful or &#39;Error&#39; otherwise&lt;/li&gt;&lt;li&gt;private void getCommandOutput(): This method fetches the output produced subsequent to the execution of the command&lt;/li&gt;&lt;li&gt;private void writeCommandOutputToLog(): This method is responsible for writing the command output to a log file. Everytime the command is run the log file is updated&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Declare and initialize the variables&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;//location of the executable&lt;br /&gt;private static final String pathToPGPExecutable = &quot;C:\\Program Files\\Network Associates\\PGPcmdln\\PGP.exe&quot;;&lt;br /&gt;private static final String pgpInstallationDirectory = &quot;C:\\Program Files\\Network Associates\\PGPcmdln&quot;;&lt;br /&gt;//name for the log file to be created&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;private static final String logFileName = &quot;CommandOutput.log&quot;; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;private String executionStatus = null; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;private String commandOutput = null; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;private String logContent = &quot;&quot;; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;private BufferedReader stdInput = null; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;private BufferedReader stdError = null; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;private Process processInstance = null;&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Method implementations&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Below are the implementations of the menthods with explanations&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;pgpEncryptFile&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running. We can obtain the current runtime by using the static getRuntime method of this class. Then we will call the exec method to create a new process and execute the command in the process thus created. This is done as&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;processInstance = Runtime.getRuntime().exec(pgpEncryptCommand);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;The pgpDecrypt is exactly same as this one. The only difference is in the command.Here is the implementation of this method&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;public String pgpEncryptFile(String pgpEncryptCommand ) { &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;try { &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;System.out.println(pgpEncryptCommand); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;//create a process and execute the command &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;processInstance = Runtime.getRuntime().exec(pgpEncryptCommand); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;//wait for the process to complete&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;processInstance.waitFor(); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;getCommandOutput(); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;System.out.print(&quot;LOG Content : &quot; + logContent); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;System.out.println(&quot;LOG finished&quot;); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;} &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;catch (IOException e) { &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;executionStatus = &quot;Error&quot;; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;e.printStackTrace(); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;} &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;catch (InterruptedException e) { &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;executionStatus = &quot;Error&quot;; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;e.printStackTrace(); } &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;executionStatus = &quot;Success&quot;; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;return executionStatus; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;getCommandOutput&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The next step is to get is to get our hands on the ouput of the command. For this, we will create two streams - one connected to the normal output of the process and the other connected to error stream of the process(to make provision for in the case of an error). Then we will route the contents of the stream into a local variable logContent. The implementation of this method is as follows.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;private void getCommandOutput() throws IOException { &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;String newline = System.getProperty(&quot;line.separator&quot;); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;stdInput = new BufferedReader(new InputStreamReader(processInstance.getInputStream))); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;while ((commandOutput = stdInput.readLine()) != null) { &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;logContent = logContent + commandOutput + newline; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;stdError =new BufferedReader(new InputStreamReader(processInstance.getErrorStream))); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;while ((commandOutput = stdError.readLine()) != null) { &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;logContent = logContent + commandOutput + newline; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;} &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;}&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;writeCommandOutputToLog&lt;/span&gt; &lt;/strong&gt;&lt;br /&gt;This method will write the output of the command to a log file. First, a new directory will be created under the directory where PGP is installed, and then a log file will be created under the new directory thus created. This file will contain the output of the command&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;private void writeCommandOutputToLog() throws IOException { &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;File createDir = new File(pgpInstallationDirectory, &quot;Log&quot;); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;createDir.mkdir(); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;String logPathLocation = pgpInstallationDirectory + &quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;file://log/&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;\\Log&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot;; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;PrintWriter fileWrite = new PrintWriter(new BufferedWriter(new FileWriter(new File (logPathLocation, logFileName)))); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;fileWrite.println(logContent); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;fileWrite.flush(); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;fileWrite.close(); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Finally&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Readers may please note that this is a more specific example, but the concept is the same. Calling any other executable would need appropriate changes in the code provided here.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;/span&gt;&lt;/em&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/7695686221398290444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/7695686221398290444' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/7695686221398290444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/7695686221398290444'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/09/calling-executablesbatch-filesscripts.html' title='Calling executables/batch files/scripts from BPEL'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-5523228105836308167</id><published>2008-08-27T11:54:00.004+05:30</published><updated>2008-08-27T15:48:49.124+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>SOA and WOA</title><content type='html'>The debate sorrounding SOA(Service Oriented Architechture) and WOA(Web Oriented Architecture) is getting fiercer by the day and the blogosphere is abuzz with pundits claiming that WOA is the *in* thing citing plethora of reasons like simplicity, cost-effectiveness, decreased time to market, better manageability and so on. So, where does that lead SOA to - on the way to extinction? I don&#39;t think so.&lt;br /&gt;&lt;br /&gt;To set the record straight, there seems to be a lot of misconceptions about both SOA and WOA - may think of them as a technology or an offshoot thereof. This is fundamentally wrong. They are, in fact, different architectural styles, or simply put two different way of doing things. And like similar styles in the same ecosystem, each has its own advantages and shorcomings. To simply put one ahead of the other, which is what is happening, is fundamentaly flawed.&lt;br /&gt;&lt;br /&gt;Recently, while perusing an article in &lt;a href=&quot;http://informationweek.com/&quot;&gt;InformationWeek&lt;/a&gt; I came across some interesting stats about SOA. Let me share them with you.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;&quot;IT pros have expressed skepticism about SOA&#39;s promised return on investment. A 2007 InformationWeek Web survey of 278 IT pros found that 32% of those using SOA said those projects fell short of expectations. Of those, 58% said their SOA projects introduced more complexity into their IT environments, and 30% said they cost more than expected. Out of all respondents using SOAs, just 10% said the results exceeded expectations.&quot;&lt;br /&gt;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;These are what the figures say, but what is indeed the fact? Well, the fact is that for a relatively new concept as SOA to stake claim to its usefulness in the market, it needs to spend a fair share of time in the market. If you look back 10-15 years from now, you will realize that its precursors like DCOM, CORBA had received the same lukewarm response. I do not put blame on organizations when they claim that the cost of implementing SOA far outweighs its usefullness, but such a statement can only be true for a small organization with relatively smaller number of offerings in their portfolio and when there aren&#39;t any pressing complexities. In such cases, it might make sense to go with an alternative to SOA, perhaps WOA.&lt;br /&gt;&lt;br /&gt;Interestingly, &lt;a href=&quot;http://gartner.com/&quot;&gt;Gartner Research&lt;/a&gt; defines WOA as &quot;a subset of SOA&quot;. If you&#39;re using WOA, you are in anyway using SOA but not vice-versa. This again brings to fore the fact the debate between the two is on flawed grounds. In fact, for enterprises it is more of a choice between the two - or still better a mix of both, depending on their tech landscape. When it comes to service-enable a company&#39;s offerings, SOA (or WOA for that matter) should not be the default choice. A comprehensive study of what needs to be achieved is of utmost importance and this must the done first. Only after considerable thought has gone into this a choice should me made. For start ups and small companies that do not need complex integrations among disparate systems, WOA should be the approach, inasmuch as it is less complex and inexpensive to implement. Investing big money to set up SOA when such a set up serves no real advantage is totally uncalled for. For large oraganizations where huge integration setups are needed, WOA will be unsuaitable. It makes more sense to invest upfront on SOA and then reap the fruits in the long run.&lt;br /&gt;&lt;br /&gt;So, it is not as much about SOA vs WOA as it is about the choice between the two. The approach should depend on what is desired and exactly what should be used to reach that goal. Ideally, a design should start with WOA and then add up SOA as and when the need so arises. In conclusion, the two are not diametric as they have been falsely portrayed to be, but are complementary.</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/5523228105836308167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/5523228105836308167' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/5523228105836308167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/5523228105836308167'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/08/soa-and-woa.html' title='SOA and WOA'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-7276417787605330833</id><published>2008-08-26T10:55:00.009+05:30</published><updated>2008-08-26T13:58:28.025+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPEL"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Fusion"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>REST Web Services demystified</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;The cacophony&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Recenlty, a lot of dissonance has sorrounded the debate betwee REST(Representational State Transfer) styled web services and SOAP. In fact, proponents of REST group have even gone to the extent of procaliming that it is quickly gaining ground and will one day become the de facto standard of creating web services, forcing SOAP into oblivion in the process. The internet is abuzz with claims that SOA (based on SOAP) is a thing of the past and WOA (Web Oriented Architecture based on REST) is the future. Not wanting to be left behind, the exponets of the SOAP, on the other hand, want to leave no stone unturned to prove the others wrong. Whatever the noises may sound like it makes sense to look into REST. So, here is the REST story&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;What are REST styled web services?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;As already stated, REST stands for Representational State Transfer. REST basically means that each unique URL is a representation of some object. You can get the contents of that object using an HTTP GET. Other operations such as POST, PUT can be used to modify the object. In essence, REST it is the repsentation of the current state of a resource on the web.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;The debate between REST and SOAP&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;While SOAP services are built on top of host of specifications laid down by OASIS, REST declares that the already existing WEB 2.0 standards are sufficient to build robust web services. Also, a major faction of REST supporters believe that using HTTP to piggyback payloads like SOAP does, is against the rationale of HTTP and an abuse to the protocol. It also brings in intricate complexities especially on the security front. One worth mentioning is piggybacking allows SOAP messages to get past firewalls and thereby places an additional constraint of detecting piggybacked payloads and scanning them prior to letting them in within the enterprise, which is not what firewalls are innately intended for. This is the main reason why both factions have always been at loggerheads with each other. More on this later.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Benefits of REST&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Irrescpective of what the critics say there are some advantages that REST offers over SOAP. We shall now look at a few of them.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;Simpler Interface&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The REST methodology uses the URI(the way you send requests from your browser to a web site) for its implementation. Thus any request/response is a simple HTTP request/response. This keeps things simple, for nearly all applications on the web support HTTP. Thus, any application that supports HTTP can fundamentally produce and consume REST services. Contrast this with SOAP services, which have to adhere to specifications that go beyond HTTP thereby making it more complicated. Request/response are sent/received in SOAP envelopes which are XML that sit on HTTP for trnasport. So, there is the extra work involved in creating the SOAP request and parsing the response.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;Light weight&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;From the above point it follows, that SOAP needs an additional XML wrapper above and over HTTP. This is unlike REST which is simple HTTP resquest/response. This can result in significant bandwith savings, especially for enterprises whose porfolio has umpteen applications interaction with each other at a massive level.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Since firewalls are intended to restrict traffic by looking at the HTTP command in the request, it becomes inherently easy to apply security policies for REST services. For instance, if a GET operation was used, it can be considered safe since it can&#39;t, by definition, modify or alter data. It is here that SOAP can take liberties with the HTTP protocol. SOAP generally use POST and unless one has a good long look at the SOAP envelope, security apprehensions can&#39;t be put to rest. Since looking into SOAP messages is not a feature provided by fire walls, one needs to do extra work to enforce security at this level&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;REST service support in Oracle&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;In Oracle AS 10.1.3, you can use the command line Web Services Assembler (WSA) in conjunction with ANT or use JDeveloper (10.1.3) wizards to create and test REST services. The rest of the post describes how to create REST services with JDeveloper.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Creating REST services with JDeveloper&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;For the purpose of demonstration I shall use a simple class that concatenates one string with another and then publish it as a REST web service. Here is my class:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;package com.nebulasky.blogspot;&lt;br /&gt;public class HelloWorld { &lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;public HelloWorld() { } &lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;public String sayHi(String s){ &lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;return &quot;Hello &quot;+ s; }&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;}&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Once this you have created the class, go back to the application navigator. Right click the context menu of the source java file and click &#39;Create J2EE web service&#39;. In the second step of the wizard select the checkbox for REST Support (as seen in figure below) in the Java Web Service Wizard.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRvQIvNth-T-U4HDTJ2mNA_Ysy00_fMOH7fEJMNtRXsLIdlAC0UXs-ZLM9s6Eyc200HRLa5-RxvLkbeMCnE38r6Ct6aG39W0UXGRCRaqI2xRU-N-YDwiIrjBB6kddIMUF9g2egrzSkASY/s1600-h/restjdev.jpg&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5238725230752821170&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRvQIvNth-T-U4HDTJ2mNA_Ysy00_fMOH7fEJMNtRXsLIdlAC0UXs-ZLM9s6Eyc200HRLa5-RxvLkbeMCnE38r6Ct6aG39W0UXGRCRaqI2xRU-N-YDwiIrjBB6kddIMUF9g2egrzSkASY/s400/restjdev.jpg&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can now click &#39;Finish&#39; to complete creating the serb service. Deploy the service.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Testing the REST Service&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;You can test the process from the Enterprise Manager console by clicking on the &#39;Invoke REST POST&#39; or &#39;Invoke REST GET&#39;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi92BV697MO1hNlgYF0n8XQxdKMRm5DUCoUHrq6OGdYGU7mnz3W1zAZpuyzzLG4-TNyZyXTf_Ca68Fj-Sq4oJ8xpKPVECfcZb8I7lDDFJCFUm-fgMyd2E8YiV543I2SOFFTobT9xH6HoOs/s1600-h/web1.jpg&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5238725232832608562&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi92BV697MO1hNlgYF0n8XQxdKMRm5DUCoUHrq6OGdYGU7mnz3W1zAZpuyzzLG4-TNyZyXTf_Ca68Fj-Sq4oJ8xpKPVECfcZb8I7lDDFJCFUm-fgMyd2E8YiV543I2SOFFTobT9xH6HoOs/s400/web1.jpg&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Or you can even create the HTTP request and pass parameters using a query string. In my case it is&lt;br /&gt;&lt;a href=&quot;http://172.28.0.54:7777/BlogDemo-RESTHelloService-context-root/SayHiServiceSoap12HttpPort/sayHi?s=sankash&quot;&gt;http://172.28.0.54:7777/BlogDemo-RESTHelloService-context-root/SayHiServiceSoap12HttpPort/sayHi?s=sankash&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You should see something as this&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVB5NMLcHRLDeN7C0psWSMlbLtm0ywMInwX4g_Uzpm7jCfA3T9iz5CgNg87nfSqjCfagz1WbeO0Pa7pB83zmCKKlzsL8Z99SPF88U_z3nvVn-HVweSOHFI0sJVt-pCRdfPsYKwHsMeRVo/s1600-h/website.jpg&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5238725227031053042&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVB5NMLcHRLDeN7C0psWSMlbLtm0ywMInwX4g_Uzpm7jCfA3T9iz5CgNg87nfSqjCfagz1WbeO0Pa7pB83zmCKKlzsL8Z99SPF88U_z3nvVn-HVweSOHFI0sJVt-pCRdfPsYKwHsMeRVo/s400/website.jpg&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/7276417787605330833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/7276417787605330833' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/7276417787605330833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/7276417787605330833'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/08/rest-web-services-demystified.html' title='REST Web Services demystified'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRvQIvNth-T-U4HDTJ2mNA_Ysy00_fMOH7fEJMNtRXsLIdlAC0UXs-ZLM9s6Eyc200HRLa5-RxvLkbeMCnE38r6Ct6aG39W0UXGRCRaqI2xRU-N-YDwiIrjBB6kddIMUF9g2egrzSkASY/s72-c/restjdev.jpg" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-5143021949484732607</id><published>2008-08-25T14:27:00.013+05:30</published><updated>2008-08-26T09:12:06.243+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPEL"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Fusion"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>Handling Exceptions: Creating and using fault policies</title><content type='html'>&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Back then...and now&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Prior to patch 10.1.3.3, we had to write fault handling code for each and every BPEL process we created. This was done at design time, and more often than not there was a great deal of overlap in the fault handling code for different processes. In essence, we merely ended up writing the same code over and over again. Reusability was thus non-existant as far as fault handling was concerned.&lt;br /&gt;&lt;br /&gt;&lt;div align=&quot;left&quot;&gt;With the 10.1.3.3 patch things have turned over a new leaf. Now, you have the option of creating fault policies(fault handling) that can be applied to an entire domain. Besides, you can bind these policies to a BPEL process at different levels - partnerlink,port type, process and domain. The framework will use the binding in order of the following priority :&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align=&quot;left&quot;&gt;bpel.xml &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align=&quot;left&quot;&gt;policy defined on the server &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align=&quot;left&quot;&gt;The reader must note that a fault policy defined on the server will always takes precedence over one that is defined in the BPEL process(catch/catchall blocks), if at all one exists.&lt;/div&gt;&lt;br /&gt;&lt;div align=&quot;left&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Designing a fault policy&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;A fault policy file defines fault conditions and their corresponding faultrecovery actions. Each fault condition specifies a particular fault or group of faults, which it attempts to handle, and the corresponding action for it. A set of actions is identified by an ID in the fault policy file. Please bear in mind that you can have only one fault-policy for a domain and it must be under SOA_ORACLE_HOME\bpel\domains\domain_name\config\fault-policies. You need to create the fault-policies directory under config as it does not exist by default.&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;br /&gt;The fault-policy file essentially consists of two sections - condition and action. The condition section is based on a faultName. Each condition has an optional test section and a mandatory action section. The test section tests the occurence of a particular fault and upon the test being true(when that fault has indeed occured ) an action is taken which again is defined in the same file. Several actions can be configured for a particular faultName. &lt;/div&gt;&lt;br /&gt;&lt;div align=&quot;left&quot;&gt;For the purpose of demonstration I have created a fault-policy file which is as follows:&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&amp;lt;faultPolicy version=&quot;2.0.1&quot; id=&quot;SankashPolicy&quot; xmlns:env=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns:xs=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://schemas.oracle.com/bpel/faultpolicy&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.oracle.com/bpel/faultpolicy&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns:xsi=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema-instance%22&amp;amp;gt&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://www.w3.org/2001/XMLSchema-instance&quot;&amp;amp;gt&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;Conditions&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;faultName xmlns:bpelx=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://schemas.oracle.com/bpel/extension&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.oracle.com/bpel/extension&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; name=&quot;bpelx:remoteFault&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;condition&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;action ref=&quot;ora-retry&quot;/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/condition&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;condition&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;action ref=&quot;ora-terminate&quot;/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/condition&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/faultName&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/Conditions&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;Actions&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;Action id=&quot;ora-retry&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;retry&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;retryCount&amp;gt;2&amp;lt;/retryCount&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;retryInterval&amp;gt;2&amp;lt;/retryInterval&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;exponentialBackoff/&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/retry&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/Action&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;Action id=&quot;ora-terminate&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;abort/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/Action&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/Actions&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/faultPolicy&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align=&quot;left&quot;&gt;If you scroll down to the conditions section you will notice that I am testing for remotefault. If a remoteFault does occur, my remedial action is to retry the connection twice at an interval of 2 seconds. If that does not yeild any result, the final action is terminate the process altogether.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Associating a fault policy&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;Now that we are done with creating the fault policy, we will see how to bind the policy with a process. As already mentioned the binding can occur at partnerlink, port type, process and domain level. To associate a policy at the process level you need to create the bindings in the bpel.xml file. However, if you want it at the domain level you need to specify the bindings in the fault-bindings.xml under SOA_ORACLE_HOME\bpel\domains\domain_name\config directory. Whichever association you want, the bindings are defined as follows:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;faultPolicyBindings version=&quot;2.0.1&quot; xmlns=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://schemas.oracle.com/bpel/faultpolicy&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.oracle.com/bpel/faultpolicy&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns:xsi=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema-instance%22&amp;amp;gt&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://www.w3.org/2001/XMLSchema-instance&quot;&amp;amp;gt&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;; &lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;process faultPolicy=&quot;SankashPolicy&quot;/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;partnerLink faultPolicy=&quot;SankashPolicy&quot;/&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/faultPolicyBindings&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align=&quot;left&quot;&gt;In order that the BPEL process manager picks up the policy you created just now, restart the server.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Use case&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;To ascertain that the policy is indeed active, create a synchronous BPEL process(wihtout any catch/catchall) that simply calls a java web service. Compile and deploy it. Verify that it executes successfully. Now log in to the enterprise manager console and undeploy the web service that the process was calling. Now, again initiate the process. Open the Activity Audit Trail for the instance. Observe that the process gets terminated. See screenshot below.&lt;/div&gt;&lt;br /&gt;&lt;div align=&quot;left&quot;&gt;&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjohk9IkeV2yYLx8tqhD8zzs0PaludcnfoGc7M96ZJyPhMdf-MpFU5xKYI57vbYQhxqcYQoJvjxt-OuCf2l_qdDGbe1YywYhE554enz9d8cOoSfEo3m4uLoMOVNPMS4thrCr4t6L2CHfo/s1600-h/audit+trail.jpg&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVJdVIddBZMOMCUA9vdjRVJxxnZIdDB6eXAZdA87rcJLFC8sag0pygm4jTnVBUSur7ET95F3QE2Q_LDm6EveoOcVoIlmLxxdcnkxoKjQtsrUOUgNn7LIR1wLy0P8xiwzWZtFmOPo4ZD6Y/s1600-h/audit+trail.jpg&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5238449924490943554&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVJdVIddBZMOMCUA9vdjRVJxxnZIdDB6eXAZdA87rcJLFC8sag0pygm4jTnVBUSur7ET95F3QE2Q_LDm6EveoOcVoIlmLxxdcnkxoKjQtsrUOUgNn7LIR1wLy0P8xiwzWZtFmOPo4ZD6Y/s400/audit+trail.jpg&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align=&quot;left&quot;&gt;Remember nowhere in the process we had written code to terminate it upon the occurence of a remote fault. Evidently, the policy must have caused it to do so.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/5143021949484732607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/5143021949484732607' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/5143021949484732607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/5143021949484732607'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/08/handling-exceptions-creating-and-using.html' title='Handling Exceptions: Creating and using fault policies'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVJdVIddBZMOMCUA9vdjRVJxxnZIdDB6eXAZdA87rcJLFC8sag0pygm4jTnVBUSur7ET95F3QE2Q_LDm6EveoOcVoIlmLxxdcnkxoKjQtsrUOUgNn7LIR1wLy0P8xiwzWZtFmOPo4ZD6Y/s72-c/audit+trail.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-1081241043056974078</id><published>2008-08-22T14:13:00.006+05:30</published><updated>2008-08-22T16:30:11.188+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPEL"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Fusion"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>Handling database package migrations in BPEL</title><content type='html'>&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;The catch&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Recently while working on an integration project for a client, I was told that the custom database packages my &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;BPEL&lt;/span&gt; process was referencing needed to be moved to a different database schema. Migration of the packages was &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;promptly&lt;/span&gt; done. All that remained was tweaking the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;BPEL&lt;/span&gt; process so that it &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;referenced&lt;/span&gt; the packages under the new schema. Since I had used server-side &lt;strong&gt;&lt;em&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;JNDI&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;, my first impression was resetting the data source to the new schema would do the trick. As it turned out, that was not the only thing I needed to do, but a few more.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;Recofigure&lt;/span&gt; the run-time connection&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;The first step is to reset the data source so that it points to the new schema. This is fairly easy. Since every data source is tied to a connection pool, it is in essence the connection pool that needs to be changed. To do that, first, log on to the enterprise manager and then modify the existing connection pool by resetting the &lt;em&gt;&lt;strong&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;jdbc&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;url&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;, &lt;strong&gt;&lt;em&gt;&lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_8&quot;&gt;user name&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt; and &lt;em&gt;&lt;strong&gt;password&lt;/strong&gt;&lt;/em&gt;. Save the changes. If you &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_9&quot;&gt;insist&lt;/span&gt; on creating a new connection pool altogether for better readability, by all means do so. But don&#39;t forget to tie it to the data source you are referring to from the &lt;em&gt;&lt;strong&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_10&quot;&gt;JNDI&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt; name.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Reset the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_11&quot;&gt;JCA&lt;/span&gt; operation&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Go to your &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_12&quot;&gt;BPEL&lt;/span&gt; project and open the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_13&quot;&gt;WSDL&lt;/span&gt; files for all the database adapters that were referring to the old schema. Scroll down to the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_14&quot;&gt;jca&lt;/span&gt;:operation tag. You will find something like this:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;jca:operation &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;SchemaName=&quot;APPS&quot; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;PackageName=&quot;XXALV_BPEL_UTILITY_LIB_PKG&quot; ProcedureName=&quot;SUBMIT_JOURNAL_IMPORT&quot; InteractionSpec=&quot;oracle.tip.adapter.db.DBStoredProcedureInteractionSpec&quot; &amp;gt; &amp;lt;/jca:operation&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Notice that the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_25&quot;&gt;SchemaName&lt;/span&gt; is set to the one you were referring to previously. Reset it to the new schema name. For instance, in my case the new schema is &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_26&quot;&gt;BOLINF&lt;/span&gt;. Thus, I will set it as:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;...&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_27&quot;&gt;SchemaName&lt;/span&gt;=&quot;BOLINF&quot; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;...&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Leave everything else the same.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Compile and redeploy&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;You are done. Save the changes and deploy the process. It should now pick up the packages under the new schema.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Gotchas&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Most of the time your procedures will call other procedures and functions that may not be under the same schema as your packages are. In such cases your schema will need &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_28&quot;&gt;privileges&lt;/span&gt; to perform operations on objects that are outside your schema. Be sure to ask the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_29&quot;&gt;DBA&lt;/span&gt; to grant you the necessary permissions. Also, it is recommended that you qualify all the database objects you create with the schema name so that all references are made explicit.</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/1081241043056974078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/1081241043056974078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/1081241043056974078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/1081241043056974078'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/08/handling-database-package-migrations-in.html' title='Handling database package migrations in BPEL'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-1782952862684471466</id><published>2008-08-21T17:50:00.010+05:30</published><updated>2008-08-21T19:21:08.257+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPEL"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Fusion"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>WSIF Revisited: Bottom up development using JDeveloper</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Oversight....&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;In the previous post, I had elucidated how to call Java using &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;WSIF&lt;/span&gt;. But, an oversight on my part caused the things to look a trifle more complicated than they actually were. Here is an attempt restore some sanity.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Create the Class&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;First, you need to create the Java class. Launch &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;JDeveloper&lt;/span&gt; and create a new Java class. For ease of writing, I shall use the same class as that in the previous post. The class&#39;s task is to concatenate one string with another.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjooQE6uBQtxXTPJWstHN7F5YosYUimFio9uGN_gFZPXOiMjyc8zN3P4rIoWMLRJS_HOnwnW5mX_t3FwzODcjbhj3HwUK151fnUQwaXxJVAR7TLnTyroNZV6pIIqeyG10Hepx2_W1zxuSQ/s1600-h/class.bmp&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5236961875165123842&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjooQE6uBQtxXTPJWstHN7F5YosYUimFio9uGN_gFZPXOiMjyc8zN3P4rIoWMLRJS_HOnwnW5mX_t3FwzODcjbhj3HwUK151fnUQwaXxJVAR7TLnTyroNZV6pIIqeyG10Hepx2_W1zxuSQ/s400/class.bmp&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is the Java snippet:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;package com.nebulasky.blogspot;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;public class &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;ConcatString&lt;/span&gt; { &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;public &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;ConcatString&lt;/span&gt;() { } &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;public String &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;getConcatenation&lt;/span&gt;(String input){ &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;return &quot;Hello &quot; + input; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;}&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;}&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Generate the contract&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;A peek into the earlier post and you will realize that we had then created the contract manually, when &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;in fact&lt;/span&gt; we could have done it with a &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;JDeveloper&lt;/span&gt; wizard (the oversight I was blabbering about). Right click the Java source from the context menu of the project and click &#39;Create J2&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;EE&lt;/span&gt; Web Service&#39;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXfKS4BS1GcW-aGxee-C2yNLloZXNbejGMtgQaGgPPvb0L2mXcR9xLV9lXCIbh-mvucB0H_yoC19Uyv4fQMFuKQUeoPOEzPPe5lu93oJMny6xUTD1zcpiQObCpiXDjr2WmKWspiC_kcWQ/s1600-h/service.bmp&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5236961880421695378&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXfKS4BS1GcW-aGxee-C2yNLloZXNbejGMtgQaGgPPvb0L2mXcR9xLV9lXCIbh-mvucB0H_yoC19Uyv4fQMFuKQUeoPOEzPPe5lu93oJMny6xUTD1zcpiQObCpiXDjr2WmKWspiC_kcWQ/s400/service.bmp&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the first step of the wizard check the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_8&quot;&gt;WSIF&lt;/span&gt; Binding &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_9&quot;&gt;uncheck&lt;/span&gt; the SOAP 1.1 Binding (this is checked by default).&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjTcsem_HUiKVCzBT8tMEh8D-VIu02DfY0XIyCpuDzeQIqIMUneur88NOYwHA1bPWAN1pi3kh9xvcrIjhQPivBa1rNelNFN_ihyexLrEvzOlAq5JcIgMa7EKhJZTcWe_UiVGfLobTBfuI/s1600-h/step1.bmp&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5236961881400661058&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjTcsem_HUiKVCzBT8tMEh8D-VIu02DfY0XIyCpuDzeQIqIMUneur88NOYwHA1bPWAN1pi3kh9xvcrIjhQPivBa1rNelNFN_ihyexLrEvzOlAq5JcIgMa7EKhJZTcWe_UiVGfLobTBfuI/s400/step1.bmp&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once these are done, finish the wizard. Open the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_10&quot;&gt;WSDL&lt;/span&gt; thus generated and have a look. Scroll down to the service tag and you &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_11&quot;&gt;should&lt;/span&gt; see something like this:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;service name=&quot;WSIFConcatService&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;port name=&quot;WSIFConcatServiceWSIFPort&quot; binding=&quot;tns:WSIFConcatServiceWSIF&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;java:address className=&quot;com.nebulasky.blogspot.ConcatString&quot;/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/port&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/service&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;Note &lt;em&gt;java:address&lt;/em&gt; tag. It specifies a class name instead of a SOAP address which is how it would have been if you had chosen SOAP binding. Additionally, will also find some new tags like &lt;em&gt;format:&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_22&quot;&gt;typeMap&lt;/span&gt;&lt;/em&gt;, &lt;em&gt;format:&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_23&quot;&gt;typeMapping&lt;/span&gt;&lt;/em&gt;, &lt;em&gt;java:binding&lt;/em&gt; and &lt;em&gt;java:operation&lt;/em&gt;. For more information on these, visit my previous post.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;Deploying the classes&lt;/span&gt;&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;Next, you load the com.nebulasky.blogspot.ConcatString class onto the application server. For this simply copy the class and put it &amp;amp;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_24&quot;&gt;lt&lt;/span&gt;;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_25&quot;&gt;BPEL&lt;/span&gt;_HOME&amp;gt;/system/classes directory. Restart the server.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Create the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_26&quot;&gt;BPEL&lt;/span&gt; process&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Create a &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_27&quot;&gt;synchronous&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_28&quot;&gt;BPEL&lt;/span&gt; process and create a new &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_29&quot;&gt;partnerlink&lt;/span&gt;. Import the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_30&quot;&gt;WSDL&lt;/span&gt; from the local file system into the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_31&quot;&gt;BPEL&lt;/span&gt; project directory. Assign the appropriate fields like operation, &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_32&quot;&gt;partnerR&lt;/span&gt;, &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_33&quot;&gt;myRole&lt;/span&gt; etc. Now drag an invoke activity and bind it with the service. Here is how the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_34&quot;&gt;BPEL&lt;/span&gt; process will look like:&lt;br /&gt;&lt;br /&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5236961875635564274&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrltL28zxHvUYaNJyDsv6r-bTwdgJBR1FqUayDVLnpfPhHCSnWtAH470N3xCw1Ic34m2iLRu5jFOX9cBRsbYN8qbzF-HUc8M-IEeBV_LsIKSKrDauRd7y2LRPxUEHAIJIJwuQrA4-QYoo/s400/BPEL.bmp&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Deploy and test&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Deploy the process and test it. Provided everything is in place, it should return the expected response.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;?xml:namespace prefix = java /&gt;&lt;java:address class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_19&quot;&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/java:address&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/1782952862684471466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/1782952862684471466' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/1782952862684471466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/1782952862684471466'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/08/wsif-revisited-bottom-up-development.html' title='WSIF Revisited: Bottom up development using JDeveloper'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjooQE6uBQtxXTPJWstHN7F5YosYUimFio9uGN_gFZPXOiMjyc8zN3P4rIoWMLRJS_HOnwnW5mX_t3FwzODcjbhj3HwUK151fnUQwaXxJVAR7TLnTyroNZV6pIIqeyG10Hepx2_W1zxuSQ/s72-c/class.bmp" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-1003729800148016685</id><published>2008-08-20T13:04:00.009+05:30</published><updated>2008-08-21T19:35:10.739+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPEL"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Fusion"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>WSIF: Calling native Java code from BPEL</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;What&#39;s the deal?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The alternatives to calling Java from BPEL aren&#39;t legion. Infact, there are only three.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Using Java embedding to call the code directly&lt;/li&gt;&lt;li&gt;Wrapping the code in a SOAP service&lt;/li&gt;&lt;li&gt;Calling the code using Web Service Invocation Framework&lt;/li&gt;&lt;/ol&gt;Thus, it becomes all the more important to make a judicious choice amogst the three. The subject matter of this post is to acquaint the reader with calling native Java code using WSIF. But before moving on, it makes perfect sense to look at the pros and cons of all the three.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;The pros and cons&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;Java Embedding:&lt;/span&gt;&lt;/strong&gt; This is an out of box feature provided by BPEL to aid the developer to write and use Java snippets inside the BPEL environment. The greatest advantage is it lets the developer have full access to the entire BPEL environment. Consequently, direct manipulation of data inside the process is fairly easy. Add to it the ease of use, since you don&#39;t need to create auxiliary artifacts that you need with the other approaches, you are spared a lot of effort. On the flip side, it makes the BPEL code a little unreadable as you have mixed up Java with the BPEL tags. Use this to do seemingly simple tasks with short Java snippets.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;SOAP Service:&lt;/span&gt;&lt;/strong&gt; If you already have the Java code, wrapping it up as a SOAP service with JDeveloper is a peice of cake. Advantage is it lends a lot of reusability to the code and keeps your BPEL process clean. The disadvantage is that the reusability comes at a cost. You have to bear with the SOAP overhead, which can be tremendous especially if you are running a BPEL process that is swamped with SOAP calls. Use this when the service needs to be accessible from multiple machines and different BPEL processes or other applications.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;WSIF:&lt;/span&gt;&lt;/strong&gt; Without compromising much on readabiliy and resusability, WSIF provides a cleaner approach to use native code. By keeping the code separate from BPEL it makes sure that readability isn&#39;t sacrificed. Also, it calls the code directly, thereby eliminating the SOAP overhead altogether. Finally the code can easily be re-used by other BPEL processes by deploying the jar file containing the java classes and the WSDL document as part of a BPEL suitcase.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Prerequisites&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Now that we have looked into the inherent positives and negatives of the three approaches, lets get ahead with the subject matter of this post - using WSIF to call java code. For the sake of demonstration, I shall use a Java class that takes a string as a parameter and concatenates it with another string. Here is code:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;package com.nebulasky.blogspot;&lt;br /&gt;public class ConcatString { &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;public ConcatString() { } &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;public String getConcatenation(String input)&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;{ &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;return &quot;Hello &quot; + input; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;}&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;}&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Now, use JDeveloper and publish this as a J2EE service. Deploy and test it. Create a BPEL process and invoke this service. Fairly simple. Once these are done, we are all set to bring WSIF into the picture.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;The WSIF file&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;To reiterate our purpose, we are going to tweak the BPEL to use WSIF to call the Java class instead of using SOAP. It makes sense to look at the WSDL file for the J2EE service. Of special interest is the binding section of the WSDL, since this tells our BPEL process how to call the service. I have omitted the rest of the file for simplicity, as they simply specify the data format for the messages. Here is an excerpt from the WSDL:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;binding name=&quot;ConcatenationSoapHttp&quot; type=&quot;tns:Concatenation&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;soap:binding style=&quot;document&quot; transport=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://schemas.xmlsoap.org/soap/http%22/%3E&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.xmlsoap.org/soap/http&quot;/&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;operation name=&quot;getConcatenation&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;soap:operation soapAction=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://blogspot.nebulasky.com/getConcatenation%22/%3E&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://blogspot.nebulasky.com/getConcatenation&quot;/&gt;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;input&amp;gt; &amp;lt;soap:body use=&quot;literal&quot;/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/input&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;output&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;soap:body use=&quot;literal&quot;/&amp;gt; &amp;lt;/output&amp;gt; &amp;lt;/operation&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/binding&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Notice that SOAP binding is being used (soap:binding, soap:operation , soap:body tags). All we need to do to persuade the BPEL to use WSIF is to change the binding information without changing the structure of the contract. As long as the contract is the same and references the same operations that the Java class exposes, and the messages in the contract are in conformance with the data types and parameters of the class, changing the binding will only change the way the BPEL communicates with the class, nothing else.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;&lt;strong&gt;Definitions tag&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;Open the WSDL for the J2EE service in JDeveloper. Click on the source tab because you are going to edit it. Start by defining the two namespaces used by WSIF providers in the root element of the WSDL document, the &lt;definitions&gt;tag. The format namespace is used to define the type mappings and the java namespace to define the operation mappings and the full name of the Java class:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;definitions name=&quot;Concatenation&quot; targetNamespace=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://blogspot.nebulasky.com/&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://blogspot.nebulasky.com/&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://schemas.xmlsoap.org/wsdl/&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.xmlsoap.org/wsdl/&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns:tns=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://blogspot.nebulasky.com/&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://blogspot.nebulasky.com/&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns:soap12=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://schemas.xmlsoap.org/wsdl/soap12/&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.xmlsoap.org/wsdl/soap12/&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns:mime=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://schemas.xmlsoap.org/wsdl/mime/&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.xmlsoap.org/wsdl/mime/&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns:tns0=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://blogspot.nebulasky.com/types/&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://blogspot.nebulasky.com/types/&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns:xsd=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns:format=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://schemas.xmlsoap.org/wsdl/formatbinding/&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.xmlsoap.org/wsdl/formatbinding/&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns:java=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://schemas.xmlsoap.org/wsdl/java/&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.xmlsoap.org/wsdl/java/&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns:soap=&quot;&lt;/span&gt;&lt;/em&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.xmlsoap.org/wsdl/soap/&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;&lt;strong&gt;Map Java types to XML Schema definitions&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;To generate Java to XML mapping we need to create XML facades. These façades are Oracle BPEL Process Manager&#39;s original Java-to-XML binding for WSIF. XML façades are a set of Java interfaces and classes through which you can access and modify XML data stored in BPEL variables in a relatively easy way using get/set methods. Here we need the mappings for the WSDL file for the J2EE service. For this, you need to use the schema compiler utility called schemac as:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;C:\com\nebulasky\blogspot\&gt;schemac Concatenation.wsdl&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;First, you indicate to the BPEL process that it is bound to native Java code and not to a SOAP service. This is how you do it:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;binding name=&quot;JavaBinding&quot; type=&quot;tns:WSIFTestProcess&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;java:binding/&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Next, you specify that XSD types will be mapped onto Java types. For this use the format:typeMapping tag. Then you define what Java types shall be used for what xsd types by using the format:typeMap tag. Here is the snippet that does these two tasks for you:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;format:typeMapping encoding=&quot;Java&quot; style=&quot;Java&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;format:typeMap typeName=&quot;xsd:string&quot; formatType=&quot;String&quot;/&amp;gt; &amp;lt;/format:typeMapping&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;Mapping Java methods to WSDL operations&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The final step is now to map the Java method calls onto the WSDL operations. This is done using the java:operation tag to identify which Java method should be used to support a given operation:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;operation name=&quot;getConcatenation&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;java:operation methodName=&quot;getConcatenation&quot;/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;input/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;output/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/operation&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/binding&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;Define the Service&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;We are through with most of it now. All that remains is defining the service. Here you will provide a Java address unlike a SOAP address which is how it was untill recently:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;service name=&quot;Concatenation&quot;&amp;gt; &amp;lt;port name=&quot;JavaPort&quot; binding=&quot;tns:JavaBinding&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;java:address className=&quot;com.nebulasky.blogspot.ConcatString&quot;/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/port&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Deploy the class&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;For it to work at runtime then the Process Manager must be able to find the Java classes referenced in the WSIF. When using WSIF the classpath for the invoked WSIF service is different to the classpath for the BPEL process. It is necessary to move the classes to the &amp;lt;BPEL_HOME&amp;gt;/system/classes directory. Here the classes are the the ones generated by the schemac command and the class responsible for the concatenation.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Test the process&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;If it is not already thus, ensure that the BPEL process takes the Concatenation.wsdl file from the current directory and not from the Web service itself. The bpel.xml file should look like this:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;partnerLinkBinding name=&quot;Concatenation&quot;&amp;gt; &amp;lt;property name=&quot;wsdlLocation&quot;&amp;gt;Concatenation.wsdl&amp;lt;/property&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/partnerLinkBinding&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Test the process. It should give you the expected result.</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/1003729800148016685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/1003729800148016685' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/1003729800148016685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/1003729800148016685'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/08/wsif-calling-native-java-code-from-bpel.html' title='WSIF: Calling native Java code from BPEL'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-2718463612499205971</id><published>2008-08-19T11:10:00.008+05:30</published><updated>2008-08-19T13:00:48.953+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPEL"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Fusion"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>Security: Enabling SSL in OC4J</title><content type='html'>&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Securing the channel&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Of the &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;myriad&lt;/span&gt; ways to lend security to your enterprise, one that you certainly cannot afford to miss is securing the channel over which your partners communicate with you. An important step in this direction is configuring HTTPS on the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;OC&lt;/span&gt;4J. This is the subject matter of this post. Readers would do well to realize that this is not the final security enforcement point, but merely one among the plethora of policies that one must have in place.&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;Create a &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;keystore&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Your first step is to create a &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;keystore&lt;/span&gt; (nothing but a repository of security certificates). Open command prompt and navigate to &lt;em&gt;&amp;lt;JDEV_HOME&amp;gt;\jdk\bin &lt;/em&gt;directory. Now, use &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;SUN&#39;s&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;keytool&lt;/span&gt; to generate the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;keystore&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_8&quot;&gt;keytool&lt;/span&gt; -&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_9&quot;&gt;genkey&lt;/span&gt; -&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_10&quot;&gt;dname&lt;/span&gt; &quot;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_11&quot;&gt;CN&lt;/span&gt;=&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_12&quot;&gt;Sankash&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_13&quot;&gt;Thakuria&lt;/span&gt;, &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_14&quot;&gt;OU&lt;/span&gt;=Oracle, O=Fujitsu Consulting, L=Bangalore, S=&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_15&quot;&gt;Karnataka&lt;/span&gt;, C=IN&quot; -&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_16&quot;&gt;keyalg&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_17&quot;&gt;RSA&lt;/span&gt; -&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_18&quot;&gt;sigalg&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_19&quot;&gt;Sha&lt;/span&gt;1&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_20&quot;&gt;WithRSA&lt;/span&gt; -&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_21&quot;&gt;keypass&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_22&quot;&gt;sankash&lt;/span&gt; -&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_23&quot;&gt;storepass&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_24&quot;&gt;sankash&lt;/span&gt; -&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_25&quot;&gt;keystore&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_26&quot;&gt;sankashkeystore&lt;/span&gt;.&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_27&quot;&gt;jks&lt;/span&gt; -alias &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_28&quot;&gt;nebulasky&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Copy &lt;em&gt;sankashkeystore.jks&lt;/em&gt; to &lt;em&gt;&amp;lt;ORACLE_HOME&amp;gt;/j2ee/home/config&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;Configure &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_33&quot;&gt;SSL&lt;/span&gt; in &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_34&quot;&gt;OC&lt;/span&gt;4J&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;The default behavior of the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_35&quot;&gt;OC&lt;/span&gt;4J is to expose all resources (services) over HTTP, which is in turn is because of certain settings that are already in place in&lt;em&gt; &amp;lt;ORACLE_HOME&amp;gt;/j2ee/home/config/default-web-site.xml file&lt;/em&gt;. We shall override this file to achieve &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_39&quot;&gt;SSL&lt;/span&gt; over HTTP. Create a copy of this file under the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_40&quot;&gt;config&lt;/span&gt; directory and rename it as &lt;em&gt;secure-web-site.xml&lt;/em&gt;. Open &lt;em&gt;secure-web-site.&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_42&quot;&gt;xml&lt;/span&gt;&lt;/em&gt; in your favourite text editor and do the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Inside the &lt;em&gt;&amp;lt;web-site&amp;gt;&lt;/em&gt; tag, change the port to 4443 and add the element &lt;em&gt;secure=&quot;true&quot;.&lt;/em&gt;&lt;/li&gt;&lt;li&gt;Add &lt;em&gt;&amp;lt;ssl-config&amp;gt;&lt;/em&gt; element and and point this to the newly created &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_43&quot;&gt;keystore&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Here is how the file will look like once these are done:&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;web-site class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_45&quot;&gt;&amp;lt;web-site xmlns&lt;/span&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;:&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_46&quot;&gt;xsi&lt;/span&gt;=&quot;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_47&quot;&gt;xsi&lt;/span&gt;:&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_48&quot;&gt;noNamespaceSchemaLocation&lt;/span&gt;=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://xmlns.oracle.com/oracleas/schema/web-site-10_0.xsd&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://xmlns.oracle.com/oracleas/schema/web-site-10_0.xsd&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; port=&quot;4443&quot; secure=&quot;true&quot; protocol=&quot;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_49&quot;&gt;ajp&lt;/span&gt;13&quot; display-name=&quot;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_50&quot;&gt;OC&lt;/span&gt;4J 10g (10.1.3) Default Web Site&quot; schema-major-version=&quot;10&quot; schema-minor-version=&quot;0&quot; &amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_52&quot;&gt;ssl&lt;/span&gt;-&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_53&quot;&gt;config&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_54&quot;&gt;keystore&lt;/span&gt;=&quot;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_55&quot;&gt;sankashkeystore&lt;/span&gt;.&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_56&quot;&gt;jks&lt;/span&gt;&quot; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_57&quot;&gt;keystore&lt;/span&gt;-password=&quot;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_58&quot;&gt;sankash&lt;/span&gt;&quot; /&amp;gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;web-site&gt;&amp;lt;web-site&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/span&gt;&lt;p&gt;Now, you need to make the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_60&quot;&gt;OC&lt;/span&gt;4J aware of these changes. To do that, go ahead and open the &lt;em&gt;server.xml&lt;/em&gt; file. Add the following to the file:&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;web-site default=&quot;true&quot; path=&quot;./default-web-site.xml&quot; /&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;web-site path=&quot;./secure-web-site.xml&quot; /&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;web-site path=&quot;./default-web-site.xml&quot; default=&quot;true&quot;&gt;&lt;web-site path=&quot;./secure-web-site.xml&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;p&gt;&lt;/span&gt;&lt;/p&gt;In essence the &lt;em&gt;secure-website.xml&lt;/em&gt; is the same as &lt;em&gt;default-web-site.xml&lt;/em&gt;. Thus, all resources that were &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_68&quot;&gt;avaialble&lt;/span&gt; over HTTP will now become available over HTTPS. If you want some applications to be available only over HTTPS, you need to remove those applications from the &lt;em&gt;default-web-site.xml&lt;/em&gt;. All applications are wrapped under the &lt;em&gt;&amp;lt;web-app&amp;gt;&lt;/em&gt; tag.&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Bounce &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_71&quot;&gt;OC&lt;/span&gt;4J and test&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Restart the container and test. For instance, if the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_72&quot;&gt;BPEL&lt;/span&gt; console was &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_73&quot;&gt;available&lt;/span&gt; over &lt;a href=&quot;http://172.28.10.60:7777/BPELConsole&quot;&gt;http://172.28.10.60:7777/BPELConsole&lt;/a&gt; it should now be also available over &lt;a href=&quot;https://172.28.10.60:4443/BPELConsole&quot;&gt;https://172.28.10.60:4443/BPELConsole&lt;/a&gt; provided the entry for the same exists in the &lt;em&gt;secure-website.xml&lt;/em&gt; file.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/2718463612499205971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/2718463612499205971' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/2718463612499205971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/2718463612499205971'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/08/security-enabling-ssl-in-oc4j.html' title='Security: Enabling SSL in OC4J'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-2177389465345994942</id><published>2008-08-06T14:54:00.005+05:30</published><updated>2008-08-06T16:54:37.727+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPEL"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Fusion"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>Calling BPEL from PL/SQL</title><content type='html'>&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;The UTL_HTTP package&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Calling PL/SQL code from BPEL is a walk in the park. But what if you want to do the opposite? Is there a way? Well, fortunately, there is. Oracle 9i/10g comes intact with the &lt;em&gt;UTL_HTTP&lt;/em&gt; package that can be used to access data on the Internet over the HTTP protocol. With a little tweaking you can leverage its functionality to call BPEL processes. And I shall show you exactly how to do it.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Declare variables&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;We declare the following PL/SQL variables&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;em&gt;request_envelope VARCHAR2(30000): This is the SOAP request that will be sent to the BPEL process&lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;em&gt;response_envelope VARCHAR2(30000): The response message relayed back by the BPEL process after the request has been successfully served&lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;em&gt;http_request utl_http.req: The PL/SQL abstraction of the HTTP request sent to the web server&lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;em&gt;http_response utl_http.resp: The PL/SQL abstraction of the HTTP respone delegated to the caller&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;The SOAP message&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Since SOAP is widely recognised as an industry standard to communicate with services avaialble over the internet, your first task is to create the message. For the sake of convinience, I shall assume that there is a synchronous BPEL process in place that accepts a string as input and concatenates the string with &#39;Hello&#39; - a typical HelloWorld BPEL process. Initialize the request_envelope variable with the SOAP message as shown below&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;request_envelope := &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&#39;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;soap:Envelope xmlns:soap=&quot;&lt;/span&gt;&lt;/em&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;soap:Header/&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;soap:Body xmlns:ns1=&quot;&lt;/span&gt;&lt;/em&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://xmlns.oracle.com/HelloWorld&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;ns1:HelloWorldProcessRequest&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;ns1:input&amp;gt;Sankash&amp;lt;/ns1:input&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/ns1:HelloWorldProcessRequest&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/soap:Body&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/soap:Envelope&amp;gt;&#39;;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;BEGIN_REQUEST&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;BEGIN_REQUEST begins a new HTTP request. When the function returns, the UTL_HTTP package has established the network connection to the target Web server, and has sent the HTTP request line. This function takes three parameters which are&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;em&gt;url : The end-point for the service you wish to invoke. This will typically be the URL of the BPEL process&lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;em&gt;method : POST or GET. &lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The &quot;GET&quot; method is suitable for non-parameterized URLs or for URLs with a manageable volume of parameter name-value pairs. The maximum length of the URL string is limited by the capacity of the PL/SQL VARCHAR2 variable used to pass it.&lt;/p&gt;&lt;p&gt;The &quot;POST&quot; method is suitable for parameterizing the request with an arbitrarily large volume of data, especially for example as might be the case when the request is expressed as an XML document. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;em&gt;http_version : the version of HTTP like 1.0 or 1.1 etc&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;In our case this function will look like&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http_request := &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;utl_http.begin_request(&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;url =&gt; &#39;http://172.28.0.54:7777/orabpel/default/HelloWorld/1.0&#39;, method =&gt; &#39;POST&#39;, http_version =&gt; &#39;HTTP/1.1&#39;);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Header information&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The next step is to set the header information. For this we shall use SET_HEADER function. This function sets a HTTP request header. The request header is sent to the Web server as soon as it is set. The function takes three parameters which are&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;em&gt;r : The http request object&lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;em&gt;name : The header name&lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;em&gt;value : The header value&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;In our case we need to set the values for Content-Type, Content-Length and SOAPAction to complete the header. This is done as follows&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;utl_http.set_header(&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;r =&gt; http_request, &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;name =&gt; &#39;Content-Type&#39;, &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;VALUE =&gt; &#39;text/xml&#39;); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;utl_http.set_header(&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;r =&gt; http_request, &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;name =&gt; &#39;Content-Length&#39;, &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;VALUE =&gt; LENGTH(request_envelope));&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;utl_http.set_header(&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;r =&gt; http_request, &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;name =&gt; &#39;SOAPAction&#39;, &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;VALUE =&gt; &#39;process&#39;);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;WRITE_TEXT&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;This function writes text data in the HTTP request body. As soon as some data is sent as the HTTP request body, the HTTP request headers section is completed. Text data is automatically converted from the database character set to the request body character set. This function takes two parameters&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;em&gt;r : The http request object&lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;em&gt;data : The text data that forms the request. In our case this is the SOAP message&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This is how we will call this function&lt;/p&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;utl_http.write_text(&lt;/span&gt;&lt;/em&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;r =&gt; http_request, &lt;/span&gt;&lt;/em&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;data =&gt; request_envelope);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;GET_RESPONSE&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;This procedure reads the HTTP response. When this procedure returns, the status line and the HTTP response headers have been read and processed. The status code, reason phrase and the HTTP protocol version are stored in the response record. We shall call this in the following way&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http_response := &lt;/span&gt;&lt;/em&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;utl_http.get_response(r =&gt; http_request);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;READ_TEXT&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;This reads the HTTP response body in text form and returns the output in the caller-supplied buffer. The end_of_body exception will be raised if the end of the HTTP response body is reached. Text data is automatically converted from the response body character set to the database character set. It takes two parameters&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;em&gt;r : the HTTP response object &lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;em&gt;data : the text data of the response. In our case this is the SOAP response&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;We shall use this function in the following way&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;utl_http.read_line(r =&gt; http_response, data =&gt; response_envelope);&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;END_RESPONSE&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;This ends the HTTP response. This completes the HTTP request and response cycle. The function takes only one parameter which is the HTTP response object.&lt;br /&gt;Use it like this&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;utl_http.end_response(http_response);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Handle Exceptions&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;To take care of any inadvertent exceptions that may arise we embed the following exception handling block in our code&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;EXCEPTION&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;WHEN utl_http.end_of_body &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;THEN utl_http.end_response(http_response);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;WHEN utl_http.request_failed THEN &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;DBMS_OUTPUT.PUT_LINE(&#39;Request Failed: &#39; utl_http.get_detailed_sqlerrm);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;WHEN utl_http.http_server_error THEN &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;DBMS_OUTPUT.PUT_LINE(&#39;Server Error: &#39; utl_http.get_detailed_sqlerrm);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;WHEN utl_http.http_client_error THEN &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;DBMS_OUTPUT.PUT_LINE(&#39;Client Error: &#39; utl_http.get_detailed_sqlerrm);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;WHEN others THEN &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;DBMS_OUTPUT.PUT_LINE(sqlerrm);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Gotchas&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;So far so good. But when you try to read the output you in your PL/SQL code you are almost certain to get this error, because in most of the cases the output from the BPEL process will be verbose.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;ORA-20000: ORU-10028: line length overflow, limit of 255 chars per line&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;This is because &lt;em&gt;DBMS_OUTPUT.PUT_LINE&lt;/em&gt; can write a maximum of 255 characters in one line as the error says. Thus you will have to break the output into multiple lines. To get round this problem I shall use the following piece of code. This restricts the number of characters per line to 255. Extra characters are passed onto the next line.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;FOR i IN 1 .. MOD(LENGTH(response_envelope), 255) &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;LOOP &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;DBMS_OUTPUT.PUT_LINE(SUBSTR(response_envelope, j, 255)); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;j := j + 255; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;END LOOP;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;That is all. Check the BPEL console to ensure that the process was successfully initiated.</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/2177389465345994942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/2177389465345994942' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/2177389465345994942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/2177389465345994942'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/08/calling-bpel-from-plsql.html' title='Calling BPEL from PL/SQL'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-3718574647945303710</id><published>2008-08-05T09:36:00.005+05:30</published><updated>2008-08-05T11:21:07.612+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPEL"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Fusion"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>Accessing BPEL variables from within XSLT</title><content type='html'>&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;What&#39;s new?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;XSLT is a remarkable technology, and I almost always prefer using it over other alternatives, most notably JAVA(of course there are times when nothing else will work and JAVA enticingly fits the bill). However, very often one is tempted to write JAVA snippets, and expose them as webservices to accomplish a task, when the same could be achived using XSLT with minimal or no coding.&lt;br /&gt;&lt;br /&gt;Most of us are aware that BPEL PM provides an out of box function &lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;ora:processXSLT&lt;/span&gt;&lt;/em&gt; to execute an XSL template. The signature of the function is pretty well known.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;ora:processXSLT(&#39;template&#39;,&#39;input&#39;,&#39;properties&#39;?)&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;template&lt;/span&gt;&lt;/em&gt; : The XSL File Name&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;input&lt;/span&gt;&lt;/em&gt; : The variable to be transformed&lt;br /&gt;&lt;br /&gt;Very often we use only the first two parameters without giving much of a thought about the third. This post is intended unravel the mystery sorrounding this parameter.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;The third parameter&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Interestingly, the third parameter comes in handy when you need access to BPEL variables from within an XSL file. Withing the XSLT engine this parameter translates to XSL parameters that can be accessed within the XSL Map using the construct&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;xsl:param name=&quot;&amp;lt;paramName&amp;gt;&quot;/&amp;gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;All that remains is retrieving data from this parameter within XSLT. This is relatively straight forward and is done as follows&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;Name&amp;gt;&amp;lt;xsl:value-of select=&quot;$param1&quot;/&amp;gt;&amp;lt;/Name&amp;gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;More about &quot;&lt;em&gt;properties&quot;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;For the &quot;properties&quot; argument to be available to the XSLT engine, it must be of type &quot;message&quot; that conforms to the following schema.&lt;br /&gt;...&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;windows-1252&quot; ?&amp;gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;xsd:schema xmlns:xsd=&quot;&lt;/em&gt;&lt;/span&gt;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;http://www.w3.org/2001/XMLSchema&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&quot; xmlns=&quot;&lt;/em&gt;&lt;/span&gt;&lt;a href=&quot;http://schemas.oracle.com/service/bpel/common&quot;&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;http://schemas.oracle.com/service/bpel/common&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&quot; targetNamespace=&quot;&lt;/em&gt;&lt;/span&gt;&lt;a href=&quot;http://schemas.oracle.com/service/bpel/common&quot;&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;http://schemas.oracle.com/service/bpel/common&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&quot; elementFormDefault=&quot;qualified&quot;&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;xsd:element name=&quot;parameters&quot;&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;xsd:annotation&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;xsd:documentation&amp;gt; A sample element &amp;lt;/xsd:documentation&amp;gt; &amp;lt;/xsd:annotation&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;xsd:complexType&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;xsd:sequence&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;xsd:element name=&quot;item&quot; maxOccurs=&quot;unbounded&quot;&amp;gt; &amp;lt;xsd:complexType&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;xsd:sequence&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;xsd:element name=&quot;name&quot; type=&quot;xsd:string&quot;/&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;xsd:element name=&quot;value&quot; type=&quot;xsd:string&quot;/&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;/xsd:sequence&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;/xsd:complexType&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;/xsd:element&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;/xsd:sequence&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;/xsd:complexType&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;/xsd:element&amp;gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;/xsd:schema&amp;gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;Create and initialize the variable&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Your first step is to import this schema into the project wsdl file. Once this is done your wsdl file should look like this&lt;br /&gt;...&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;types&amp;gt; &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;schema xmlns=&quot;&lt;/em&gt;&lt;/span&gt;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema%22&amp;gt;&quot;&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;http://www.w3.org/2001/XMLSchema&quot;&amp;gt;&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;import namespace=&quot;&lt;/em&gt;&lt;/span&gt;&lt;a href=&quot;http://schemas.oracle.com/service/bpel/common&quot;&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;http://schemas.oracle.com/service/bpel/common&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&quot; schemaLocation=&quot;Props.xsd&quot; /&amp;gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;/schema&amp;gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&amp;lt;/types&amp;gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Add the namespace under the definitions tag of the wsdl file like this&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;xmlns:ns1=&quot;&lt;/em&gt;&lt;/span&gt;&lt;a href=&quot;http://schemas.oracle.com/service/bpel/common&quot;&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;http://schemas.oracle.com/service/bpel/common&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;&quot;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;Now, go ahead and create the appropriate message types. For the sake of convinience, I have modelled my request message on top of this schema(since my intention is just to drive home the concept; readers are welcome to improvise) so that I don&#39;t need to create another variable and populate it with the contents of input variable again within the BPEL process. Instead, I shall directly use the input variable as the third argument. If you are using JDeveloper, there isn&#39;t any need to do all these manually. All you need to do is specify this schema for the input/request message when defining the process at the beginning. The designer automatically generates these fragments for you without you even knowing it. Anyways, here is my message type&lt;br /&gt;...&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;message name=&quot;ReadConfig1RequestMessage&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;part name=&quot;payload&quot; element=&quot;ns1:parameters&quot; /&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/message&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;em&gt;NS:If you are not directly using the input variable, you must first create a variable that conforms to this message and populate the same with the contents of that bpel variable whose values you wish to make avaiable within the XSLT.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Anyways, here is how the third argument will look like after it has been initialized&lt;br /&gt;...&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;parameters xmlns:ns2=&quot;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://schemas.oracle.com/service/bpel/common&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.oracle.com/service/bpel/common&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&quot; xmlns=&quot;&lt;/span&gt;&lt;/em&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;http://schemas.oracle.com/service/bpel/common&quot;/&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;ns2:item&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;ns2:name&amp;gt;Name&amp;lt;/ns2:name&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;ns2:value&amp;gt;Sankash&amp;lt;/ns2:value&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/ns2:item&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;ns2:item&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;ns2:name&amp;gt;Occupation&amp;lt;/ns2:name&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;ns2:value&amp;gt;Software Engineer&amp;lt;/ns2:value&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/ns2:item&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/parameters&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Call ora:processXSLT with the third argument&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Unfortunately, the JDeveloper GUI does not support using this parameter. So, you have to do it after clicking the source tab in the designer. Just add this snippet within the tranformation&lt;br /&gt;...&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;copy&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;from expression=&quot;ora:processXSLT(&#39;Transformation_1.xsl&#39;,bpws:getVariableData(&#39;Invoke_1_SynchRead_OutputVariable&#39;,&#39;Configurations&#39;),bpws:getVariableData(&#39;inputVariable&#39;,&#39;payload&#39;))&quot;/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;to variable=&quot;outputVariable&quot; part=&quot;payload&quot;/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/copy&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;&lt;strong&gt;The XSLT snippet&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Here is the xsl file. It will concat the values of the parameters which are essentially the contents of the BPEL variable (the input variable in this case). ...&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;xsl:stylesheet version=&quot;1.0&quot; ....&amp;gt;&lt;br /&gt;&amp;lt;xsl:param name=&quot;Name&quot;/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;xsl:param name=&quot;Occupation&quot;/&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;xsl:template match=&quot;/&quot;&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;ns1:ReadConfig1ResponseMessage&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;ns1:result&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;xsl:value-of select=&quot;concat(&#39;Name : &#39;, $Name, &#39; Occupation : &#39;,$Occupation)&quot;/&amp;gt; &amp;lt;/ns1:result&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/ns1:ReadConfig1ResponseMessage&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/xsl:template&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6600;&quot;&gt;Testing the process&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Save the project and deploy. Ideally the response message should containt the concatenated value of the parameters. In this case it shoudl look like this&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;ns1:result&amp;gt;Name : Sankash Occupation : Software Engineer&amp;lt;/ns1:result&amp;gt;&lt;/span&gt;&lt;/em&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/3718574647945303710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/3718574647945303710' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/3718574647945303710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/3718574647945303710'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/08/access.html' title='Accessing BPEL variables from within XSLT'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-5105591114755314713</id><published>2008-08-04T11:30:00.011+05:30</published><updated>2008-08-04T19:49:42.413+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPEL"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Fusion"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>Creating and using custom xpath functions in BPEL</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz4iAxhMa98-2SWo2fFpnAsTfdOG6uZH-d4g6FLe84w4piaeSGizm7EsVdcECqPjEsa3Syi8Eka2fSPfnkTxQLXv07Ry80J1L7zUquxdg4T9amlZYgtrXhigAcVzu1cxqfMBaXd6QcfPI/s1600-h/xpath-functions.bmp&quot;&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;The motivation..&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;Recently, while tinkering with the email activity, I stumbled upon a strange but interesting discovery. I had tried to use the ora:fileread xpath function to read a text file (and subsequently send the same as an attachment) and I found that the function returned some strange text. After some more playing around, it dawned on me that the function had actually returned the Base64 encoded equivalent of the original text. So, in order to recover the original text I had to decode the encoded text. Since BPEL does not provide an out of box function to do the same, my first impulse was to write some java snippet and subsequently wrap it as web service. Then I got a better idea - using a custom xpath function that would do the decoding for me. Obviously, this was a better design inasmuch as I would no longer need to use an additional partnerlink in my BPEL process. In fact, this is the subject that I am going to cover in this post.&lt;br /&gt;&lt;br /&gt;For ease of writing, I shall use the same code I wrote to decode Base64 encoded text. This is intended to serve as an example. Readers can improvise on it to develop their own functions.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;color:#ff6666;&quot;&gt;&lt;strong&gt;The business logic&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;The first step is to write the code to decode the message, which is relatively simple.&lt;br /&gt;&lt;br /&gt;Here is the snippet&lt;br /&gt;...&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;private String decodeString(String str)&lt;/em&gt;&lt;br /&gt;&lt;em&gt;{ &lt;/em&gt;&lt;br /&gt;&lt;em&gt;String decoded = null; &lt;/em&gt;&lt;br /&gt;&lt;em&gt;try &lt;/em&gt;&lt;br /&gt;&lt;em&gt;{ &lt;/em&gt;&lt;br /&gt;&lt;em&gt;decoded = Base64Decoder.decode(str); &lt;/em&gt;&lt;br /&gt;&lt;em&gt;} &lt;/em&gt;&lt;br /&gt;&lt;em&gt;catch (UnsupportedEncodingException e) &lt;/em&gt;&lt;br /&gt;&lt;em&gt;{ &lt;/em&gt;&lt;br /&gt;&lt;em&gt;e.printStackTrace();&lt;/em&gt;&lt;br /&gt;&lt;em&gt;} &lt;/em&gt;&lt;br /&gt;&lt;em&gt;return decoded; &lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;Wrapping the code&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;In order that this snippet be available as XPath function we need to first implement the IXPathFunction interface. This has a single method that it requires us to implement:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;public Object call(IXPathContext iXPathContext, List list) throws XPathFunctionException&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Here is the implementation of the above method&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;private static final int NO_OF_ARGS = 1;&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;public Object call(IXPathContext context,List args) throws XPathFunctionException {&lt;br /&gt;// test if we have the right argument number&lt;/em&gt;&lt;br /&gt;&lt;em&gt;if (args.size() != NO_OF_ARGS) &lt;/em&gt;&lt;br /&gt;&lt;em&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em&gt;throw new XPathFunctionException(&quot;This function requires one argument.&quot;); &lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;}&lt;br /&gt;// extract the String of the argument from the BPEL process&lt;/em&gt;&lt;br /&gt;&lt;em&gt;Object o = args.get(0);&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;String str = getValue(o);&lt;br /&gt;// call the business method &lt;/em&gt;&lt;br /&gt;&lt;em&gt;return decodeString(str); &lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;To get the value of the object, we shall use the getValue method. The implementation of the same is shown below.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&lt;em&gt;private String getValue(Object o) throws XPathFunctionException {&lt;/em&gt;&lt;br /&gt;&lt;em&gt;if (o instanceof String) &lt;/em&gt;&lt;br /&gt;&lt;em&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em&gt;return ((String)o);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;} &lt;/em&gt;&lt;br /&gt;&lt;em&gt;else if (o instanceof Node) &lt;/em&gt;&lt;br /&gt;&lt;em&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em&gt;return ((Node)o).getNodeValue();&lt;/em&gt;&lt;br /&gt;&lt;em&gt;} &lt;/em&gt;&lt;br /&gt;&lt;em&gt;else &lt;/em&gt;&lt;br /&gt;&lt;em&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em&gt;throw new XPathFunctionException(&quot;Unknown argument type.&quot;); &lt;/em&gt;&lt;br /&gt;&lt;em&gt;} &lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;color:#ff6666;&quot;&gt;Adding the class to the Server&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Now that we are done with the coding, we need to compile it and drop the class into &lt;em&gt;$ORACLE_HOME/bpel/system/classes&lt;/em&gt; directory of the BPEL PM server, so that the application server has access to this class.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;Registering the xpath funtion with the server&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;The BPEL PM needs to be aware of this new function so that you can use it. So you need to register it with the server. This is done by adding a new entry in the &lt;em&gt;xpath-functions.xml&lt;/em&gt; file located under the &lt;em&gt;$BPEL_HOME/domains/default/config&lt;/em&gt; directory. &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;bpel-xpath-functions version=&quot;2.0.2&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;function id=&quot;decode&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;classname&gt;&lt;/BPEL-XPATH-FUNCTIONS&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;bpel-xpath-functions version=&quot;2.0.2&quot;&gt;&lt;function id=&quot;decode&quot;&gt;&lt;classname&gt;&lt;property id=&quot;namespace-prefix&quot;&gt;&lt;/value&gt;&lt;comment&gt;Namespace prefix for this function&lt;/comment&gt;&lt;/property&gt;&lt;/function&gt;&lt;/BPEL-XPATH-FUNCTIONS&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;?xml version = &#39;1.0&#39; encoding = &#39;UTF-8&#39;?&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;bpel-xpath-functions version=&quot;2.0.2&quot;&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;function id=&quot;decode&quot;&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;classname&amp;gt;callbpelfromjava.CustomXpathExtension&amp;lt;/classname&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;comment&amp;gt;&amp;lt;![CDATA[decode the string]]&amp;gt;&amp;lt;/comment&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;property id=&quot;namespace-uri&quot;&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;value&amp;gt;http://nebulasky.blogspot.com&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;comment&amp;gt;Namespace URI for this function&amp;lt;/comment&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;property id=&quot;namespace-prefix&quot;&amp;gt;&amp;lt;value&amp;gt;nebulasky&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;comment&amp;gt;Namespace prefix for this function&amp;lt;/comment&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/function&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/bpel-xpath-functions&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;div&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;Setting the BPEL classpath&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;Edit the shared library of your application server. Navigate to &lt;em&gt;$ORACLE_HOME/j2ee/oc4j_soa/config&lt;/em&gt;. Open the &lt;em&gt;server.xml&lt;/em&gt; file and locate the shared library called &lt;em&gt;oracle.bpel.common&lt;/em&gt;. Add a tag code-source with your classpath as the others code-source tags. &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;shared-library name=&quot;oracle.bpel.common&quot; version=&quot;10.1.3&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;code-source path=&quot;/u01/apps/orasoa/product/10.1.3/bpel/system/classes&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/shared-library&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Now, open the domain.xml and scroll down to &lt;em&gt;property id = &quot;bpelcClasspath&quot;. &lt;/em&gt;Ensure that the classpath is already present. If not, add it. Once these tasks are done, bounce the server. &lt;/div&gt;&lt;div&gt;...&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;property id=&quot;bpelcClasspath&quot;&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;name&amp;gt;BPEL process compiler classpath&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;value&amp;gt;/u01/apps/orasoa/product/10.1.3/bpel/system/classes:/u01/apps/orasoa/product/10.1.3/bpel/lib/j2ee_1.3.01.jar:/u01/apps/orasoa/product/10.1.3/bpel/lib/xmlparserv2.jar&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;Testing the Process&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;Create a BPEL process in JDeveloper. Under the process tag of the bpel file add the namespace that qualifies the function. This is the same as the values of the &lt;em&gt;namespace-uri/namespace-prefix&lt;/em&gt; you had specified in the &lt;em&gt;xpath-functions.xml.&lt;/em&gt; Here, the &lt;em&gt;namespace&lt;/em&gt; is &lt;a href=&quot;http://nebulasky.blogspot.com/&quot;&gt;&lt;em&gt;http://nebulasky.blogspot.com&lt;/em&gt;&lt;/a&gt; and the &lt;em&gt;prefix&lt;/em&gt; is &lt;em&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;nebulasky&lt;/span&gt; &lt;/em&gt;(see &lt;em&gt;xpath-functions.xml&lt;/em&gt;).&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Here is how it will look like&lt;/div&gt;&lt;div&gt;&lt;em&gt;xmlns:nebulasky=&quot;&lt;/em&gt;&lt;a href=&quot;http://nebulasky.blogspot.com/&quot;&gt;&lt;em&gt;http://nebulasky.blogspot.com&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&quot;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;Create a copy operation as follows. &lt;/div&gt;&lt;div&gt;...&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;copy&amp;gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;from expression=&quot;nebulasky:decode(bpws:getVariableData(&#39;encoded&#39;))&quot;/&amp;gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;to variable=&quot;outputVariable&quot; part=&quot;payload&quot; query=&quot;/client:CustomXpathProcessResponse/client:result&quot;/&amp;gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#cc9933;&quot;&gt;&amp;lt;/copy&amp;gt;&lt;/span&gt;&lt;br /&gt;...&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Deploy the project and initiate it. Ideally, your BPEL process should be able to decode the encoded text back to ASCII text.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/5105591114755314713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/5105591114755314713' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/5105591114755314713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/5105591114755314713'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/08/creating-and-using-custom-xpath.html' title='Creating and using custom xpath functions in BPEL'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-5319650314851416519</id><published>2008-07-28T14:07:00.006+05:30</published><updated>2008-07-28T18:31:55.448+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="nostalgia"/><title type='text'>To the next step....</title><content type='html'>Not often does one experience something as enigmatic - a moment when time comes to a standstill, when the mind and soul break free and transcend into the vast expanse of eternal bliss; a time when words lose their meaning, a time when you want to say so much and yet words fail you. Today is such an occasion for us (Anil, Lalit, Chatty, Patidar, Neeraj and me). We have been waiting for this day since a time that seems so distant like the start of our lives.&lt;br /&gt;&lt;br /&gt;Two years back, on the same day, we embarked on a journey – one that would decide our career, and the course that our lives would eventually take afterwards. We joined the L&amp;amp;T family. With an organization that is undoubtedly at the pinnacle of India’s manufacturing industry, we thought God could not have been more benevolent to us. And we were right. In retrospect, we have reasons to believe that two years of our lives were indeed well spent.&lt;br /&gt;&lt;br /&gt;It has been a terrific journey so far – one with so many interesting twists and turns. There were moments of glory as there were instances of regret. But the important thing is we enjoyed every bit of it. The myriad birthday parties with our proprietary “cake-painting” on the birthday boy’s face, the incredibly funny stories we cooked up to cover Lalit’s recurring absences, Patidar’s on-the-spot one-liners that would dumbstruck everyone to the hilt, and our endless discussions about one novel person named “NM” – life was an ice-cream of many flavors. Everything was not rosy though, and one thing that always played spoilt-sport was one lousy “Pipeline” - one that contained all the projects in the world (strangely the pipeline was one of a kind and only L&amp;amp;T had access to it). We used to stare into it with expectant eyes hoping something to come out of it, and more often than not, it disappointed. Thus there was a perennial drought in the river which is more often referred to in corporate terms as “Projects”. Nevertheless, we never cared. Lalit, who is undoubtedly the Einstein in JAVA, got busy creating something that would allow us to access sites which our proxy server would never allow (of course, it was an initiative that he took to get round the problem of not being able to view Vidya Balan’s and Katrina Kaif’s wallpapers - sorry Lalit, I have let your secret out). Chatty on the other hand, hardly gave a damn - he made the telephone his best friend, and whenever he got bored with it he had the gymnasium to fall back to. And Anil, well, he made it a point to ask the office boy for a new notebook - every single day. He scribbled and scribbled untill the notebooks were teeming with motley technical jargons. The days wore on and turned into months and months into years but his collection of notebooks never stopped growing. I was the one entrusted with the most daunting task among all – deal with the one called “NM”.&lt;br /&gt;&lt;br /&gt;Like I said, we had our share of joys and sorrows and we have embraced them with dignity, élan and poise. Another milestone, and perhaps the most important one, is that the 2 year bond that we signed prior to joining the organization stands invalid today. This in itself is a culmination of our long cherished desire to be free, to be able to exercise our own will, to know that we matter and more importantly the legitimization of our right to choose what is best for us. The journey will continue, and so will we. May be, we will part ways, each taking a different route. But whatever we do, wherever we go, there will always be something which will symbolize our connection and togetherness - the fact that we all started from the same point.&lt;br /&gt;&lt;br /&gt;Time to raise a toast, fellas…&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5227984959417074530&quot; style=&quot;DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpYQ6eMNrsO6lD_B1ZRql9fuRPHldhJLfmygPdx_jVx8GzycnYdPrTvdfIB4mxVZIa3QAeQWKEYmK_PZMxdEMEM4NoHr4fRMH5wJH-vMjhCIZtCVT9wHptT9z34BwDqFIiNzygg-6QaOc/s320/group.jpg&quot; border=&quot;0&quot; /&gt;&lt;/p&gt;&lt;p&gt;From left: Chatty, Anil, Lalit and me....&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Dil Chahta Hai, Kabhi Na Beete Chamkeele Din&lt;br /&gt;Dil Chahta Hai, Hum Na Rahein Kabhi Yaaron Ke Bin&lt;br /&gt;Din Din Bhar Ho Pyaari Baatein&lt;br /&gt;Jhoome Shaame, Gaaye Raatein&lt;br /&gt;Masti Mein Rahe Dooba Dooba Hameshaa Samaa&lt;br /&gt;Humko Raahon Mein Yoonhi Milti Rahein Khushiyaan&lt;/p&gt;Dil Chahta Hai.........</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/5319650314851416519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/5319650314851416519' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/5319650314851416519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/5319650314851416519'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/07/to-next-step.html' title='To the next step....'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpYQ6eMNrsO6lD_B1ZRql9fuRPHldhJLfmygPdx_jVx8GzycnYdPrTvdfIB4mxVZIa3QAeQWKEYmK_PZMxdEMEM4NoHr4fRMH5wJH-vMjhCIZtCVT9wHptT9z34BwDqFIiNzygg-6QaOc/s72-c/group.jpg" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-4480195484104174043</id><published>2008-07-23T11:35:00.003+05:30</published><updated>2008-07-23T12:28:12.932+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Fusion"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>AIA Foundation Pack</title><content type='html'>&lt;strong&gt;What is the buzz?&lt;/strong&gt;&lt;br /&gt;AIA(Application Integration Architecture) Foundation Pack is a set of prebuilt enterprise objects and services coupled with a robust integration management infrastructure intended to expedite the development of integration solutions. Further, by adopting salient and time-tested best practises and industry standards, your entire portfolio of IT services can be integrated within the perview of changes and new requirements therey lending flexibility and adaptability to your business.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Components of the AIA Foundation Pack&lt;/strong&gt;&lt;br /&gt;The pack comprises of the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Enterprise Business Objects&lt;/li&gt;&lt;li&gt;Enterprise Business Services&lt;/li&gt;&lt;li&gt;SOA Governance Tools&lt;/li&gt;&lt;li&gt;Reference Architecture&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;em&gt;Enterprise Business Objects&lt;/em&gt;&lt;/p&gt;&lt;p&gt;A Business object is a data model representing any recognizable business entity like customer, purchase order etc. It containts all the meta data and definitions pertaining to an entity in the form of XSDs.&lt;/p&gt;&lt;p&gt;&lt;em&gt;Enterprise Business Services&lt;/em&gt; &lt;/p&gt;&lt;p&gt;Enterprise business services are implementation of a certain business task that have been exposed as web services so that they can be readily consumed over the internet by consumers. Usually your integrated environment will have a pool of enterprise business services with BPEL orchestrating the interaction patteren among them&lt;/p&gt;&lt;p&gt;&lt;em&gt;SOA Governance&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To ensure an end to end management of your integration solution, the Foundation Pack comes with a set of tools. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;em&gt;Business Service Repository&lt;/em&gt;: This is a directory that lists all the services and objects avaialable in your IT ecosystem.&lt;/li&gt;&lt;li&gt;&lt;em&gt;Composite Application Validation System&lt;/em&gt;: This tool enables you to test your business process independent of the partner process. By providing an environment that simulates the real business scenario, you can do an end to end testing of the services you create&lt;/li&gt;&lt;li&gt;Composite Application Error Management and Resolution: It provides an enhanced error management and resolution facility where errors are routed to the intended recepients so that corrective measures can be taken. The result is low downtime.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;em&gt;Reference Architecture&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To enable and assist developers there are two guides available that provides a step by step approach to build your custom solutions using AIA. &lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/4480195484104174043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/4480195484104174043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/4480195484104174043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/4480195484104174043'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/07/aia-foundation-pack.html' title='AIA Foundation Pack'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-4827461401656240020</id><published>2008-07-22T16:15:00.005+05:30</published><updated>2008-07-23T10:49:38.684+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Fusion"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>Email workaround - when sending multiple attachments the email body is also sent as attachement</title><content type='html'>This is a very common problem that developers face. When you check the multipart checkbox in the email activity in JDeveloper, it generates background code which by default sets even the email body as an attachment. Thus, instead of the email message appearing in the body, it appears as an attachment. Here is how to get around this problem.&lt;br /&gt;&lt;br /&gt;Once you have dragged an email activity onto the designer and set the number of attachments, click the source tab in JDeveloper. Scroll down untill you find the following.&lt;img id=&quot;BLOGGER_PHOTO_ID_5225794346556729874&quot; style=&quot;DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe_PjlofJbcRYkmwIRkWqtj45NHLD7ZU5-i2mzRmc8SwZhISlchv2wkSuoSOMMe4gtS7AW_r6ZrkRsIQYayQOwsUWEccO9_xDrOGyYawitI6G8GLUhXZbgMLeoMlrLZWCitHxF0kBydQY/s320/file.bmp&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;p&gt;Delete the highlighted portion completely. Save the project and deploy. That is all.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/4827461401656240020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/4827461401656240020' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/4827461401656240020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/4827461401656240020'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/07/email-workaround-when-sending-multipart.html' title='Email workaround - when sending multiple attachments the email body is also sent as attachement'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe_PjlofJbcRYkmwIRkWqtj45NHLD7ZU5-i2mzRmc8SwZhISlchv2wkSuoSOMMe4gtS7AW_r6ZrkRsIQYayQOwsUWEccO9_xDrOGyYawitI6G8GLUhXZbgMLeoMlrLZWCitHxF0kBydQY/s72-c/file.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-8982233237019854291</id><published>2008-07-22T11:45:00.005+05:30</published><updated>2008-07-22T14:43:25.046+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>Optimizing your BPEL process - inserting multiple records into a database in one go.</title><content type='html'>Oftentimes you may want to insert multiple rows of records into a database in one single call instead of calling the database adapter multiple times (one call for inserting one row). This is the recommended way as it entails significant performance boost. Unfortunately the BPEL PM does not have an out of box functionality to implement this. But there is a workaround. It involves some tweaking at the database level which is not very difficult as I am going to show.&lt;br /&gt;&lt;br /&gt;Assume you have the following file whose data you need to insert into the database. Your first step will be to create a file adapter to read this file which is relatively simple.&lt;br /&gt;&lt;br /&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5225762228584267362&quot; style=&quot;DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTrjqcv40F9J7hHLEA3QEdyM6FoDUxHtmOTUw-m_QL9djwR3R03wmm8MiwqjZneMnxaTQSnFxbYF6uz-or4RXTQ8dpusTkwn-IFJ3PtbFl__4MSEoQK2TAAE4vm6uEwH1E1RWaY72lSHE/s320/file.bmp&quot; border=&quot;0&quot; /&gt;The next step is to create a database type whose structure is equivalent to the structure of the records in the file. More specifically, the fields of the record (name,age,superior) are reflected in the fields of the type. Here is how you got to do it.&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE type file_record as object(name varchar2(20), age number, superior varchar2(20));&lt;br /&gt;&lt;br /&gt;Then you need to create a nested table for the above type.&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE file_record_tbl as table of file_record;&lt;br /&gt;&lt;br /&gt;Now, you need to have a procedure in place for inserting data into the database. This procedure takes file_record_tbl as input parameter (unlike one that takes simple data types as input). Inside the procedure you can use this file_record_tbl to insert data for inserting data.&lt;br /&gt;...&lt;br /&gt;create or replace procedure insert_data(p_file_record_tbl in file_record_tbl) as&lt;br /&gt;begin&lt;br /&gt;FOR x IN 1 .. p_file_record_tbl.COUNT&lt;br /&gt;loop&lt;br /&gt;insert into &amp;lt;table_name&amp;gt; &lt;table_name&gt;values&lt;br /&gt;(&lt;br /&gt;p_file_record_tbl.name,&lt;br /&gt;p_file_record_tbl.age,&lt;br /&gt;p_file_record_tbl.superior&lt;br /&gt;);&lt;br /&gt;end loop;&lt;br /&gt;end insert_data;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Now all you need to do is create a database adapter and call this procedure from JDeveloper. Also, use a Transform activity to populate this type with the data from the file. That is all.</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/8982233237019854291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/8982233237019854291' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/8982233237019854291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/8982233237019854291'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2008/07/optimizing-your-bpel-process-inserting.html' title='Optimizing your BPEL process - inserting multiple records into a database in one go.'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTrjqcv40F9J7hHLEA3QEdyM6FoDUxHtmOTUw-m_QL9djwR3R03wmm8MiwqjZneMnxaTQSnFxbYF6uz-or4RXTQ8dpusTkwn-IFJ3PtbFl__4MSEoQK2TAAE4vm6uEwH1E1RWaY72lSHE/s72-c/file.bmp" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-5391763247492574615</id><published>2007-09-14T14:04:00.000+05:30</published><updated>2007-09-14T15:00:15.604+05:30</updated><title type='text'>A Tribute to Einstein: His theory of relativity and their implications.</title><content type='html'>&lt;div align=&quot;justify&quot;&gt;&lt;span style=&quot;font-family:verdana;font-size:130%;&quot;&gt;Lets get started&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Starting today, I’ll be writing some articles about general science, which I am sure, will spur your interest in the subject. Let me set something straight at the very outset. I am not a scientist in the first place, but I come from a backdrop of science which helps matters. Again the articles are not intended to be taken as reference material for scientific pursuits (okay, that’s exaggeration) but are merely meant for reading pleasure. My motive is to open the reader’s mind to the breathtaking landscape of science. So, fasten your belts and we are set to go.&lt;br /&gt;&lt;br /&gt;The first one of the many articles that will follow is about theory of relativity postulated by Albert Einstein and other models stemming from it. We will look at what makes the universe so fascinating and why the theory of relativity has accrued the attention it did. In fact terming the universe as fascinating is an understatement. It is well beyond that. Let’s begin then, folks.&lt;br /&gt;&lt;br /&gt;In 1905, Albert Einstein published three papers that established his reputation as one of the greatest brains to have ever blessed the science fraternity. To really appreciate why Einstein’s research was groundbreaking, it is imperative to understand the landscape of science before Einstein arrived.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;Before Einstein&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the early 80’s of the nineteenth century, the universe was generally accepted to be made up of a fluid substance, called ether, and light was considered to be waves propagating through it. As an analogy, light waves are to ether what sound is to air. Another, widely accepted school of thought was that the speed of light should inherently differ to an observer depending on the speed and the direction in which he was moving. It is exactly the same as the difference of speed you would feel, contingent on the direction of your travel, relative to another car that is moving. So, by the same token, the speed of light should appear less to you if you are moving in its direction, and the speed should appear more if your direction of travel is against its direction. However experiments carried out by researchers in Cleveland, Ohio, suggested that the speed of light is the same irrespective of the motion or the direction of the observer.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:verdana;font-size:130%;&quot;&gt;Timelessness&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Enter Einstein. Taking cue from the above fact, Einstein dismissed the idea of ether as redundant. He is even believed to have termed the ether theory as bogus. He believed that all physical phenomena should be governed by laws that are uniform and constant, regardless of whether the person was moving or stationary. This was one blow to classical physics. But the final nail on the coffin proved to be his idea that time is not a universal absolute as it was widely conceived to be, but relative.&lt;br /&gt;&lt;br /&gt;Though the idea seems counter-intuitive at first blush, there are ample proofs that suggest the veracity of the concept. The first among them is when two clocks are brought together and synchronized, and then one is moved away and brought back, the clock which has undergone the traveling would be found to be lagging behind the clock which has stayed put. This clearly shows that time is relative. Another extension of this concept is the twin paradox which is explained below.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:verdana;font-size:130%;&quot;&gt;The Twin Paradox&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Imagine there are two folks who are identical to each other in all respects. One of them (say, Harry) embarks on a space-craft and blasts away into space at a speed proportionate to that of light. The other twin (say, Sally) stays on earth. Our beloved space tourist gets the surprise of his life when he sets his foot on earth after his expedition. Can you guess what? He finds that his sister has grown older than he. Did time stop for him? Or was it the other way round – time passed too quickly for his sister than it did for him? The answer is yes and no, both. Confused? Well, theory of special relativity provides the answer. To pit it in Einstein’s own words,”Time is personal and not universal.”&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;E=MC²&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let’s now shift focus and explore yet another of Einstein’s invaluable contribution. He came up with the most famous equation known to man, E=MC². This equation gracefully elucidates why it is impossible for a physical body to surpass the speed of light. Einstein proposed that to accelerate, one needs to expend energy. To even equal the speed of light, one would therefore need an infinite expenditure of energy which is inconsistent with the law of conservation of energy.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:verdana;font-size:130%;&quot;&gt;The Atom Bomb&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;As it turns out, this equation has been also responsible for bringing untold calamities to mankind. Atom Bombs! At the core of the most destructive of bombs, this equation is at work. To know how a bomb works, read on. An atom is made up of several neutrons and protons with electrons revolving around it. Experiments have shown that the total mass of the nucleus (which is aggregation of protons and neutrons), is less than the sum of the masses of the individual protons and neutrons that go into making it. Where is the missing mass? Again, E=MC² explains it. The mass that apparently seems to disappear is indeed converted into energy. If you could by any way, give vent to that energy, you have the ultimate disaster recipe in place for you, ready to be served. This is how atom bombs found their way into history.&lt;br /&gt;&lt;br /&gt;It is noteworthy to mention that even though Einstein laid the foundation on which atom bombs could be built, he himself was never a part of the Manhattan project that led to the dropping of the two deadly bombs at Nagasaki and Hiroshima.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-family:verdana;&quot;&gt;Einstein and Gravity&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This however did not mean it was plain sailing for Einstein all through. Though his theory of relativity could explain concepts like magnetism and electricity, it was not compatible with Newton’s laws of gravitation. Newtonian theory suggests that if there is any change in the distribution of matter of the universe at some point in the space, the change must innately be felt elsewhere instantaneously, which in a way meant that it is possible for the change to propagate at the speed of light. That is what the word instantaneously is suggestive of. But Einstein had long dismissed the absoluteness of time. So he refused to buy Newton’s theory. He was aware that there was a missing link and he set out to find it.&lt;br /&gt;&lt;br /&gt;Newtonian theory suggests that an apple falls to the ground because the earth exerts a pull on it, which we all know to be the gravitational pull. In scientific literature, the apple crashing down on Newton’s head is the same as Newton accelerating upwards to hit the stationary apple. This theory works fine if we consider the world as flat, but how does one explain the spherical shape of the earth. In a spherical earth, Einstein suggested that people living at opposite ends of the earth must continue to accelerate outward, with the distance between them remaining the same. It was this anomaly that convinced Einstein to come to yet another groundbreaking conclusion – a physical body warps space-time and it is this curvature that went on to explain so many phenomena that had remained unexplained so far, like explaining gravity in the pretext of a spherical earth.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:verdana;font-size:130%;&quot;&gt;Space-time&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Einstein was convinced that space-time is curved and not flat as it was assumed to be hitherto. What this meant in layman terms was that gravity is just an expression of the fact that space time is curved. Very simply stated this means that the apple inherently tries to move in a straight line, but because a massive body as the earth warps space-time, it appears to fall into the earth. This new theory was called the general theory of relativity to distinguish it from the original theory without gravity, which is now known as the special theory of relativity. Extending the same concept to the universe we get another interesting observation. Since the universe is full of matter, it follows that all bodies should continue to fall through the space-time continuum. This implies the universe is either expanding or contracting and as observations have shown the universe is indeed expanding with every passing day.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;The Universe through Einstein’s eyes&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;As it turns out astronomical data collected from various sources showed that galaxies are moving away from each other and their speed is in direct proportion to the distance between them. So, it is reasonably easy to conclude that at one point of time they must have been close together. This was one major reason that led scientists to adopt the big-bang theory to explain the origin of the universe. Again there were issues that were not resolved. Big bang suggested that time must have a beginning - an idea Einstein had dismissed at the very outset. Further the theory predicted that as a star continued to burn its nuclear fuel, eventually a time would come when the star would exhaust the fuel and the warping of space-time would become so severe (read extremely large gravity) that not even light would escape from it. This state is more commonly referred to as the black hole. To put it in Einstein&#39;s linguistics, time would come to an end, which is again a contradiction to what he proposed. Thus, theory of relativity failed at the beginning and at the end of a star&#39;s lifecycle. Later scientists discovered that this was not exactly a fallacy but just a gap that arose because quantum mechanics was not taken into account. With quantum theory considered, all the pieces of the puzzle fit together.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:verdana;font-size:130%;&quot;&gt;Finally&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Exhilarating, isn&#39;t it? When World War 2 finally came to an end he was offered to take over the newly created state of Israel, which he ardently refused saying this, which still lingers on, &#39;Politics is for the moment, but an equation is for eternity.&#39; How true. E=MC² is still his best epitaph and memorial. It should last till the end of time.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/5391763247492574615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/5391763247492574615' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/5391763247492574615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/5391763247492574615'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2007/09/tribute-to-einstein-his-theory-of.html' title='A Tribute to Einstein: His theory of relativity and their implications.'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-7169976171939657227</id><published>2007-09-11T13:50:00.000+05:30</published><updated>2007-09-11T14:00:53.368+05:30</updated><title type='text'>Me, her and the teddy</title><content type='html'>&lt;div align=&quot;justify&quot;&gt;It&#39;s three o&#39;clock in the morning. The cool September night is looking caressingly at me through my window; stars twinkling in her bosom as if playing hide and seek with each other. Not a trace of sleep in my eyes. I am so excited.&lt;br /&gt;&lt;br /&gt;I keep twisting and turning in my bed; every time I move, the bed cries out a disapproving creaking sound, as if flustered by my ingratitude of not being nice to her. Tired of feeling like an insomniac, I desperately want sleep to seduce me but she betrays. My entire being, from head to toe, is bursting with a strange, incomprehensible feeling. I am awake, thinking of my love, when the entire town is in deep slumber. Unable to stand my bed any longer, I jump out of it. Putting on a shirt, I take the stairs leading me to the door that opens to the terrace. I flung open the door. A gentle burst of cool breeze, smelling strongly of fresh jasmine, welcomes me. The fragrance leaves me softly intoxicated. The night is very beautiful and soothing. Too splendid a night to be wasted under the blankets, I think. The entire locality is enshrouded by the darkness of the night - the darkness only occasionally broken by flashes of light of the fireflies which abound the air at this time of the year. There is no sound except for that of the crickets who seem to be having a grand party with the fireflies as their guests.&lt;br /&gt;&lt;br /&gt;My mind is wandering. &#39;What could she be doing at this time of the night?&#39;, I ask myself. &#39;Must be sound asleep as a baby&#39;, my mind retorts back. I conjure up her image, sleeping soundly in her cosy bed, a big teddy beside her. My lips broaden into a lavish smile looking at the gargantuan size of the teddy. He has very impressive features. Eyes as black as the night itself, giant drooping ears that almost seem to cover the sides of his face. He has rather short and slender legs for his heavy frame, making me wonder if those legs can stand his weight. Beside him, to his left, sleeps the lady. I look at her, admiring her immaculate beauty. She has one arm around the teddy. They seem to be enjoying each others company. All of a sudden, she grimaces, tugs the teddy closer to her, as though annoyed by my invasion into her privacy. Then a whiff of wind ruffles the curtains, blows a tuft of her hair across her face. She curls up her legs drawing them towards her chest. Apparently, she is feeling cold. I reach out for her quilt and gently pull it over her. My eyes turn to the teddy, who is looking at me, annoyed and irritated, a slight tinge of envy in his big black eyes. He presumably does not want me to come between him and her. As I prepare myself to apologise for my misconduct, her hand flings in and goes round the teddy&#39;s waist, pulling him closer to her chest. In an instant the envy in his eyes disappears only to be replaced by a teasingly mocking look suggestive of saying,&#39;Back off, Weirdo. She is my girl!&#39; I give out a suppressed laugh, careful not to wake up the sleeping beauty.&lt;br /&gt;&lt;br /&gt;Suddenly, I feel the wetness of water around me and instantly I am out of the trance. It&#39;s drizzling, the rain drops piercing against my face like sharp needles. In an instant, the irritated but cute teddy, the sleeping beauty and the ambient atmosphere of the room are all gone. I am back at the terrace. A faint smile comes over my lips, as I think of the teddy approaching the rain gods and secretly conspiring to drive me away so that i am no longer an unwanted guest in his room. The faint smile widens into a yawn. My eyelids are feeling heavy now. I return to my bed. Sleep is beckoning me and this time I really want to yield to its temptation. &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/7169976171939657227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/7169976171939657227' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/7169976171939657227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/7169976171939657227'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2007/09/me-her-and-teddy.html' title='Me, her and the teddy'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2068794785432055688.post-1103950293580567463</id><published>2007-09-07T13:55:00.000+05:30</published><updated>2007-09-07T14:41:07.143+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Philosophy"/><title type='text'>Duality</title><content type='html'>&lt;div align=&quot;justify&quot;&gt;One of the most intriguing subjects that I ever studied as a student of science is Physics. Amongst other equally mystifying concepts, the one that has fascinated me the most is the &lt;em&gt;principle of duality&lt;/em&gt;, postulated by the renowned German physicist, Max Planck. He made a rather weird albeit entrancing discovery - it is inherently possible for a physical entity (say, an electron) to have more than one existence in the space-time continuum. The idea seemed whimsical and preposterous at first blush, but Planck went on to substantiate his theory with scientific proofs which could no longer be dismissed as outlandish.&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;BR&gt;This is Physics, pure and sublime and in its most natural form. Let&#39;s momentarily extend the concept to our lives. All we need to do is extrapolate the definition of the &lt;em&gt;&#39;physical entity&#39;&lt;/em&gt; from a minuscule electron to something not quite minuscule as humans. From the &lt;em&gt;principle of duality&lt;/em&gt; it stands to reason that I, you or anything in the whole wide world must innately have more than one existence in the space-time continuum. Thus, there is a &lt;em&gt;Sankash&lt;/em&gt; that exists alongside this one in some other world (known or unknown to humankind). And he is as real, or unreal for that matter as the &lt;em&gt;Sankash&lt;/em&gt; who owns this blog. That the two different &lt;em&gt;Sankashes,&lt;/em&gt; who are apparently unknown to each other now, were borne out of a single &lt;em&gt;Sankash &lt;/em&gt;is a school of thought that cannot be ruled out. It is just that each of them took a different turn at one of the many cross-roads they have come across in their life, and thereby chose not only different futures for themselves but also different destinies.&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;BR&gt;Skeptics will argue that I must be out of my mind (read insane) to write what I have written. In fact being insane is the most basic form of sanity that you can ever hope to manifest. To a &lt;em&gt;clinically&lt;/em&gt; (note the word clinically) healthy person a mentally retarded person is insane, but from the retarded person&#39;s perspective he himself is as sane as any other - may be for him, on the contrary, the clinically healthy person is insane. So, who is sane and who is not? Figure out the answer yourself. The fact of the matter is we are so busy looking at everything through the periscope of reason, trying to be reasonable all the time that we end up being reasonably unreasonable most of the time, if not all the time. We always keep looking for that line that tells right from wrong, reality from illusion, permanent from transient, mortality from immortality completely ignorant of the fact that the line was never there in the first place. All that you see, hear, feel is as real or unreal, as right or wrong, as good or bad as you perceive them to be.&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;BR&gt;So, is the &lt;em&gt;principle of duality&lt;/em&gt; reasonable or unreasonable? Only &lt;em&gt;you&lt;/em&gt; know the answer.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nebulasky.blogspot.com/feeds/1103950293580567463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2068794785432055688/1103950293580567463' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/1103950293580567463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2068794785432055688/posts/default/1103950293580567463'/><link rel='alternate' type='text/html' href='http://nebulasky.blogspot.com/2007/09/one-of-most-intriguing-subjects-that-i.html' title='Duality'/><author><name>Sankash Thakuria</name><uri>http://www.blogger.com/profile/07125918688592118177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>