Use this tab to define a validation rule for a folder.

Validation rules control the structure of folders. You can use a validation rule to define the number of documents in a folder and set conditions such as, "The folder must have at least 10 documents." A message appears when the validation fails.

Alternatively, you can use business rules to create complex validation logic that can be used during validation of a folder structure. Use one or more business rules in a folder to help in validating a folder contents at runtime. You can also associate business rule validators with a field in a folder type. When a business rule is executed to validate a field and the rule fails, every field associated with the rule is marked as invalid.

Important A validation rule only runs for the Document review activity; it does not run for the Validation activity.

  1. Navigate to Capture > Folders.

    The Folders page appears.

  2. Open the folder for which to create the validation rule.

    The Folder page opens in a new browser tab.

  3. On the properties panel of the folder, click the Validation tab.
  4. To apply this rule to all subfolders within a folder, select Include sub folders.

    For example, when you choose to include subfolders and select number of documents for validation, the validation adds number of documents in the folder where the rule is defined and number of documents in the subfolders when evaluating the rule.

    Note If a subfolder fails the validation, the validation for the parent folder also fails, even though the parent folder might meet the rule requirement.
  5. Click .

    The New folder validation rule dialog box is displayed.

  6. Enter a Name for the rule.
  7. Select the Type of rule. Available options are:



    Number of documents (default)

    Checks the specified number of documents inside a folder at the time of extraction.

    1. Number of documents: The number of documents to check inside a folder at the time of extraction (default: 1). Available options are:

      • At least: Valid documents must have at least the specified number of pages.

      • At most: Valid documents must have no more than the specified number of pages.

      • Exactly (default): Valid documents must have exactly the same number of pages as specified.

    2. Select the Document type to check:

      • Any (default): Checks for a number of documents of any type.

      • Specific: The specific documents to check from the Document list.

    3. Failure message: The text to display when the validation fails. (Default: The folder must have N documents)

    Business rule

    Checks the folder based on the selected business rule. To configure the business rule to use for document validation perform the following steps:

    1. Select a Business rule to use.

      The business rule parameters appear under Rule inputs.

      Note If a business rule calls a CaptureDocumentService SDK API method in the context of a Classification or Extraction activity, the API method will only have access to the document data prior to any updates made by the activity.

    2. Map the system fields or fields to rule inputs or enter static values in the Value field.

      If the rule has a folder as an input you can map the InstanceID system property to allow the business rule to access any fields or system fields within the folder process variable

      Once the rule executes the outputs are updated as follows:

      Business rule parameter Type Output Description
      IsValid Boolean Output Specifies the outcome of the business rule and the review Valid status of the folder.
      ErrorMessage String Output Specifies the outcome of the business rule and the review Valid status of the folder.

  8. Click Save.