I'm trying to get a workflow to transform the document located in the workflow package to a pdf. I can get that far, but as soon as i change it to put the transformed pdf in a different location my workflow just silently errors. I'm sure its just a tiny error somewhere but any help would be highly appreciated.
Working, only transform
for (var i = 0; i < bpm_package.children.length; i++) {
var node = bpm_package.children;
var transform = node.transformDocument("application/pdf");
}
Not working, transform to a diffrent location
for (var i = 0; i < bpm_package.children.length; i++) {
var node = bpm_package.children;
var nodeDest = companyhome.childByNamePath("Sites/test/documentLibrary/destination");
var transform = node.transformDocument("application/pdf", nodeDest);
}