-
15. Re: unsual behaviour of workflow - problem in transforming
Aryan Anantwar Jan 18, 2019 3:27 AM (in response to seetharaman k)Hi,
Use
<content-type>text/html</content-type> for OOTB Send Email Workflow and try again.
Regards,
Aryan Anantwar
-
16. Re: unsual behaviour of workflow - problem in transforming
seetharaman k Jan 18, 2019 3:54 AM (in response to Aryan Anantwar)aryan i already checked , now also checked i have configured the adapter with content type as text/html
-
17. Re: unsual behaviour of workflow - problem in transforming
Alexander Li Jan 18, 2019 4:01 AM (in response to seetharaman k)1 of 1 people found this helpful -
18. Re: unsual behaviour of workflow - problem in transforming
seetharaman k Jan 18, 2019 5:58 AM (in response to Alexander Li)for the sake of all am giving this log
Edit: (Carl) Please do not post large log excerpts as text (refer to the rules). I have added this as an attachment.
-
Logs.txt 81.9 K
-
-
19. Re: unsual behaviour of workflow - problem in transforming
Aryan Anantwar Jan 18, 2019 5:37 AM (in response to seetharaman k)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.
Regards,
Aryan Anantwar
-
20. Re: unsual behaviour of workflow - problem in transforming
seetharaman k Jan 18, 2019 6:13 AM (in response to Aryan Anantwar)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 !!!
probably a person like Ranganath Samudrala or Gordon McKeown can explain why is this phenomena!!!!!1
-
21. Re: unsual behaviour of workflow - problem in transforming
Alexander Li Jan 18, 2019 4:28 PM (in response to seetharaman k)1 of 1 people found this helpfulHi Seetha,
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.
Regards,
Alexander
-
22. Re: unsual behaviour of workflow - problem in transforming
Carl WilsonJan 21, 2019 3:50 AM (in response to seetharaman k)
Hi,
as you have found, when you create a Context Item e.g. Assign Activity, it can be of a number of formats e.g.
- String
- Numeric
- Date
- XML (well formed)
- etc
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
Example input/s:
1. text/plain
2. text/html
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.
Cheers
Carl
-
23. Re: unsual behaviour of workflow - problem in transforming
seetharaman k Jan 22, 2019 2:59 AM (in response to Alexander Li)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.
-
24. Re: unsual behaviour of workflow - problem in transforming
seetharaman k Jan 22, 2019 3:52 AM (in response to Carl Wilson)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. !!!