Jey,
I can’t vouch it to be the best way, but here’s how I handle this in my flow that gets the status.
Create a document query (based on receiver id, sender id, attribs, etc. - whatever is applicable in your case) and execute it to get results as a document list. Then loop over these results and within that loop create a taskQuery (for each document received by the TN a new task is created), joined on the document id (results/DocID) and document timestamp (results/DocTimestamp). The result of the task will show up as either PENDING, FAILED or DONE, which reflects the actual status of the processing.
In my scenario, I have to do an extra step of filtering of the results obtained from the document query, based on the timestamp of the document… you too might have to use a some additional logic to ensure that you create a task query just for the document that you are interested in. In other words… you will need to find a way to uniquely identify your document(s) that you want to find the status of.
HTH,
Rohit
#Integration-Server-and-ESB#B2B-Integration#webMethods