Query to get user who resubmitted TN document

Hi All,

I am querying for all documents that were resubmitted in TN (createDocumentQuery) and getting USER NAME of the user who resubmitted the document (getEvents). I have to generate an email with my above findings.

I am looping over each document that was resubmitted (extracting docID) and providing it as an input to getEvents service to get USER NAME.

Is this the best way to get my desired output or is there a service that i could use to get (docID and USER NAME)

   Any help would be appreciated.