How to Customize Notification Templates
In an email notification template, the block between the Windchill script beginSubject and endSubject are used to generate the email subject text. This block can be added anywhere within the <html> tag in the template.
Windchill script calls made from beginSubject and endSubject tag will customize the subject of the email where as Windchill script calls made from <body> tag will customize the body of the email.
For example:
<html>
<SCRIPT LANGUAGE=Windchill> <!-- beginSubject --> </SCRIPT>
<SCRIPT LANGUAGE=Windchill> <!-- getSubject --> </SCRIPT>
<SCRIPT LANGUAGE=Windchill> <!-- endSubject --> </SCRIPT>
</html>
In the above example, an email generated for notification will have of subject consisting of the methods defined in the “Subject” template mentioned above.
Alternatively, individual methods within Windchill tags can be added within the beginSubject and endSubject tags.
<SCRIPT LANGUAGE=Windchill>
<!-- beginSubject -->
</SCRIPT>
<SCRIPT LANGUAGE=Windchill>
<!-- getProcessName -->
</SCRIPT>
<SCRIPT LANGUAGE=Windchill>
<!-- getPrimaryBusinessObjectName -->
</SCRIPT>
<SCRIPT LANGUAGE=Windchill>
<!-- endSubject -->
</SCRIPT>
There are standard methods written for these notification types. These are listed below.
Common Methods
• addText text="<value>"
• getActivityName
• getActivityVariable varName="<Variable Name>" (not applicable for Notification Robot)
• getInitSubject
• getPrimaryBusinessObjectName
• getProcessName
• getProcessVariable varName="< Variable Name >"
Methods for Workflow Task Notification
• activityAttributes (This method shall be used in body only)
• activityNotificationUrl (This method shall be used in body only)
• getDeadline
Methods for Calendar Delegate Notification
• getDelegatedBy
• getDelegationDate
• getDelegationPeriod
Methods for Workflow Process Notification
• getDeadline
• getDeadLineLabel
• getOverdueTaskRow
• getOwnerRole
• getParentProcess
• getProcessManagerURL
• getState (This method shall only be used only be used for abort notification.
• projectLinkAttributes (This method shall only be used for projectlink notification body)
Methods for Workflow Notification Robot Notification
• activityDescription
• activityDescriptionPlain
• activityName
• getProcessManagerURL
• getProcessManagerURLPlain
• getProcessOverviewURL
• getProcessOverviewURLPlain
• messageText
• messageTextPlain
• primaryBusinessObjectLink
• primaryBusinessObjectLinkPlain
• processDescription
• processDescriptionPlain
• processName
• projectLinkAttributes (This method shall only be used for projectlink notification body)