Tuesday, November 20, 2012

Sending HTML Email With Embedded XML Content

Today I am checking out on how to send an html formatted email from a bpel process. Sharing my findings on this topic here -

This use case has 2 bpel processes -

  1. A reusable email process (hereafter REP) that sends the email using "Email" activity.
  2. A bpel process to prepare html of email and invoke the reusable email service.

I prepared an email format that will have few tables and xml message inside the table. For this I have used XSLT to build html from the bpel xml messages and assigned that html to email body of notification service. But this is not that straightforward as the email received was not properly formatted. The xml tags were all disappeared and only data values separated were shown.

Its because the bpel engine treated those xml tags as bpel variables. To avoid this first prepare the html and assign it to the input of REP.


Now inside the REP expand the email activity, open the assign and use toCDATA xsl function to populate ContentBody variable of email activity as shown in this image.


Now the email was well formatted and xml content rendered perfectly!!.

4 comments:

  1. Great insights! ui ux classes
    help turn ideas into intuitive, user-friendly designs.

    ReplyDelete
  2. An iOS app development class provides guided instruction. It focuses on practical coding. Structured lessons enhance clarity. Learners build confidence. This ios app development class supports success. It is dependable.

    ReplyDelete
  3. An ios mobile app development course focuses on building apps for iPhone and iPad. It includes real-time practice. This ios mobile app development course prepares learners for careers. It is dependable.

    ReplyDelete
  4. "Great post! Our ui design course online
    covers everything from wireframing to prototyping, helping you design user-centric digital experiences that stand out."

    ReplyDelete

Demystifying OIC, OCI and Oracle SOA CS

What is OIC (Oracle integration cloud), OCI (Oracle cloud infrastructure), and SOA cloud service and how they are different? - This has bee...