<content-type>text/html</content-type> for OOTB Send Email Workflow and try again.
aryan i already checked , now also checked i have configured the adapter with content type as text/html
Have you tried using the XSLT I provided in my previous reply.
Also check the hierarchy of elements you have in your xslt, as Alexander pointed about the <table /> element.
If you need to share logs on your post, please try to attach as a file instead pasting it in discussion.
finally this is solved thanks a lot to Alexander Li . it got solved when i converted the same XML (which is actually my HTML code ) to XML string.
i used the community utility provided for this purpose. though it worked but i still did not understand the logic. i understand the fact that there are two type of inputs
xml and string. but all am doing is calling the mailing workflow (the one provided by bmc in OA SMTP ) in my workflow to render and send html emails. while the stand alone mailing workflow can directly consume the HTML content as input and give html email as output why not the same thing is happening inside my work flow when i use the launch job activity. once i passed the "XML string " as input to the body of the launch job activity it worked fine. still do not understand the logic behind !!!
1 of 1 people found this helpful
The reason why I suggest you to convert your html to xml string because I'm afraid that you will combine your html with another string.
If you did that, you will lose your xml format and the table won't rendered properly.
Normally when people create an email (even the automation one), you need to compose the email with following structure:
- Greetings (Dear All / Hi everyone/ Dear Operation Team / Dear Support Team / etc)
- Introduction (There are some anomaly data in IDOCS, Please check following table)
- Your Content : Table
- Footnote (Please follow up this to XXX team / Please check the anomaly data and edit it in IDocs / Please do not reply this email, this email is auto generated from automation)
From my experience, you wont create the email that only consists your table, you must compose using this email structure.
So to achieve this email structure, with "XML to XML String" helps, you won't lose the xml format of your table.
But still, this explanation didn't answer your question "Why when i put my html without any string in smtp body email, the smtp lose the xml format?"
Maybe someone can help you to answer this because I never put XML only in SMTP email before.
as you have found, when you create a Context Item e.g. Assign Activity, it can be of a number of formats e.g.
- XML (well formed)
When you define an input item on a workflow, this input will take on the format that is provided to the input i.e. XML, String, etc.
Certain workflow require certain formats, which if passing values in between the workflows you need to be aware of what the format is for that workflow i.e. for a Send Email process, this format for the "Body" of the email will be in a text (string) format - however it can take on the form of 2 different variants of a string as defined by the "content type" input (shown below from the input description):
Specify the content type of the body content to be set
If unsure, open the workflow and look at the input "Description". BMC provide the description of the input and examples of the format required for that input.
Richard provided the utilities to convert between the different formats as although a Context Item may appear to be XML, it could be an XML String that needs to be converted to an XML element (proper XML definition) before the workflow will accept it and execute correctly.
This, as you have found, can sometimes be a little tricky to get correct.
as the original question does not actually describe the problem discussed in the latter part of the thread am marking Ranga's answer as correct answer.
yes carl, completely agree with you. but as you know when a content type is text / html a simple html input in the body would be still valid and taken as a html input and corresponding output we can see in the body . but in my case what happened is though the content type is text/html the input html did not render properly. only when i converted the input xml to xml string and gave as input , the proper "table and stuffs" had come !!!
it worked when i give in the stand alone work flow.
it did not work when i give in a launch job which calls the above stand alone workflow. !!!