AnsweredAssumed Answered

How to get Child Reference of  bpm:package

Question asked by swemon on Apr 25, 2012
Latest reply on Apr 27, 2012 by swemon
Dear all,

I want to get child reference of bpm:package from process definition file. I can get child file name and child's custom status in process definition file like that. I change custom status of the document in this file but it does not really change the custom status of document when I see document details page. Let me know if you have any solution.
for (var i = 0; i < bpm_package.children.length; i++) 
            {
               logger.log(bpm_package.children[i]);
               var doc = bpm_package.children[i];
               logger.log("Name:" + doc.properties['cm:name']);
               logger.log("Before Status:" + doc.properties['cm:customstatus']);
               doc.properties['cm:customstatus'] = "Completed";
               logger.log("After Status:" + doc.properties['cm:customstatus']);
               logger.log("Noderef:" + doc.properties['d:noderef']); //return null
               logger.log("Noderef:" + doc.noderef);//return undefined
            }

Thank in advance,
swemon

Outcomes