cancel
Showing results for 
Search instead for 
Did you mean: 

how to remove last document from bpm_package

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
how to remove last uploaded document from bpm_package using javascript?
2 REPLIES 2

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
is there a way to remove Previously uploaded document into workflow???
I need this, so please if you know how, please tell me  :roll:

msvoren
Champ in-the-making
Champ in-the-making
Try this:

   bpm_package.removeNode(bpm_package.children[0]); //this will unattach document from the wf

    var new_doc = companyhome.childByNamePath("Docs/my.pdf");
        bpm_package.addNode(new_doc);   //this is how you add "my.pdf" to that same wf

Note that this code should be used inside wf javascript logic.
To use it from outside the wf, you need to somehow access bpm_package object.