QA Auto Processing Script

Feature Note

Available in versions 6.1+


QAAutoProcessingBatchProcessingScript Class

ProcessQualityAssuranceBatch Method

The ProcessQualityAssuranceBatch method is called once per batch.  Use this method to access batch data for final processing after all indexing has been completed. If an error is detected in the data, add the QAAutoProcessingScriptValidationFailed alert at either the batch, folder or document level to prevent QA auto processing from closing.

Parameters:

DirectionParameterTypeDescription
INbatchIBatchThe current batch.
Example – Total up all line item amounts, and store the total amount in the AmountTotal index field on the first document record.
public virtual void ProcessQualityAssuranceBatch(IBatch
batch)
{
  try
  {
    foreach(IFolder folder in batch.Folders)
    {
      foreach(IDocument document in folder.Documents)
      {
        decimal totalAmt = 0;
        foreach(IDataRecord record in document.Records)
        {
          totalAmt += (decimal)record["Amount"].Value;
        }
        document.Records[0]["AmountTotal"].Value = totalAmt;
      }
    }
  }
  catch (Exception exception)
  {
    base.ProcessException(exception);
  }
}