UiPath Activities

The UiPath Activities Guide

Validation Station Integration

The example below explains how to automatically extract data, classify documents, extract the specified fields from the documents, prepare all information for validation, and display the extracted documents. It presents activities such as IntelligentOCR Scope, Classify Document, Process Document, Prepare Validation Station Data, and Present Validation Station. You can find these activities in the UiPath.IntelligentOCR.Activities package.

Note:

This workflow is using an older version of the UiPath.IntelligentOCR.Activities package.

This is how the automation process can be built:

  1. Open Studio and create a new Process named by default Main.
  2. Drag an IntelligentOCR Scope activity in the Workflow Designer.
  3. Select the Do container placed inside the IntelligentOCR Scope activity and create the following variables:
Variable Name
Variable Type
Default Value

classification

String

-

processedDoc

UiPath.IntelligentOCR.FC.FCDocument

-

validatedDoc

UiPath.IntelligentOCR.FC.FCDocument

-

field

UiPath.IntelligentOCR.FC.FCField

-

ValidationData

UiPath.IntelligentOCR.FC.ValidationStationAdapters.ValidationStationData

-

HumanValidated

UiPath.DocumentProcessing.Contracts.Results.ExtractionResult

-

FolderValues

System.String[]

-

TableValues

UiPath.DocumentProcessing.Contracts.Results.TableFieldValue[][][]

-

  1. Drag an Assign activity inside the Do container.
    • Add the variable FolderValues in the To field and the expression Directory.GetFiles("Input") in the Value field.
  2. Drag a For Each activity below the Assign activity.
    • Add the value item in the ForEach field.
    • In the Properties panel, select the String option from the TypeArgument drop-down list.
    • Add the variable FolderValues in the Values field.
  3. Select the Body container inside the For Each activity and create the following variable:
Variable Name
Variable Type
Default Value

ClassificationResult

String

-

  1. Drag a Classify Document activity inside the Body container.
    • In the Properties panel, add the expression {Directory.GetCurrentDirectory + "\Invoice.fcdot", Directory.GetCurrentDirectory + "\Letters.fcdot" } in the DefinitionFiles field.
    • Add the expression item.ToString in the SourceDocument field.
    • Add the variable ClassificationResult in the Result field.
  2. Drag a Message Box activity under the Classify Document activity.
    • In the Properties panel, select the option Ok from the Buttons drop-down list.
    • Add the expression "Document type is: " + ClassificationResult in the Text field.
    • Select the check-box for the TopMost option. Doing so, the message box is always displayed to the foreground.
  3. Drag a Process Document activity under the Message Box activity.
    • In the Properties panel, add the expression {Directory.GetCurrentDirectory + "\Invoice.fcdot", Directory.GetCurrentDirectory + "\Letters.fcdot" } in the DefinitionFiles field.
    • Add the value item.ToString in the Document field.
    • Add the variable processedDoc in the Result field.
  4. Drag a Prepare Validation Station Data activity below the Process Document activity.
    • In the Properties panel, add the variable processedDoc in the Document field.
    • Add the variable ValidationData in the ValidationStationData field.
  5. Drag a Message Box activity under the Prepare Validation Station Data activity.
    • In the Properties panel, select the option Ok from the Buttons drop-down list.
    • Add the expression "Document was processed with confidence score: " + processedDoc.Confidence.ToString in the Text field.
    • Select the check-box for the TopMost option. Doing so, the message box is always displayed to the foreground.
  6. Drag a Present Validation Station activity and place it under the Message Box activity.
    • In the Properties panel, add the expression ValidationData.ExtractionResults in the AutomaticExtractionResults field.
    • Add the expression ValidationData.Dom in the DocumentObjectModel field.
    • Add the value item in the DocumentPath field.
    • Add the expression ValidationData.RawText in the DocumentText field.
    • Add the expression ValidationData.Taxonomy in the Taxonomy field.
    • Add the variable HumanValidated in the ValidatedExtractionResults field.
  7. Drag a For Each activity below the Present Validation Station activity.
    • Add the value item in the ForEach field.
    • In the Properties panel, select the option UiPath.UiPath.DocumentProcessing.Contracts.Results.ResultsDataPoint from the TypeArgument drop-down list.
    • Add the expression HumanValidated.ResultsDocument.Fields in the Values field.
  8. Place a Log Message activity inside the Body container of the For Each activity.
    • Select the option Info from the Level drop-down list.
    • Add the expression item.FieldName in the Message field.
  9. Place another Log Message activity below the first Log Message activity.
    • Select the option Info from the Level drop-down list.
    • Add the expression item.Values(0).Value.ToString in the Message field.
  10. Drag a Write Line activity under the Log Message activities.
    • Add the value "" in the Text field.
  11. Drag an Assign activity below the For Each activity.
    • Add the variable TableValues in the To field.
    • Add the expression HumanValidated.GetTableFieldValue("CustomGroup.CustomCategory.Invoice.InvoiceTable") in the Value field.
  12. Drag a For Each activity and place it below the Assign activity.
    • Add the value row in the ForEach field.
    • In the Properties panel, select the option UiPath.DocumentProcessing.Contracts.Results.TableFieldValue[] from the TypeArgument field.
    • Add the variable TableValues in the Values field.
  13. Place a For Each activity inside the Body of the previously added For Each activity.
    • Add the value item in the ForEach field.
    • In the Properties panel, select the option UiPath.DocumentProcessing.Contracts.Results.TableFieldValue from the TypeArgument field.
    • Add the value row in the Values field.
  14. Drag a Log Message activity in the Body container of the last For Each activity.
    • Select the option Info from the Level drop-down list.
    • Add the expression item.RawValue in the Message field.
  15. Run the process. The robot extracts data automatically, classifies the documents, extracts specific field, prepares the data for validation and displays the extracted documents.
     
     
    Download example

Updated 5 months ago


Validation Station Integration


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.