1

I'm working with Kofax Capture Workflow Agents. I have installed some WFAs before, but they didn't run on first try and I'm not really sure what I've done to get them working.

Currently, I follow these steps to install my WFA:

  1. Compile my Source-Files to one DLL
  2. Remove Workflow Agent from Batch Classes
  3. Uninstall Workflow Agent over Tools > Workflow Agents
  4. Copy over to my Test-Environment
  5. Install Workflow Agent over Tools > Workflow Agents
  6. Add Workflow Agents to Batch Classes
  7. Publish Batches
  8. Close Administration and Run new Batch in Batch Manager

I have installed this particular WFA before and I was able to use it before. This is why I am always using the same AEX-File as none of the Properties change. But somehow, it suddenly stopped working and I can't re-install it properly. Am I doing something wrong?

Edit:
I tried out a lot of things with the best result when I changed the whole AEX-entry. I'm pretty much giving Kofax another Workflow Agent, as name, progid, file and version is different.

I'll have to find out which of these are really needed, but I got a lot of 429 ActiveX errors and I'm not sure whether I registered the DLL by windows or not.

G_hi3
  • 588
  • 5
  • 22
  • Likely the WFA executes, but is not producing the end effect you want. I would recommend adding some kind of logging so you can see what does and does not work. It is worth also considering what version of Kofax Capture is being used, and what .NET version you target. – Stephen Klancher Sep 13 '15 at 18:14

2 Answers2

2

Okay, I finally managed to install a workflow agent correctly with the following steps:

  1. Compile source code COM-visibly (add attributes ComVisible, ProgId and ClassInterface)
  2. Unregister old DLL (if any) via C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe <old DLL> /u
  3. Register new DLL via C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe <new DLL> /codebase
    1. This step is only necessary, if for example your ProgId changed
  4. In the workflow agents manager inside the administrator, click Add, choose your new DLL, choose your workflow agent and click Install. You don't have to do this for remote sites, but the DLL has to be registered in COM as well.

For updates to the DLL, some services must be stopped. I'm not sure which ones, but in my case they were Recognition Server, because the Workflow Agent ran after that module.

The registration is necessary for creating some entries in the registry. Usually the Kofax Capture Administration does that part, but if not, RegAsm will do the trick. If your WFA still doesn't run after registering, check the registry and/or record using Process Monitor and identify the missing registry entries.

As the Kofax DLL's are all x86, it's preferable to change your settings to this architecture as well (instead of Any CPU, for example).

If you're developing a 64-bit library instead, you must use the executable in Framework64 (instead of Framework). If you use .NET <4.0, you also have to use the executable inside v2.0.50727(instead of v4.0.30319).

Even though a warning message is displayed after COM-registration, it is not necessary to use a strong assembly name (it is encuraged though).

For installation in Kofax Capture, you can also use the command line executable %Kofax_Bin%\RegAscEx.exe, which has a pretty useful help page (use -?). You don't have to call this one on remote sites as well.

G_hi3
  • 588
  • 5
  • 22
0

1st answer clearly explains the procedures when you are installing the WFA for the very first time.

However if you want to change or update the existing WFA, you do not need to follow the uninstall and re-install approach. Just copy and replace the old dll with new dll by keeping old settings AS-IS(.net version, prgid, UID etc...) .

I do this all the time and it works like a champ :)

  • Hey, I know it's been over 2 years since your answer, but some processes keep the DLL from being replaced. It's necessary to stop and restart services to replace the DLL. – G_hi3 Dec 17 '19 at 15:31
  • @G_hi3, yes, you would need to stop the services before you can replace them and then start the services. When no batches are being processed, you could restart the services so that it leaves the handle on the dlls, then then you can replace the files. – Amith Gowda Apr 20 '20 at 21:11