cancel
Showing results for 
Search instead for 
Did you mean: 

Restore Archived Node from Java Service

pmrreddy
Champ on-the-rise
Champ on-the-rise

Hi ,

I am Writing a Java Custom Service where i need to restore node that archived recently, i have the noderef Id and am calling the ArchiveService.restoreNode to its original node But its failing as Unable to find Archive Node : archive://SpacesStore/1591d364-96d8-4a5e-9881-a46a4f535f75,
But when i go through the node browser I am able to find the Node. can any one help me to solve the issue.

my code:
I have a Id : workspace://SpaceStore/1591d364-96d8-4a5e-9881-a46a4f535f75


NodeRef nodeRef = new NodeRef("workspace://SpaceStore/1591d364-96d8-4a5e-9881-a46a4f535f75");
RestoreNodeReport restoreNodeReport =  nodeArchiveService.restoreArchivedNode(nodeRef);


I am using Alfersco 4.0.e

Regards
param
1 REPLY 1

s_palyukh
Star Contributor
Star Contributor
Hi,

I think you should use "archive" instead of "workspace".

NodeRef nodeRef = new NodeRef("archive://SpacesStore/1591d364-96d8-4a5e-9881-a46a4f535f75");RestoreNodeReport restoreNodeReport = nodeArchiveService.restoreArchivedNode(nodeRef);‍‍‍‍‍