cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a document programmatically

jmiranda
Champ in-the-making
Champ in-the-making
Hi!

I need to attach a document from the repository to a custom workflow by using javascript when the workflow has not been started from a file. I've tried "bpm_package = mydocnode" but it doesn't work Smiley Sad, I think I have to add a child to bpm_package but I don't know how to do this.

Is it possible?

Thanks!
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

adding a document to the package via JavaScript should be as simple as

var childNode = search.findNode("<nodeRef>");
bpm_package.addNode(childNode);

Regards
Axel

jmiranda
Champ in-the-making
Champ in-the-making
Thank you! I'll try it

Regards.