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!!.

Saturday, November 10, 2012

XML with Name-Value Pair

To retrieve the value from name-value pair xml as presented below -


<Parameters>
  <Item>
    <Name>Guid</Name>
    <Value>20101130121706</Value>
  </Item>
  <Item>
    <Name>Timestamp</Name>
    <Value>20101130121604</Value>
  </Item>
  <Item>
    <Name>TimeofArrival</Name>
    <Value>20101130161705</Value>
  </Item>
  <Item>
    <Name>Part</Name>
    <Value>20101130161236</Value>
  </Item>
  <Item>
    <Name>SiteID</Name>
    <Value>1520537</Value>
  </Item>
</Parameters>

Use the xpath - /Parameters/Item[Name='Guid']/Value

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...