Wednesday, May 7, 2008

Insert New Line Character in BPEL Payload

Today my colleague has an interesting requirement. He need to interact with a legacy application which accepts input in CSV format. In the input first row should contain operation name, second row should contain all the column names and the next row is the data row. He was using Oracle BPEL to integrate legacy application with new application infrastructure. He was having data in a canonical business object and want to generate the required input CSV format.

The major challenge for him was to transform the business object into the input CSV which is having three rows. As he was a Java developer in the past, he tried using \n to insert new line character with no luck. Then he tried 
 which is the correct one to insert a new line character in an XML payload but when he executed the BPEL flow, 
 was inserted rather than the line break.

The trick to insert the new line character in XML payload from Oracle BPEL is to append 
 in the from expression of assign activity, then check your .bpel file it would have 
 rather than 
 because Jdeveloper replaces & with its equivalent escape character &. You need to replace & with & so it would become the correct new line character 
.

18 comments:

Marinus Snyman said...

Thanks for this post! You saved me a day before my presentation!

Nirav chhaya said...

This has been very helpful. Thanks.

Thiago Lechuga said...

Nice.
I had da same problem with ESB BPEL.
You just saved a lot of time here.
Thanks :)

Unknown said...

Thanks a lot it worked for me also.

bree mady said...

Hi .. Very Urgent Please :

I am using a concat() funtcion with append in Bpel , and i need to insert a new line character after a string .

Eg: concat('String1','String2', '\n').

I couldnt insert new line using the &13#; i have tried it witha nd without quotes

Apeksha Jha said...

There are 2 things to keep in mind while inserting new line character:-
-use a transformation file
- go to source in transformation file to enter the value '
' and dont go to design view after editing the newline feed as the design view alters the value of newline feed and you will have to correct it again

Anonymous said...

Excellent blog post! Stimulates me to read much more of your work. I’ll bookmark your page so I can go back here.

www.n8fan.net

Leslie Lim said...

It is great to have the opportunity to read a good quality article with useful information on topics that plenty are interested on.

www.imarksweb.org

Naviya Nair said...

I have read your blog its very attractive and impressive. I like it your blog.

Java Online Training Java EE Online Training Java EE Online Training Java 8 online training Core Java 8 online training

Java Online Training from India Java Online Training from India Core Java Training Online Core Java Training Online Java Training InstitutesJava Training Institutes

Ramya Krishnan said...

i went through your blog, thanks for your technical information. really useful for me.
once again thanks for your valuable info and time.
Java Training in chennai

chitra pragya said...

The site was so nice, I found out about a lot of great things. I like the way you make your blog posts. Keep up the good work and may you gain success in the long run.
angularjs Training in btm

angularjs Training in electronic-city

angularjs online Training

angularjs Training in marathahalli

angularjs interview questions and answers

sakthi said...

Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information.

rpa training in chennai
rpa training in bangalore
rpa course in bangalore
best rpa training in bangalore
rpa online training

shri yadav said...

This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.
online Python training
python training in chennai

sudhagar raja said...

I am really happy with your blog because your article is very unique and powerful for new reader.
Click here:
selenium training in chennai | selenium course in chennai
selenium training in bangalore | selenium course in bangalore
selenium training in Pune | selenium course in pune | selenium class in pune
selenium training in Pune | selenium course in pune | selenium class in pune
selenium online training | selenium training online | online training on selenium

johnsy sai said...

Really you have done great job,There are may person searching about that now they will find enough resources by your post
Devops Training courses
Devops Training in Bangalore
Best Devops Training in pune
Devops interview questions and answers

dhanya sridhar said...

Thanks a lot for sharing us about this update. Hope you will not get tired on making posts as informative as this. 
Data Science course in Indira nagar
Data Science course in marathahalli
Data Science Interview questions and answers
Data science training in tambaram | Data Science Course in Chennai
Data Science course in btm layout | Data Science training in Bangalore
Data science course in kalyan nagar | Data Science Course in Bangalore




john jersy said...

Just stumbled across your blog and was instantly amazed with all the useful information that is on it. Great post, just what i was looking for and i am looking forward to reading your other posts soon!
python Training institute in Pune
python Training institute in Chennai
python Training institute in Bangalore

sheela said...

A very nice guide. I will definitely follow these tips. Thank you for sharing such detailed article. I am learning a lot from you.
Best Devops training in sholinganallur
Devops training in velachery
Devops training in annanagar
Devops training in tambaram