Parallel For Each not working Properly During Document Understanding

Hi All,

I was Just trying to run Document Understanding code for 2 different dummy invoices placed in a single input folder. I am retrieving the file paths with Directory.getfiles() and using a Parallel for each to digitize, Classify and Extract. Presenting the Validation task in Action center. Earlier I have been doing the same and it would work fine. The process would run for both the documents place them in Action center for validation and go on suspended mode. Now it seems that the Parallel for each is running on both the invoices at the same time, digitizing and classifying them at the same time, Hence when it tries to create an validation action in Action is gives the below error when it reaches create validation action activity.

22.4.0+Branch.master.Sha.0d4d7d3b0782bfa991b5e27402aa6a5cc826af0f

Source: Create Document Validation Action

Message: The automatically determined extracted results references do not match the Document Object Model. They may have been created using a different Document Object Model.

Exception Type: UiPath.DocumentUnderstanding.Persistence.OrchestratorException

RemoteException wrapping UiPath.DocumentUnderstanding.Persistence.OrchestratorException: The automatically determined extracted results references do not match the Document Object Model. They may have been created using a different Document Object Model.
at UiPath.IntelligentOCR.Activities.BaseOrchestratorClientAsyncActivity.ThrowIfNeeded(Task task, Boolean suppressThrowException)
at UiPath.IntelligentOCR.Activities.BaseOrchestratorClientAsyncActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

I have enabled persistence support for the project and also installed UiPath.persistance.activities as well.

Not sure what am i doing wrong and if any one could help me on this it would be great.

Has the working/Functioning of the parallel for each changed with the new release?

Thanks and Regards,
Rajiv

Hi Community,

Any help on this regard would be highly appeciated.

Thanks in advance!

Hi @Raj-iv ,

Have you Checked the Suggestions in the below post. There might be variables which are outside of the scope being overwritten or may be the variables are not of a Serializable Type :

Also, we already have a Template of Document Understanding Ready to be used Present in the Templates Section of Studio :

1 Like

Hey, @Raj-iv ,
Can you share the workflow you are using and tell us which package versions you are using?

Thanks!

Hi @Raj-iv,
Iā€™m guessing there is an issue on how the workflow was built here. Please use the Document Understanding Process as described by @supermanPunch. That is the only official solution for any enterprise grade implementations.