<?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: Change name of uploaded file in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/change-name-of-uploaded-file/m-p/25760#M11131</link>
    <description>&lt;P&gt;Fortunately I found something related. I changed the code a bit to my needs and it looks like this:&lt;/P&gt;&lt;PRE&gt;import com.activiti.service.runtime.RelatedContentService;
import com.activiti.domain.runtime.RelatedContent;

List&amp;lt;RelatedContent&amp;gt; contentList = relatedContentService.getFieldContentForProcessInstance(execution.getProcessInstanceId(), "contract", 1, 0).getContent();
RelatedContent content = contentList.get(0);
content.setName("Contract");&lt;/PRE&gt;&lt;P&gt;This works superb. Maybe it could help you as well. Just parse it to a groovy Scripttasks and your are g2g.&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2019 10:50:33 GMT</pubDate>
    <dc:creator>Jannik</dc:creator>
    <dc:date>2019-12-13T10:50:33Z</dc:date>
    <item>
      <title>Change name of uploaded file</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/change-name-of-uploaded-file/m-p/25759#M11130</link>
      <description>&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;I searched everything and can't find an appropriate answer - so I need your help!&lt;/P&gt;&lt;P&gt;My Process made with APS (Enterprise) starts with a form where the users can upload a contract (the id in that field is "contract"). Thing is, I want to unify that file to the filename "contract.docx".&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Example: User uploads file "something.docx" and then it's published to ACS as "contract.docx".&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;For this I know I have to call the variable containing this file, but I can't find it - and the mess is that it is not stored in "contract", like all other variables from formfields are handled. In activiti-admin I can see the variable "contract" but it is "null".&lt;/P&gt;&lt;P&gt;So, do you know what to call exactly and further - how to change the filename?&lt;/P&gt;&lt;P&gt;Thanks and cheers,&lt;/P&gt;&lt;P&gt;Jannik&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 09:44:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/change-name-of-uploaded-file/m-p/25759#M11130</guid>
      <dc:creator>Jannik</dc:creator>
      <dc:date>2019-12-13T09:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Change name of uploaded file</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/change-name-of-uploaded-file/m-p/25760#M11131</link>
      <description>&lt;P&gt;Fortunately I found something related. I changed the code a bit to my needs and it looks like this:&lt;/P&gt;&lt;PRE&gt;import com.activiti.service.runtime.RelatedContentService;
import com.activiti.domain.runtime.RelatedContent;

List&amp;lt;RelatedContent&amp;gt; contentList = relatedContentService.getFieldContentForProcessInstance(execution.getProcessInstanceId(), "contract", 1, 0).getContent();
RelatedContent content = contentList.get(0);
content.setName("Contract");&lt;/PRE&gt;&lt;P&gt;This works superb. Maybe it could help you as well. Just parse it to a groovy Scripttasks and your are g2g.&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 10:50:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/change-name-of-uploaded-file/m-p/25760#M11131</guid>
      <dc:creator>Jannik</dc:creator>
      <dc:date>2019-12-13T10:50:33Z</dc:date>
    </item>
  </channel>
</rss>

