Skip to main content
Kofax

Update the Batch Priority within a Workflow Agent

12103

QAID # 12103 Published

Question / Problem:

Is there a way to update the Batch Priority within a Workflow Agent?

Answer / Solution:

Yes. Below is a sample Workflow Agent written in C# that sets the Batch Priority:

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using Kofax.ACWFLib;
using Kofax.DBLiteOpt;
namespace SetPriority
{
    [Guid("5B9A4F33-4FAD-4288-9FEC-7897777F2FB7")]
    [ClassInterface(ClassInterfaceType.None)]
    [ProgId("SetPriority.SetPriority")]
    public class SetPriority : _IACWorkflowAgent
    {
        public void ProcessWorkflow(ref Kofax.ACWFLib.ACWorkflowData oWorkflowData)
        {
            if (oWorkflowData.CurrentModule.ID == "fp.exe")
            {
                ACDataElement root = oWorkflowData.ExtractRuntimeACDataElement(0);
                ACDataElement oBatch = root.FindChildElementByName("Batch");
                oBatch["Priority"] = "2";
            }
        }
    }
} 

Applies to:

Product Version
CAPTURE 10.0
  10.1
  10.2
  11.0
  • Was this article helpful?