<?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: Error when using Fn functions in mail template (5.6) in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-fn-functions-in-mail-template-5-6/m-p/328441#M15442</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Actually you can't use "Fn" in your context. If you look at the help documentation in Studio for the mail template the are tow different sections:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;one for variables available in the context of using the "SendEmail" operation and&lt;/LI&gt;
&lt;LI&gt;one for  variables avaliable in the context of configuring a notification to be sent when a task is assigned during a workflow&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Mon, 16 Dec 2013 12:34:07 GMT</pubDate>
    <dc:creator>Mariana_Cedica</dc:creator>
    <dc:date>2013-12-16T12:34:07Z</dc:date>
    <item>
      <title>Error when using Fn functions in mail template (5.6)</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-fn-functions-in-mail-template-5-6/m-p/328440#M15441</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Within studio I created a workflow with a mail template associated to the task assignment. I would like to put user informations in the template using the Fn functions, but it does not work :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;...
org.nuxeo.ecm.core.api.ClientException: Failed to send notification email
...
Caused by: freemarker.core.InvalidReferenceException: Expression Fn is undefined on line 1, column 157 in template_notificationTache.
	at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
	at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
...
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have this in the mail template :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;${Fn.getPrincipal(WorkflowVariables["precedentActeur"]).getLastName()}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The studio documentation says it is possible to use ${Fn} functions in mail template context. Why is it not working in my case ? &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2013 11:32:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-fn-functions-in-mail-template-5-6/m-p/328440#M15441</guid>
      <dc:creator>ganie_</dc:creator>
      <dc:date>2013-11-13T11:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Error when using Fn functions in mail template (5.6)</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-fn-functions-in-mail-template-5-6/m-p/328441#M15442</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Actually you can't use "Fn" in your context. If you look at the help documentation in Studio for the mail template the are tow different sections:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;one for variables available in the context of using the "SendEmail" operation and&lt;/LI&gt;
&lt;LI&gt;one for  variables avaliable in the context of configuring a notification to be sent when a task is assigned during a workflow&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 16 Dec 2013 12:34:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-fn-functions-in-mail-template-5-6/m-p/328441#M15442</guid>
      <dc:creator>Mariana_Cedica</dc:creator>
      <dc:date>2013-12-16T12:34:07Z</dc:date>
    </item>
  </channel>
</rss>

