<?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: Workflow script to copy document in same folder and continue workflow with new document in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/workflow-script-to-copy-document-in-same-folder-and-continue/m-p/32592#M13798</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using activiti or alfresco ECM?&lt;BR /&gt;This looks more like an ECM workflow question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 May 2017 16:38:47 GMT</pubDate>
    <dc:creator>gdharley</dc:creator>
    <dc:date>2017-05-11T16:38:47Z</dc:date>
    <item>
      <title>Workflow script to copy document in same folder and continue workflow with new document</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/workflow-script-to-copy-document-in-same-folder-and-continue/m-p/32591#M13797</link>
      <description>Hi allFor one of my workflows, I want to be able to select a document in my start task. Then, I would like to execute a script to make a copy of this document in the same folder, and continue the workflow with the new document (if this is possible). I don't have much java experience but I'm trying t</description>
      <pubDate>Thu, 11 May 2017 15:48:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/workflow-script-to-copy-document-in-same-folder-and-continue/m-p/32591#M13797</guid>
      <dc:creator>marcollirite</dc:creator>
      <dc:date>2017-05-11T15:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow script to copy document in same folder and continue workflow with new document</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/workflow-script-to-copy-document-in-same-folder-and-continue/m-p/32592#M13798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using activiti or alfresco ECM?&lt;BR /&gt;This looks more like an ECM workflow question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 16:38:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/workflow-script-to-copy-document-in-same-folder-and-continue/m-p/32592#M13798</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-05-11T16:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow script to copy document in same folder and continue workflow with new document</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/workflow-script-to-copy-document-in-same-folder-and-continue/m-p/32593#M13799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Greg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is for a workflow within Alfresco (using the activiti engine). I may have got confused about the two categories, but I thought ECM would be mainly for content modelling/structuring and BPM would be for everything workflow related?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 08:51:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/workflow-script-to-copy-document-in-same-folder-and-continue/m-p/32593#M13799</guid>
      <dc:creator>marcollirite</dc:creator>
      <dc:date>2017-05-12T08:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow script to copy document in same folder and continue workflow with new document</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/workflow-script-to-copy-document-in-same-folder-and-continue/m-p/32594#M13800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found a solution to this. First we copy the document using the .parent property of bpm_package and assign it to a new variable. Then we can remove the original document from bpm_package and add the new one in it's place, as with the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var newdoc = bpm_package.children[0].copy(bpm_package.children[0].parent);&lt;BR /&gt; bpm_package.removeNode(bpm_package.children[0]);&lt;BR /&gt; bpm_package.addNode(newdoc);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 10:00:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/workflow-script-to-copy-document-in-same-folder-and-continue/m-p/32594#M13800</guid>
      <dc:creator>marcollirite</dc:creator>
      <dc:date>2017-05-12T10:00:00Z</dc:date>
    </item>
  </channel>
</rss>

