<?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: Transform Copy and new versions. in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172722#M125922</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would be interested in a copy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Feb 2009 18:57:02 GMT</pubDate>
    <dc:creator>opoplawski</dc:creator>
    <dc:date>2009-02-11T18:57:02Z</dc:date>
    <item>
      <title>Transform Copy and new versions.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172718#M125918</link>
      <description>I have a transform/copy rule on my "Approved" space. I add a file "myFile.doc"&amp;nbsp; The file is transformed and copied to my "Published" directory …Great!Now when I put a new version of "myFile.doc" into the approvedRaw space I get an error and a .tmp file shows up in the published directory that tells</description>
      <pubDate>Wed, 21 May 2008 19:34:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172718#M125918</guid>
      <dc:creator>invantix</dc:creator>
      <dc:date>2008-05-21T19:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Transform Copy and new versions.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172719#M125919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No replies&amp;nbsp; &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://connect.hyland.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&amp;nbsp;&amp;nbsp; and I still can't figure this one out.&amp;nbsp; It came up again today.&amp;nbsp; The approval rule fails if an older version of the file with the same name is there.&amp;nbsp; The error message is:&amp;nbsp; Failed to approve the document due to system error: Duplicate child name not allowed: QCF 069.doc&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A simple workflow that looks great in the demo but is not so simple in practice.&amp;nbsp; Am I doung something strange?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 19:20:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172719#M125919</guid>
      <dc:creator>invantix</dc:creator>
      <dc:date>2008-06-30T19:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Transform Copy and new versions.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172720#M125920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have exactly the same problem, did you find any workaround ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Julien Bonjean&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 20:08:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172720#M125920</guid>
      <dc:creator>jbonjean</dc:creator>
      <dc:date>2009-02-03T20:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Transform Copy and new versions.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172721#M125921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I found a workaround. The simple workflow moves approved document to a temporary folder in which I made an Inbound rule that executes a little javascript script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This script check destination folder :&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;If document already exists, content is overwritten by new content and version number is incremented (using Alfresco versioning system);&lt;BR /&gt;If not, document is simply moved in destination directory.&lt;/UL&gt;&lt;SPAN&gt;If somebody is interrested by this script, please let me know and I will post it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Julien Bonjean&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 22:16:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172721#M125921</guid>
      <dc:creator>jbonjean</dc:creator>
      <dc:date>2009-02-10T22:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Transform Copy and new versions.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172722#M125922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would be interested in a copy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2009 18:57:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172722#M125922</guid>
      <dc:creator>opoplawski</dc:creator>
      <dc:date>2009-02-11T18:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Transform Copy and new versions.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172723#M125923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, it is a really small script. As it's the first time I make a script for Alfresco, it may be weird. Any suggestion is welcome.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The "temporary folder" must be a subfolder of destination space (to prevent space name hardcoding).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;//////////////////////////////////////////////////////&lt;BR /&gt;// File Name: move_version.js&lt;BR /&gt;//&lt;BR /&gt;// Purpose : Move a file from a folder to a target&lt;BR /&gt;// folder (which must be actually parent folder). If file&lt;BR /&gt;// already exists in target folder it uses versioning to&lt;BR /&gt;// replace file and increase version number.&lt;BR /&gt;//&lt;BR /&gt;// Author: Julien Bonjean (julien@bonjean.info) &lt;BR /&gt;//&lt;BR /&gt;// Creation Date: 2009-02-10&lt;BR /&gt;// Last Modified: 2009-02-10 16:26:10 -0500&lt;BR /&gt;//////////////////////////////////////////////////////&lt;BR /&gt;&lt;BR /&gt;var sourceFile = document;&lt;BR /&gt;var sourceFolder = document.parent;&lt;BR /&gt;var targetFolder = space.parent;&lt;BR /&gt;var targetFile = targetFolder.childByNamePath(document.name);&lt;BR /&gt;&lt;BR /&gt;if(targetFile == null)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceFile.move(targetFolder);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var targetFileWorkingCopy = targetFile.checkout();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;targetFileWorkingCopy.content = sourceFile.content;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;targetFileWorkingCopy.checkin("",false);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceFile.remove();&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/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wed, 11 Feb 2009 20:29:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172723#M125923</guid>
      <dc:creator>jbonjean</dc:creator>
      <dc:date>2009-02-11T20:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Transform Copy and new versions.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172724#M125924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, that does help a bit.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2009 18:22:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172724#M125924</guid>
      <dc:creator>opoplawski</dc:creator>
      <dc:date>2009-02-12T18:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Transform Copy and new versions.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172725#M125925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've use the script and ended up with a problem when the file already exist in the destination folder: the content of the file get broken when the file is a PDF.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To reproduce: Use the file &lt;/SPAN&gt;&lt;A href="http://tinyurl.com/ann-es-pdf" rel="nofollow noopener noreferrer"&gt;http://tinyurl.com/ann-es-pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What happen is when the destination file do exist, the jscript do :targetFileWorkingCopy.content = sourceFile.content;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspect that because sourceFile.content is in utf-8, there is a decoding/coding charset problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alfresco exemple in the wiki does not help much as all they do is : targetFileWorkingCopy.content = "here is some content";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll try to find a solution next week and post it but if you are more jscript/Alfresco fluent than me and find a solution, please let know.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Sep 2010 15:46:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transform-copy-and-new-versions/m-p/172725#M125925</guid>
      <dc:creator>boucher64</dc:creator>
      <dc:date>2010-09-04T15:46:54Z</dc:date>
    </item>
  </channel>
</rss>

