pbustin Outstanding Contributor.
Outstanding Contributor.
3527 views

I can't get the $emailresponse sample template to work

Jump to solution
I can't get the $emailresponse sample template from the app admin guide to work, in the sense that no notification is sent. Plugging the $emailresponse lines from the sample into my existing, working, default.htm template also failed.

Sample:

$BEGINSUBJECT()$NOTIFICATION() - $ITEMNUMBER() $TTID()$ENDSUBJECT()

$NOTIFICATION() - $ITEMNUMBER() $TTID()

$IF(AUXTABLE)$ELSE()$ENDIF()














$STRING(IDS_EMAIL_DISPLAYVALUE): $ITEMNUMBER()
$SYSFIELDNAME(TS_SYSFLD_TEXT_DISPLAYID): $ITEMNUMBER()
$SYSFIELDNAME(TS_SYSFLD_TITLE): $TITLE()

To send 'Evaluating' notification to Submitter, click
style="background: #11356D; color: white; display: inline-block; width: auto;
text-align: center;text-decoration:none;">NotifyHDSubmitter



$IF(CANVIEW)$IF(VIEWLINK)
$STRING(IDS_EMAIL_TOVIEW) $ITEMTYPENAME(): $LINK( TRUE )$ENDIF()$ENDIF()


$IF(CANVIEW)$FIELDS()$ENDIF()


$emailresponse lines from sample plugged into existing default.htm:

$BEGINSUBJECT()$NOTIFICATION() - $ITEMNUMBER() $TTID()$ENDSUBJECT()



$NOTIFICATION() - $ITEMNUMBER() $TTID()




$IF(AUXTABLE)

$ELSE()


$ENDIF()

$STRING(IDS_EMAIL_DISPLAYVALUE):$ITEMNUMBER()
$SYSFIELDNAME(TS_SYSFLD_TEXT_DISPLAYID):$ITEMNUMBER()
$SYSFIELDNAME(TS_SYSFLD_TITLE):$TITLE()

To send 'Evaluating' notification to Submitter, click
style="background: #11356D; color: white; display: inline-block; width: auto;
text-align: center;text-decoration:none;">NotifyHDSubmitter





$IF(CANVIEW)
$IF(VIEWLINK)
$STRING(IDS_EMAIL_TOVIEW) $ITEMTYPENAME(): $LINK( TRUE )
$ENDIF()
$ENDIF()




$IF(CANVIEW)
$FIELDS()
$ENDIF()





0 Likes
1 Solution

Accepted Solutions
Highlighted
pbustin Outstanding Contributor.
Outstanding Contributor.

Re: I can't get the $emailresponse sample template to work

Jump to solution
I got it working; evidently had not carefully enough edited the lines.

View solution in original post

4 Replies
pbustin Outstanding Contributor.
Outstanding Contributor.

Re: I can't get the $emailresponse sample template to work

Jump to solution
Entry in notification log:

00000 INFO 23-03-2016 11:24:30 [Events] -- Initial send for event 324335, Tbl:ItemId 1003:43999, sending notification 'TS HD: A Help Desk item was submitted by an end user (Phil)'
00000 ERROR 23-03-2016 11:24:30 [Events] -- Failed to format e-mail message.
java.lang.StringIndexOutOfBoundsException: String index out of range: 4
at java.lang.String.substring(String.java:1907)
at com.serena.sbm.ns.templates.renderers.NotificationTemplateTagRenderer_EMAILRESPONSE.createBaseUrl(NotificationTemplateTagRenderer_EMAILRESPONSE.java:127)
at com.serena.sbm.ns.templates.renderers.NotificationTemplateTagRenderer_EMAILRESPONSE.render(NotificationTemplateTagRenderer_EMAILRESPONSE.java:72)
at com.serena.sbm.ns.templates.NotificationTemplateTagRenderer.render(NotificationTemplateTagRenderer.java:27)
at com.serena.sbm.ns.templates.TagDispatcher.renderTag(TagDispatcher.java:209)
at com.serena.sbm.ns.templates.FileTemplate.renderTag(FileTemplate.java:272)
at com.serena.sbm.ns.templates.FileTemplate.process(FileTemplate.java:235)
at com.serena.sbm.ns.templates.EmailTemplate.process(EmailTemplate.java:131)
at com.serena.sbm.ns.templates.ServicesTemplate.process(ServicesTemplate.java:77)
at com.serena.sbm.ns.templates.NotificationTemplate.process(NotificationTemplate.java:234)
at com.serena.sbm.ns.process.EMailEventService.formatMailMessage(EMailEventService.java:577)
at com.serena.sbm.ns.process.EMailEventService.sendMessage(EMailEventService.java:429)
at com.serena.sbm.ns.process.EMailEventService.sendEvent(EMailEventService.java:334)
at com.serena.sbm.ns.process.EMailEventService.sendNotification(EMailEventService.java:152)
at com.serena.sbm.ns.process.EventServiceImpl.process(EventServiceImpl.java:384)
at com.serena.ns.core.job.NSProcessJob.execute(NSProcessJob.java:58)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
00000 ERROR 23-03-2016 11:24:30 [Events] -- An error occurred while processing the 'TS HD: A Help Desk item was submitted by an end user (Phil)' notification for the 'Phil Bustin' user.
0 Likes
pbustin Outstanding Contributor.
Outstanding Contributor.

Re: I can't get the $emailresponse sample template to work

Jump to solution
The sample htm works when I remove the $emailresponse lines.
0 Likes
pbustin Outstanding Contributor.
Outstanding Contributor.

Re: I can't get the $emailresponse sample template to work

Jump to solution
I used 'internal' in the html $emailresponse section, although I don't know exactly what setting matches that in the Configurator Notification page.
0 Likes
Highlighted
pbustin Outstanding Contributor.
Outstanding Contributor.

Re: I can't get the $emailresponse sample template to work

Jump to solution
I got it working; evidently had not carefully enough edited the lines.

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.