How to resubmit the archived document

Dear Friends,

How we can reinstate the TN archived document and resubmit?
I have tried below script to reinstate the document to actual TN tables, but when I resubmit the document, we are getting ‘NullPointerException: null’ error
Please advise how to resubmit the archived document. Thanks

begin tran
Declare @DocID varchar(30) Set @DocID='0ahu7o0v6jvrft290000360q ’
Insert into TNDB1.dbo.BizDoc Select * From TNDB1.dbo.ARCHIVE_BizDoc where DocID=@DocID
Insert into TNDB1.dbo.BizDocAttribute Select * From TNDB1.dbo.ARCHIVE_BizDocAttribute where DocID=@DocID
Insert into TNDB1.dbo.BizDocContent Select * From TNDB1.dbo.ARCHIVE_BizDocContent where DocID=@DocID
Insert into TNDB1.dbo.BizDocRelationship Select * From TNDB1.dbo.ARCHIVE_BizDocRelationship where DocID=@DocID
Insert into TNDB1.dbo.BizDocUniqueKeys Select * From TNDB1.dbo.ARCHIVE_BizDocUniqueKeys where DocID=@DocID
Insert into TNDB1.dbo.DeliveryJob Select * From TNDB1.dbo.ARCHIVE_DeliveryJob where DocID=@DocID
Insert into TNDB1.dbo.ActivityLog Select * From TNDB1.dbo.ARCHIVE_ActivityLog where RelatedDocID=@DocID
Insert into TNDB1.dbo.EDITracking Select * From TNDB1.dbo.ARCHIVE_EDITracking where DocID=@DocID
Delete TNDB1.dbo.ARCHIVE_BizDoc where DocID=@DocID
Delete TNDB1.dbo.ARCHIVE_BizDocAttribute where DocID=@DocID
Delete TNDB1.dbo.ARCHIVE_BizDocContent where DocID=@DocID
Delete TNDB1.dbo.ARCHIVE_BizDocRelationship where DocID=@DocID
Delete TNDB1.dbo.ARCHIVE_BizDocUniqueKeys where DocID=@DocID
Delete TNDB1.dbo.ARCHIVE_DeliveryJob where DocID=@DocID
Delete TNDB1.dbo.ARCHIVE_ActivityLog where RelatedDocID=@DocID
Delete TNDB1.dbo.ARCHIVE_EDITracking where DocID=@DocID
rollback tran


This going to be ticky…Did you check all the correlated bizdocs/ids that was archived and reinstated?

I don’t think there is an easier way unless some DBA also needs involved.


This is something which you are trying to do from backend tables directly. You are moving the archived record into the actual tables, then from MWS or TN Console you are trying to re-submit it.

The parent-child relationships between the tables are important when you deal from the backend, and there is no support if something goes wrong in this way.

From your message, it looks like, you are able to move the record from archived tables to actual tables without any issues and you can view it from MWS Transaction Analysis page.

I see few of the tables you have missed to move the data from… BizDocArrayAttribute, EDIStatus, BizDocTypeAttribute… Move these data as well and give it a try…


Hi Maitri,
If you are on 8.2.2, go through the readme of TNS_8.2_SP2_Fix2. Just in case if it helps…

OTN-6538 The Resubmit and Reprocess actions do not appear to work on archived data. When the Resubmit and Reprocess actions are performed on production data, Trading Networks writes these actions to the activity log. When these actions are performed on archived data, however, no entries are written to the activity log. This gives the impression that these actions were not performed. This issue is resolved. Trading Networks now correctly writes entries to the activity log when Resubmit and Reprocess actions are performed on archived data.