<?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 How to override (replace) original free marker template of java end webscripts in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-override-replace-original-free-marker-template-of-java/m-p/66778#M22398</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to override (replace) the ftl file used by workflow related webscript in remote-api package? For example, file `workflow.lib.ftl` used by workflow webscripts, it's under the folder path:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/remote-api/config/alfresco/templates/webscripts/org/alfresco/repository/workflow/" title="https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/remote-api/config/alfresco/templates/webscripts/org/alfresco/repository/workflow/" rel="nofollow noopener noreferrer"&gt;https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/remote-api/config/alfresco/templates/webscripts/org/alfresco/repository/workflow/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found an article here:&amp;nbsp;&lt;A class="link-titled" href="https://gagravarr.livejournal.com/144845.html?view=557261#t557261" title="https://gagravarr.livejournal.com/144845.html?view=557261#t557261" rel="nofollow noopener noreferrer"&gt;Overriding Alfresco webscript library ftl files - Nick&lt;/A&gt;&amp;nbsp;&amp;nbsp;talking about overriding `workflow.lib.ftl` by copying it to same folder structure in a module, but I couldn't figure out where I should copy this file to in my module, so I was wondering what the correct path should be? I've tried to put it in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;resources/alfresco/templates/webscripts/org/alfresco/repository/workflow/workflow.lib.ftl&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN&gt;resources/META-INF/alfresco/&lt;SPAN&gt;templates/webscripts/org/alfresco/repository/workflow/workflow.lib.ftl&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;None of them works, please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Mar 2018 04:49:56 GMT</pubDate>
    <dc:creator>zhi_wang</dc:creator>
    <dc:date>2018-03-14T04:49:56Z</dc:date>
    <item>
      <title>How to override (replace) original free marker template of java end webscripts</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-override-replace-original-free-marker-template-of-java/m-p/66778#M22398</link>
      <description>Hi there,Is there a way to override (replace) the ftl file used by workflow related webscript in remote-api package? For example, file `workflow.lib.ftl` used by workflow webscripts, it's under the folder path:https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/remote-api</description>
      <pubDate>Wed, 14 Mar 2018 04:49:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-override-replace-original-free-marker-template-of-java/m-p/66778#M22398</guid>
      <dc:creator>zhi_wang</dc:creator>
      <dc:date>2018-03-14T04:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to override (replace) original free marker template of java end webscripts</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-override-replace-original-free-marker-template-of-java/m-p/66779#M22399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can not extend /override the lib ftl file and ideally&amp;nbsp;you should not o that.One place where this file is getting used it&amp;nbsp;&lt;STRONG&gt;task-list.get.html.ftl. &lt;/STRONG&gt;You should extend&amp;nbsp;task-list.get.html.ftl and do the customization which you would like to do it over there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Few link on how you can extend share is as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://soft29.info/blog/entry/alfresco-extend-share-javascript-component" title="http://soft29.info/blog/entry/alfresco-extend-share-javascript-component" rel="nofollow noopener noreferrer"&gt;Soft29 blog: Alfresco: extend Share javascript component&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://docs.alfresco.com/4.0/tasks/tu-share-FM-temp-customize.html" title="https://docs.alfresco.com/4.0/tasks/tu-share-FM-temp-customize.html" rel="nofollow noopener noreferrer"&gt;6. Customize Alfresco Share FreeMarker templates | Alfresco Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2018 11:00:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-override-replace-original-free-marker-template-of-java/m-p/66779#M22399</guid>
      <dc:creator>krutik_jayswal</dc:creator>
      <dc:date>2018-03-14T11:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to override (replace) original free marker template of java end webscripts</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-override-replace-original-free-marker-template-of-java/m-p/66780#M22400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply, Krutik,&amp;nbsp;but the workflow.lib.ftl in question is used by java-end webscripts, not share-end, I do find the workflow.lib.ftl you mentioned as well in share project, which path is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/workflow/workflow.lib.ftl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is to say, there are two workflow.lib.ftl files used by java-end and share-end respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've managed to&amp;nbsp;&lt;SPAN&gt;override&lt;/SPAN&gt; the java-end workflow.lib.ftl by manually copying customised version under folder:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tomcat/shared/classes/alfresco/extension/templates/webscripts/org/alfresco/repository/workflow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it's working well now, but I&amp;nbsp;couldn't figure out how to&amp;nbsp;do the same thing&amp;nbsp;via module installation, based on your reply, it seems that we're not able to extend or override the lib ftl file, maybe that's the reason why Alfresco doesn't pick my customised ftl&amp;nbsp;from my module although I put it in the same structure as that in tomcat/shared folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have to modify&amp;nbsp;this free marker template as we have a workflow process variable has the below shape:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;[[user1, user2], user3, user4]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Unfortunately, the workflow.lib.ftl can't parse this kind of variable as when loop through the variable, it&amp;nbsp;deems all the elements inside a sequence type variable can be convert to a string directly, while in our case, one of elements is sequence again and can't be converted to string directly, which cause an exception is thrown, so we have to modify the template to deal with&amp;nbsp;this case by ourselves.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, the issue has been solved for me and thank you for your help Krutik.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 03:36:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-override-replace-original-free-marker-template-of-java/m-p/66780#M22400</guid>
      <dc:creator>zhi_wang</dc:creator>
      <dc:date>2018-03-15T03:36:18Z</dc:date>
    </item>
  </channel>
</rss>

