Dear colleagues, good afternoon!
Here’s the situation in more detail. Let’s say I have a pool with a object occurrence (hereinafter referred to as the "document") on it. Model type -- MT_ENTERPRISE_BPMN_COLLABORATION. See the image.
In the script, I read all connections of the document, then delete the “definition” and the “instance” of the connection with type 87.
function deleteDocsCnxs(oldDocOccsArr){
for(var i=0;i<oldDocOccsArr.length;i++){
var tmpDocOccCnx = oldDocOccsArr[i].Cxns();
for (var j=0;j<tmpDocOccCnx.length;j++){
if(tmpDocOccCnx[j].getDefinition().TypeNum() == 87){
tmpDocOccCnx[j].getDefinition().Delete(false);
}
}
}
}
I thought that after this, I could delete the pool without deleting the documents within it. But it doesn’t work! Some kind of link between the document and the pool still remains. I have a script that shows all connections of an object, and it tells me that there are no more connections for the document. Nonetheless, the pool and document are still somehow linked, and if I delete the pool, the documents inside it are also deleted. How can I fix this?
Thank you!