Skip to main content
Kofax

Perform multistage validation using document variants and activity variants

Article # 3038119 - Page views: 9

Issue

How can document variants and activity variants be used to perform multistage Validation?

 

Solution

Using the Capture Starter Pack shipped with KTA, I created a 2-step validation process as shown below.  The Validation1 activity would be used to validate all simple fields in the document.  The Validation2 activity would be used to validate the table field in the document.  

clipboard_e7fc88fb4acca20877106119b15866882.png

Note:  To change the document variant of a document, the CaptureDocumentService.UpdateDocumentVariant() method must be called prior to Validation.  If the document doesn't have the correct document variant set, the associated activity variants won't be used.

This was achieved using a document variant and 2 activity variants for the Northwest document type.

clipboard_ef82557f84dca66578d03266ecd96d3e3.png

The NorthwestVariant document variant is configured to ignore no fields in this document class.

The Nw_ValidateSimpleFields activity variant is configured to Ignore and Mask the table field and columns.  See below.

The Nw_ValidateTableFields activity variant is configured to Ignore and Mask the simple fields.See below.

clipboard_e18305559833ca308dca206bb8d1a5a25.png

In the take activity form associated with Validation1, the Nw_ValidateSimpleFields activity variant was mapped to the validation control.

clipboard_ee9dd140511b373321905fa2fae84b1c1.png

In the take activity form associated with Validation2, the Nw_ValidateTableFields activity variant was mapped to the validation control.  

clipboard_e0300e7e48094e15ea2f9ed71d6c5f6d3.png

At runtime, in Validation1 we see the below.  The table field is not shown in the document form as we choose to Ignore this in the activity variant.  In addition, the table data is "blacked out" in the document viewer as we choose to Mask this in the activity variant.

clipboard_ec01eb010df4b6715cdee389912054de7.png

We can validate the displayed fields and complete the activity even if the table field has invalid data.  In Validation2, we see the below.  Only the table field is shown with all other fields being ignored and masked.

 clipboard_eeae1547c17b49629f1c090616ba90974.png

Level of Complexity 

Moderate

 

Applies to  

Product Version Build Environment Hardware
KTA ALL      

References

Add any references to other internal or external articles

 

Article # 3038119
  • Was this article helpful?