Document Understanding Activities
Last updated Jul 15, 2024

ClassifierAsyncCodeActivity Class

Namespace: UiPath.DocumentProcessing.Contracts.Classification
Assembly: UiPath.DocumentProcessing.Contracts



An abstract class that implements the UiPath.DocumentProcessing.Contracts.Classification.IClassifierActivity interface and the System.Activities.Async.CodeActivity abstract class.
This class must be implemented in order to construct a CodeActivity for document classification that is compatible with the Classify Document Scope activity and the document processing infrastructure.
In order to implement this abstract class, the BeginExecute() and EndExecute() methods need to be overridden.

All the defined InArguments are automatically populated by the Classify Document ScopeClassify Document Scope activity for all child activities.

The InArguments contain:

Information about the document that is to be classified, specifically the original file path, the text version, and the document object model.

Information about the document types expected to be understood and processed by the classifier activity. These document types are set by the Classify Document Scope activity after their configuration in the Configure Classifiers wizard of the scope activity.

The OutArgument contains a list of classification results, in a ClassifierResult.

For example:

If a classifier is able to classify an entire file as being either a Contract or an Annex, then the ClassifierResult should contain one entry in the Classifications list, with the highest confidence classification and the ResultsDocumentBounds covering the entire document.
If a classifier is able to classify parts of a file as being either a Contract or an Annex, then the ClassifierResult should contain as many entries in the Classifications list, as the classifier was able to identify, each with its own ResultsDocumentBounds. The page range must be disjunctive.


  • ClassifierAsyncCodeActivity() - The protected default constructor.
  • GetCapabilities() - Retrieves, at design time, a list of document types the classifier is capable of classifying. This method is called only at design time, and as such it should not use any InArgument(s).
  • ProvidesCapabilities() - Returns true if the classifier is able to provide a list of capabilities.
  • DocumentPath InArgument<string> - The path to the document file.
  • DocumentText InArgument<string> - The text version of the document.
  • DocumentObjectModel InArgument<UiPath.DocumentProcessing.Contracts.Dom.Document> - The document object model of the document.
  • DocumentTypes InArgument<UiPath.DocumentProcessing.Contracts.Classification.ClassifierDocumentType[]> - The document type information that you want the classifier to take into account.
  • PersistenceId string - The unique, opaque ID that is used by the scope activities in order to correctly track and configure the classifier activity.
  • ClassifierResult OutArgument<UiPath.DocumentProcessing.Contracts.Classification.ClassifierResult> - The output of the classifier activity.
  • PredictionId InArgument<string> - Identifies that the same document is processed in a workflow. It's composed of DocumentId+ JobId.
  • Description
  • Description
  • Members

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.