It is possible to update the content of the document stored in the Trading Networks. You can even reprocess the document after changing the content without submitting it as a new document unless if you do not do any modification to the document identifying fields but its not advisable to change the content of the document stored in TN.
Basically all Tn documents are stored in a table in TN. You have to get the document from that table update the document and again save it in the same table. Each document is stored with an unique DocID to identify the document.
Query the BizDoc table for the given senderID and receiverID to get DocID.
All documents are stored in BizDocContent table with field name as content and datatype Blob.
Qeury the BizDocContent table with the DocID to get the Blob for the given DocID.
Convert the blob into string using custom java code and save it to the file. Also save the DocID to the file.
Make changes to the file content and again convert it into string and then into Blob.
Update the BizDocContent table with this Blob for the corresponding DocID.
I tried and it worked.
You will have an updated content in the TN database.