Activities
latest
false
Document Understanding Activities
Last updated Jul 15, 2024

Validation station

Data extraction and validation can be fun and easy when using the Validation Station wizard. Below you can find details about creating a workflow that includes activities such as Digitize Document, Data Extraction Scope, and Present Validation Station.

You can make use of these activities when in need to automate data extraction and validation from documents of the same type. Invoices or purchase orders are a great fit for these kind of tasks.

The below workflow focuses on using the Digitize Document activity on an Invoice, followed by validating the information with the use of the Present Validation Station activity. The OCR engine chosen for this workflow is UiPath® Document OCR but feel free to replace it with any other of our OCR engines.

The taxonomy is also a simple one, created based on the used Invoice document. Here are more details about how to create your taxonomy.

Creating the workflow

This is how the automation process can be built:

  1. Open Studio and create a new Process named by default Main.
  2. Drag a Sequence container into the Workflow Designer.
  3. Select the Sequence container and create the following variable:

    Variable Name

    Variable Type

    Default Value

    taxonomy

    DocumentTaxonomy

     
  4. Drag a Load Taxonomy activity inside the Sequence container.

    • Add the variable taxonomy in the Taxonomy field.
  5. Drag a For Each activity below the Load Taxonomy activity.

    • Add the expression doc in the ForEach field.
    • Add the expression directory.GetFiles("TestData\InputDocs\") in the In field.
    • In the Properties panel, select the option String from the TypeArgument dropdown list.
  6. Select the Body container of the For Each activity and create the following variables:

    Variable Name

    Variable Type

    Default Value

    docName

    GenericValue

     

    dom

    Document

     

    text

    String

     

    extractionResults

    ExtractionResult

     

    validatedResults

    ExtractionResult

     
  7. Add an Assign activity inside the Body container.

    • Add the variable docName in the To field.
    • Add the expression System.IO.Path.GetFileNameWithoutExtension(doc) in the Value field.
  8. Add a Write Line activity below the Assign activity.

    • Add the expression "Digitizing "+docName in the Text field.
  9. Add a Digitize Document activity below the Write Line activity.

    • Set the DocumentPath as doc.
    • Add the variable text in the DocumentText field.
    • Add the variable dom in the DocumentObjectModel field.
  10. Drag an OCR engine into the Digitize Document activity. UiPath Document OCR is used for this example.
  11. Add a Write Line activity below the Digitize Document activity.

    • Add the expression docName+" was digitized." in the Text field.
  12. Add a Write Line activity below the Write Line activity.

    • Add the expression "Opening the Validation Station" in the Text field.
  13. Add a Try Catch activity below the Write Line activity.
  14. Add a Sequence container in the Try section.
  15. Add a Present Validation Station activity inside the Sequence container.

    • Add doc as value in the DocumentPath field.
    • Add the variable text in the DocumentText field.
    • Add the variable dom in the DocumentObjectMOdel field.
    • Add the variable taxonomy in the Taxonomy field.
    • Add the variable extractedResults in the AutomaticExtractionResults field.
    • Add the variable validatedResults in the ValidatedExtractionResults field.
  16. Add a Write Text File activity below the Present Validation Station activity.
  17. 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 from here.

Using the Validation Station

Running the workflow opens the Validation Station wizard. Here you can verify the extracted information or extract it yourself by using the Tokens or Custom Area options. If you set a field in the taxonomy as multi-value, then multiple values can be extracted for that field. This can be useful for documents with multiple addresses, different currencies, etc.

Let's see how you can toggle between the Tokens or Custom Area options.



Here is an example of how to add an extra value to a field.



More information about how to use and customize the Validation Station can be found here.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.