Document understanding: how does the bot know that document was marked as exception?

The Bot tries to read the document with a Form extractor, and if not all fields were extracted, sends it to Orchestrator for manual validation. Human can mark document as exception. However, I cannot find the way to relay this information back to the robot. I know, that in this case there is no output_results.zip in Storage bucket. However it does not help much, as document may simply be not validated yet. I could not find any other file, which would contain information, that document was marked as exception.

I don’t use a Wait for document validation action, as the bot should not pause while document is being validated and continue on with other transactions.

How should the bot know that a particular document was marked as exception by human validator?

Hi @jreddy

You can use Parallel For Each here, if it doesn’t involves any UI interaction for going to the next transaction.

@jreddy

One option is to use create tasks and save all the task objects and then use parallel for each for wait for resume task and pass the task objects in for loop

Another way is to add them to another queue and you can use get tasks activity to get task details and check if it is exception or completed sucessfully

Cheers

Hi @jreddy

When the document is sent to Orchestrator for manual validation, assign a unique identifier to the document. This identifier can be a unique document ID, transaction ID, or any other suitable identifier that can be used to track the document.

Set up a mechanism for the human validator to mark the document as an exception. This could be done through a separate user interface or a specific action within the validation process. When the document is marked as an exception, capture this information along with the unique identifier of the document.

Store this information in a suitable location or system. This could be a database, a separate file, or any other means of persisting data.

Modify your bot’s logic to periodically check or query the stored information to determine if a particular document has been marked as an exception.

When the bot identifies that a document has been marked as an exception, it can then take appropriate actions or follow an alternative workflow specific to handling exceptions.

Thanks!!

By “Tasks” you mean Document Validation action? Second option would be the best for me. But how can I update the status of those tasks? What activity to use for that?

Ho should I capture the event “Document marked as exception”? Are there any API/custom activity for that? UiPath does not seem to save that information anywhere. At least I could not find it in any of the documents generated by the system (e.g. output_results.json). I’m still on version 21.4 though. Is this different in newer versions?

@jreddy

The task status is not updated by you…once the validation task is completed you would use get task to get the details…but for this you have to use form
Taks…

If you are going with valudation task then you need to collect all the task and use parallel for each to wait

Cheers

So it seems that there is no built in solution for this type of workflow. However, I found a workaround using Orchestrator APIs. Here is how I did it (on premise orchestrator):

  1. If your robot user does not have permission to view Tasks, you’ll need to authenticate with a user who has that permission. For this call the Endpoint api/Account/Authenticate with a correct login data in request body.

  2. Call /odata/Tasks/UiPath.Server.Configuration.OData.GetTasksAcrossFoldersForAdmin to get list of all the tasks, iterate over it and find a relevant one. Here you might want to use some unique identifiers in task name, as it will be the easiest way to identify a correct task. Then grab an if of that task.

  3. Lastly, call /tasks/GenericTasks/GetTaskDataById with a previously retrieved task id as parameter. Response will contain a section DocumentRejectionReason, if the task was marked as exception, so just check it it is not null.

It is a bit cumbersome, but this way you can build unattended bots with deferred manual validation. For more information on orchestrator APIs refer to the swagger page.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.