Avatar

Level 2

Thank you Jasmin and Diego. Your replies made me look carefully at my code and I found that I was not updating the repository with Document without the Policy added. I was doing the following:

RMSecureDocumentResult protectDoc = documentManager.protectDocument(unproctDoc,                "yabby_traps_kill_platypus.pdf", policySet, lcPolicy.getName(), null, null, null);


r.getContent().setDataDocument(unproctDoc);

repositoryClient.updateResource(r.getPath(),r,false);

Instead I should have been doing the following:

RMSecureDocumentResult protectDoc = documentManager.protectDocument(unproctDoc,                "yabby_traps_kill_platypus.pdf", policySet, lcPolicy.getName(), null, null, null);


r.getContent().setDataDocument(protectDoc.getProtectedDoc());

repositoryClient.updateResource(r.getPath(),r,false);