Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
I want to change the subject Line of email notification which is triggered by the activity. How we can do it?
Solved! Go to Solution.
So generally if you try to define more strings together it does not work
If you use only your custom method it works?
Or it does not work with your custom method.
My experience is that the easiest way is to build the subject information in workflow task variable and then read it in the html template definition.
It worked for me. I did not find any other way how to do that.
Actually there is other option. Build own method to send own email notification.
PetrH
Hi @Pushpak_Old
I you do not want to change name the task I would suggest to modify Notification HTML pages by changing NotificationRobot_<language>.html in
<WT_HOME>\codebase\templates\workNotification
A Windchill help describes explanation what is in the files. And also there is description how to add a subject to email.
Article describes how to change a Email subject same as in help.
btw the getProcessVariable varName="< Variable Name >" is very useful to retrieve information from workflow parameter.
Hope this can help.
PetrH
Hi @HelesicPetr ,
Thanks for your response !!!!!!!
The way you suggested it is correct but how we can call our own custom method inside the subject?
Do you know the way actually I created one method and I gave the path but it is not going inside that method.
Hi @Pushpak_Old
it is tricky :D.
You can not call your method from html template, or I never call own method inside the html template definition (to much effort :D)
You need to call the method inside a workflow, save a value to a workflow variable and then use getProcessVariable in the html template definition
Hope this can help
PetrH
Hi @HelesicPetr ,
Actually I added subject of the mail from Html body using below command-
<SCRIPT LANGUAGE=Windchill>processSubTemplate ACTION=GetProjectName ACTION_CLASS=ext.xyz.utils.IFXTaskNotifTemplateProcessor</SCRIPT>
Here GetProjectName is other HTML Page and in that one I gave-
<SCRIPT language=Windchill> <!-- getProjectName --> </SCRIPT>
So it is working for body of the mail but when I am trying in between subject tag is not working.
is there any other way we can do it?
what are you trying?
You want to concatenate more strings together in the subject?
PetrH
@HelesicPetr yes i want activityName + Task Name(Complete/correct) + Project Name(Which is attached to respective CN)
So first aactivity name and Task name I got from OOTB Method but for project Name I have to use own code so because of that I need it?
So generally if you try to define more strings together it does not work
If you use only your custom method it works?
Or it does not work with your custom method.
My experience is that the easiest way is to build the subject information in workflow task variable and then read it in the html template definition.
It worked for me. I did not find any other way how to do that.
Actually there is other option. Build own method to send own email notification.
PetrH