Validation
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 the validation of a folder structure. Use one or more business rules in a folder to help in validating the 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.
-
Navigate to
.
The Folders page appears.
-
Open the folder for which to create the validation rule.
The Folder type opens in a new browser tab.
- On the properties panel of the folder, click the Validation tab.
-
To apply this rule to all subfolders within a folder, select
Include sub folders.
For example, when you choose to include subfolders and specify the number of documents for validation, the validation adds the specified number of documents in the folder where the rule is defined and the specified number of documents in the subfolders when evaluating the rule.
If a subfolder fails the validation, the validation for the parent folder also fails, even though the parent folder might meet the rule requirement. -
Click
.
The New folder validation rule dialog box is displayed.
- Enter a Name for the rule.
-
Select the
Type of rule. Available options are:
Option
Description
Number of documents (default)
Checks the specified number of documents inside a folder at the time of extraction.
-
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 folders must have at least the specified number of documents.
-
At most: Valid folders must have no more than the specified number of documents.
-
Exactly (default): Valid folders must have the same number of documents as specified.
-
-
Select the Document type to check:
-
Any (default): Checks for documents of any type.
-
Specific: Checks for specific documents from the Document list.
-
-
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:
-
Select a Business rule to use.
The business rule parameters appear under Rule inputs.
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 before any updates are made by the activity.
-
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.
-
- Click Save.