I’m using webMethods 10.5 version and I’m trying to send document list values in the form of table using pub.client:smtp service. The value of the input parameter ‘body’ of the service pub.client:smtp is as below.
INPUT:
%LOOP docList%
ABC
DEF
%value value1%
%value value2%
%ENDLOOP%
Note: I have unchecked the checkbox - perform pipeline variable substitution.
Output:
The email is getting generated with the email body as it is , and the code didn’t get executed as expected.
I have seen many posts on this, but no solution is provided. I’m facing the same problem as mentioned in the following post.
Please provide me your valuable suggestions on this.
I did build a similar requirement, but I’m struggling to see your picture in my head since you say -
Do you mean variables aren’t substituted or the flow step(s) didn’t execute?
Can you post a screenshot of the flow steps and the actual email so I can help you better?
Update - I just noticed this comment, but this must be selected to substitute the variables with actual data, or did I forget DSPs (been years, I concede)?
Can you check and ensure that your pipeline variables (docList, value1 and value2) are present (and available) for this substitution?
You can add a log invocation just before this step, to check.
Having said that, I can’t recall if the Tag Directives are case sensitive; see this page for version 10.11 (link).
Hi,
I tried the debugLog, I could see the values getting logged in the server logs. But, the email body is not framed , it is still showing the dsp code in the email body. Do I need to do any extra settings for the dsp code to get executed?
Hi John,
Thanks for your reply. I tried to use the service ‘pub.report:runStringTemplateOnPipe’ service, and the input provided is the ‘simpleTemplate.template’ which is placed under ‘Integration Server_directory\packages\packageName \templates’.
After executing the flow step, where the ‘pub.report:runStringTemplateOnPipe’ service is called, the output I see is the template name, $txt value is returned as ‘simpleTemplate.template’. Does that mean, the input is wrong? is my template not getting invoked?
Hi there,
You don’t need to create a file template for runStringTemplateOnPipe, it’s the simplest one. You can just enter your text directly into input $template.
I have attached a screenshot for clarity, I just coded this in 30 secs and it works
@Venkata_Kasi_Viswanath_Mugada1, I’m actually a big angular/react developer fan. However, I also love DSP because you can use them very easily to format verbose file formats that are mostly static or even create a simple dashboard for admin purposes, and it only take 15 minutes to develop and is super light-weight. few kb’s at most.
John.
Hi John,
Thank you! I could able to loop over the list and see the values. But, I want to sent them to the mail in the form of tabular column. When I’m enclosing them in
%loop doclist1%
%endloop%
ABC
%value ABC%
the html tags are not getting replaced, I’m not able to see the content in the form of table. How can I achieve this?
Please use the below code, it should work. Thanks -- Arul ChristhuRaj.
<html>
<body>
<h1>List of Services and Its current state</h1>
<p>Hi, <br>Below are the details of the services</p>
<table align="center" border="1" width="90%" style="font-family:calibri;font-size:13px;">
<tr>
<td>Service</td>
<td>State</td>
</tr>
%loop docList1%
<tr>
<td>%value service%</td>
<td>%value execState%</td>
</tr>
%endloop%
</table>
<p>Regards,<br>Team ABC</p>
</body>
</html>
I have used the above pasted code in the template and I got the below in the email content. The loop got executed, but the table structure is not getting populated.