AnsweredAssumed Answered

Workflow script to copy document in same folder and continue workflow with new document

Question asked by marcollirite on May 11, 2017
Latest reply on May 12, 2017 by marcollirite

Hi all

 

For 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 to achieve something along the lines of:

 

<script>

      var path = bpm_package.children[0].displayPath;
      var newdoc = bpm_package.children[0].copy(path);
      newdoc.save();
      bpm_package = newdoc;

</script>

 

Any help would be greatly appreciated!

 

Marcus

Outcomes