Forum Stats

  • 3,874,089 Users
  • 2,266,676 Discussions
  • 7,911,721 Comments

Discussions

DbAdapter result - inserted into an e-mail

MikeWasouski
MikeWasouski Member Posts: 15
edited Oct 16, 2009 12:58PM in BPEL
I need to send by e-mail the state of a set of data every time a task is complited, to more than one e-mail adress, the resultset is something about 40 lines and 5 columns, so I don't have idea how to format the data to be presentable in an e-mail, how to insert carriage return into the e-mail body?

thanks I solved by:
<from expression="ora*:processXSLT('Transformation_1.xsl'*,bpws:getVariableData('Invoke_1_BDSelect_OutputVariable','CatUsersCollection','/ns3:CatUsersCollection'))"/>
<to variable="varNotificationReq" part="EmailPayload"
query="/EmailPayload/ns1:Content/ns1:ContentBody/ns1:MultiPart/ns1:BodyPart[1]/ns1:ContentBody"/>

and in the xsl transfomation_1
1)add the schema
xmlns:ns3="http://xmlns.oracle.com/pcbpel/adapter/db/top/BD
2)add the style code :)
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<table border="1">
<xsl:for-each select="/ns3:CatUsersCollection/ns3:CatUsers">
<tr>
<td>
<client:notserviceProcessResponse>
<client:result>
<xsl:value-of select="ns3:idUser"/>
<!--xsl:value-of select="/ns3:CatUsersCollection/ns3:CatUsers[1]/ns3:email"/-->
<!--xsl:value-of select="/client:EnviaNotificacionProcessRequest/client:email"/-->
</client:result>
</client:notserviceProcessResponse>
</td>
<td>
<client:notserviceProcessResponse>
<client:result>
<xsl:value-of select="ns3:email"/>
</client:result>
</client:notserviceProcessResponse>
</td>
<td>
<client:notserviceProcessResponse>
<client:result>
<xsl:value-of select="ns3:idfactory"/>
</client:result>
</client:notserviceProcessResponse>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>

Edited by: MikeWasouski on Oct 16, 2009 9:50 AM
Tagged:

Answers

  • 714022
    714022 Member Posts: 450
    edited Oct 13, 2009 10:15PM
    email body supports html use <break> this will sove your issue. instead of break use br

    Edited by: user11082822 on Oct 13, 2009 7:13 PM

    Edited by: user11082822 on Oct 13, 2009 7:14 PM
  • pavan4s
    pavan4s Member Posts: 451
    Hi

    You write an XSL like below and call this XSL in your body of email.
    I think by doing this way ur problem will be soved.



    <?xml version="1.0" encoding="windows-1252" ?>

    <xsl:stylesheet version="1.0"

    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

    xmlns:xs="http://www.w3.org/2001/XMLSchema"

    xmlns:ns0="http://xmlns.oracle.com/LoadReceivable812IB"

    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"

    exclude-result-prefixes="xsl ns0 xs xp20"

    >

    <!-- Root template -->

    <xsl:output method="html" encoding="UTF-8" />

    <xsl:template match="/">

    <html>

    <head>

    <title></title>

    <meta http-equiv="content-style-type"

    content="text/css" />

    <style type="text/css"

    media="screen, print, projection">

    <xsl:comment>

    ul { font: 13px arial } li { font: 13px arial }

    p { font:bold 13px arial } pre { font:bold 13px

    arial } td { font: 13px arial } font { font:

    13px arial } th { font:bold 13px arial }

    </xsl:comment>

    </style>

    </head>

    <body>

    <p>

    <font face="Cambria" size="12">

    <xsl:value-of select='xp20:current-dateTime()'/>



    Fusion Middle Ware processed an EDI812 document with



    <table border="0">

    <tr>

    <td colspan="2"></td>

    </tr>

    <tr>

    <td colspan="2" >Customer</td>

    <td>

    <xsl:value-of select="/ns0:emailParamelement/ns0:Customer"/></td>

    </tr>

    <tr>

    <td colspan="2">ISA Control </td>

    <td>

    <xsl:value-of select="/ns0:emailParamelement/ns0:ISAControl"/>

    </td>

    </tr>

    <tr>

    <td colspan="2">Num Adjustments </td>

    <td><xsl:value-of select="/ns0:emailParamelement/ns0:numofAdjust"/></td>

    </tr>

    <tr>

    <td colspan="2">Filename </td>

    <td><xsl:value-of select="/ns0:emailParamelement/ns0:Filepath"/></td>



    </tr>

    </table>

    </font>

    </p>

    </body>

    </html>



    </xsl:template>

    </xsl:stylesheet>


    Regards

    PavanKumar.M
    pavan4s
This discussion has been closed.