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:
var path = bpm_package.children.displayPath;
var newdoc = bpm_package.children.copy(path);
bpm_package = newdoc;
Any help would be greatly appreciated!