<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to override properly default notification behavior in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-override-properly-default-notification-behavior/m-p/319842#M6843</link>
    <description>&lt;P&gt;This one is a bit late, but it might be useful.
In my custom templates defined in ftl files referenced in extension point "templates" of  "org.nuxeo.ecm.platform.ec.notification.service.NotificationService", ${htmlEscape(docTitle)} works fine.
In Studio, it seems functions are not mapped the same way, so that I have to prefix the function : ${Fn.htmlEscape(docTitle)}&lt;/P&gt;</description>
    <pubDate>Thu, 05 Nov 2015 07:29:10 GMT</pubDate>
    <dc:creator>pibou_Bouvret</dc:creator>
    <dc:date>2015-11-05T07:29:10Z</dc:date>
    <item>
      <title>How to override properly default notification behavior</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-override-properly-default-notification-behavior/m-p/319841#M6842</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm really having a hard time with default workflow notification overriding in Nuxeo Studio.&lt;/P&gt;
&lt;P&gt;Planning to translate default messages I first translated given templates, an d got a first issue (default notifications were not overrided correctly).&lt;/P&gt;
&lt;P&gt;So I disabled default notifications, and wrote some new ones attached to the given templates and, it worked, except a mail was still sent at the proper end of the workflow to notify initiator that his document was approved.&lt;/P&gt;
&lt;P&gt;Thanks to posts found here I imported the content routing default template to figure out this email was hard coded in an automation chain. I've modified it and it didn't work.&lt;/P&gt;
&lt;P&gt;The previously working notification don't work neither.&lt;/P&gt;
&lt;P&gt;Here is the trace :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;xpression htmlEscape is undefined on line 1, column 35 in name.
The problematic instruction:
----------
==&amp;gt; ${htmlEscape(sender.firstName)} [on line 1, column 33 in name]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression htmlEscape is undefined on line 1, column 35 in name.
	at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
	at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
	at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:114)
	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
	at freemarker.core.Expression.getStringValue(Expression.java:93)
	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
	at freemarker.core.Environment.visit(Environment.java:208)
	at freemarker.core.MixedContent.accept(MixedContent.java:92)
	at freemarker.core.Environment.visit(Environment.java:208)
	at freemarker.core.Environment.process(Environment.java:188)
	at freemarker.template.Template.process(Template.java:232)
	at org.nuxeo.ecm.platform.ec.notification.email.EmailHelper.sendmail(EmailHelper.java:126)
	at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.sendNotification(NotificationEventListener.java:367)
	at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.sendNotificationSignalForUser(NotificationEventListener.java:270)
	at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.handleNotifications(NotificationEventListener.java:149)
	at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.handleEvent(NotificationEventListener.java:107)
	at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:164)
	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:150)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You may say I need to get rid of this htmlEscape invocation but no, i've removed every single htmlEscape pattern from template in studio and am still not able to make it &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I read quite a bunch of similar stories in nuxeo answer and it helped but i'm still stuck&lt;/P&gt;
&lt;P&gt;Can someone help me please ?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2013 14:40:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-override-properly-default-notification-behavior/m-p/319841#M6842</guid>
      <dc:creator>Antoine_Cordier</dc:creator>
      <dc:date>2013-01-25T14:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to override properly default notification behavior</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-override-properly-default-notification-behavior/m-p/319842#M6843</link>
      <description>&lt;P&gt;This one is a bit late, but it might be useful.
In my custom templates defined in ftl files referenced in extension point "templates" of  "org.nuxeo.ecm.platform.ec.notification.service.NotificationService", ${htmlEscape(docTitle)} works fine.
In Studio, it seems functions are not mapped the same way, so that I have to prefix the function : ${Fn.htmlEscape(docTitle)}&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2015 07:29:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-override-properly-default-notification-behavior/m-p/319842#M6843</guid>
      <dc:creator>pibou_Bouvret</dc:creator>
      <dc:date>2015-11-05T07:29:10Z</dc:date>
    </item>
  </channel>
</rss>

