Skip to main content
Kofax

Kofax TotalAgility - Prevent a job from creating when a folder has invalid fields

Applies to

  • TotalAgility 7.6
  • TotalAgility 7.7
  • TotalAgility 7.8

Scenario

When using a Scan Create New Job (SCNJ) form, is there a way to prevent the job from being created when the folder has invalid fields?

Solution

By default, a SCNJ form doesn't care whether or not the folder (or document) fields are invalid.  It will simply pass any scanned images to the job to be processed.

To prevent a job from being created with invalid folder fields, the below actions needed to be configured on the Create new job actions on the scan control:

  •  .NET Action: Calls CaptureDocumentService.ValidateFolder().  The ScanControl.outputFolderId form control is mapped to the folderId in the input parameters.  The boolean return parameter can be mapped for a form variable or control.
  • Begin Condition: Check if the boolean returned from ValidateFolder() is true.  If so, call the 3 default actions below
    • ScanControlUnloadBatchAction
    • ScanControlCreateJobUsingProcessType
    • ScanControlLoadBatchAction
  • Else Condition:  Check if the boolean returned from ValidateFolder() is false.  If so, call the action below
    • Refresh Capture Form:  This will mark the invalid folder fields as invalid in the UI for scan users 
  • End Condition

After configuring these actions, when we try to create a job with invalid folder fields users will be presented with the below error.  No job will be created and the relevant folder fields will be marked as invalid.

clipboard_ee52fc998647519e7bb43271b4baf68da.png