Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
passing variable to email
sachin_sharma78
I just gone thru lots of earlier posts to solve my probs but still i m at zero. Actually I have to pass a variable from workflow to my email so that i can display it as a URL link in email. From templatebasedemail.pdf i came to know that i'll have to pass it to ccmail_htmlbody.tpl to get displayed. Here is the snippet of my workflow where i m passing variable "param".
<externaltask name="Email_WME" owner="__TAG__('iw_user');" description="Completion notification to WME">
__INSERT__("<areavpath v='$area_vpath'/>");
<successors>
<successorset description="WME to Review">
<succ v="Review"/>
</successorset>
</successors>
__INSERT__(get_cmd("iw_solution_email.ipl", "Review"));
<variables>
<variable key="iw_mailheader_pt" value="reviewer_iwmailheader.tpl"/>
<variable key="iw_mailbody_pt" value="reviewer_iwmailbody.tpl"/>
<variable key="iw_mailbody_text_pt" value="reviewer_textbody.tpl"/>
<variable key="param" value="__INSERT__($heading);"/>
</variables>
</externaltask>
Can any body plz tell me how to pass it to ccmail_htmlbody.tpl and access it in the same tpl coz i cudnt get success. My TS version is 6.1
any help will b appreciated,
Regards,
sachin
Find more posts tagged with
Comments
sachin_sharma78
Hi TS Gurus,
Could someone reply to this post.
Regards,
Sachin
Migrateduser
The way the solutions email stuff works is that it writes out an xml file in /iw-home/tmp and references that file when it calles iwpt_compile.ipl on the the tpl for the headers and body. The file will be named something along the lines of task_output<taskid>.xml. It's going to have the xml for two tasks in it, task[0] is the current task (i.e. the one sending the mail), task[1] is the task that you told it you would be transition to (with the -t argument). Each of those elements will have a <variables> element in it. You can use iw_iterate or iwpt_dcr_list to iterate over those variables until you find the one with the right name and pull its value.
Alternatively, since you have the taskid, you can instantiate a WFtask object in the tpl and grab it from there. There are no direct examples of this in the solutions tpls, but the there are several examples of getting job variables from a WFjob object. The paradigm is essentially the same.