Check for delay in Document processing and set timeout

Hi,
I’m working on data extraction of multiple invoices using Document understanding. I need to check whether a document is getting extracted or not.For that, I need to set a timeout.If the timeout duration exceeds, the current document need to be skipped and the next document need to be processed. How to resolve this issue?

Adding few information for clarification in required workflow:
I need to check the timespan elapses for each process of document understanding.
And if the time exceeds the timespan for a particular process, mark that file somehow as erroneous and move on to the next file. The way of structuring loops is what important for workflow.