activities
latest
false
UiPath logo, featuring letters U and I in white

Document Understanding Activities

Last updated Dec 5, 2024

Validation station

This page shows you how to create a workflow that includes activities such as Digitize Document, Data Extraction Scope, and Present Validation Station.

You can use these activities when you want 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 following 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 you can replace it with any other of our OCR engines. A simple taxonomy is used, created based on the chosen invoice document. Visit Taxonomy overview to check how to create your taxonomy.

Creating the workflow

  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:
    1. Variable Name: taxonomy;
    2. Variable Type: DocumentTaxonomy;
    3. Default Value: None.
  4. Add a Load Taxonomy activity inside the Sequence container.
    Add the variable taxonomy in the Taxonomy field.
  5. Add a For Each activity after the Load Taxonomy activity, and inside the Sequence container.
    • 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 variables showed in the following table:
    Table 1. The variables to be created
     

    Variable Type

    Default Value

    docName

    GenericValue

    N/A

    dom

    Document

    N/A

    text

    String

    N/A

    extractionResults

    ExtractionResult

    N/A

    validatedResults

    ExtractionResult

    N/A
  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 after the Assign activity.
    Add the expression "Digitizing "+docName in the Text field.
  9. Add a Digitize Document activity after 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 after the Digitize Document activity.
    Add the expression docName+" was digitized." in the Text field.
  12. Add a Write Line activity after the Write Line activity.
    Add the expression "Opening the Validation Station" in the Text field.
  13. Add a Try Catch activity after 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 after 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.
Visit the following link to download a ZIP archive of the example: Example.

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.

  • Creating the workflow
  • Using the Validation Station

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.