Hello,
I would like to receive a recommendation to solve a problem to move a document from o temporally folder to the final one.
I save the document to the final folder with no problem, but when I apply the "unlink" method the file still in the temporally folder yet.
Any suggestion to remove the document from the temporally folder and preserve the document into the definitive folder?
I'm using DOCUMENTUM COMPOSER 6.6 and follow the code to unlink the object:
Thank you very much!
//criaFolder(strNomePasta, strCaminhoDocumentum, session)
IDfSysObject bvmfDoc = (IDfSysObject)session.getObject(colFolderContent.getId("r_object_id"));
String strPastaFinal = "Solicitação de Retirada";
System.out.println("St Tipo:" + strPastaFinal);
// Criar ou utilizar a pasta de empresa existente
IDfSysObject newEmpresaFolder = (IDfSysObject) criaFolder(strEmpresa, strCaminhoSolicRetirada, session);
// Criar ou utilizar a pasta final existente
IDfSysObject newFolder = (IDfSysObject) criaFolder(strPastaFinal, strCaminhoSolicRetirada + "/" + strEmpresa, session);
//tira da estrutura temporaria
bvmfDoc.unlink(bvmfDoc.getFolderId(0).getId());
//linka na nova estrutura
//idfSysobject.link(newFolder.getFolderId(0).getId());
System.out.println("Solicitante: " + strCaminhoSolicRetirada + "/" + strEmpresa + "/" + strPastaFinal);
bvmfDoc.link(strCaminhoSolicRetirada + "/" + strEmpresa + "/" + strPastaFinal);
bvmfDoc.save();