Skip to main content
Kofax

Kofax TotalAgility - Returning a byte[] to KTA

Applies To

  • TotalAgility 7.5
  • TotalAgility 7.6
  • TotalAgility 7.7
  • TotalAgility 7.8

Scenario

Some customers have custom web services or .NET methods that will return an image as a byte array (byte[]).  Since v7.5, we can now handle this byte array in KTA.

Explanation

Below is an example of a .NET method that takes a file path as an input and returns the file as a byte[].  Please know the returned byte[] is mapped to a process variable of type string.

clipboard_e65bdb6f61b6b17573c75344f94658bc5.png

After this activity executes, we can see the FileData variable stores a GUID at runtime.   This GUID is a pointer to where the byte[] data is stored in the DB as a custom asset.

clipboard_e04febf9e860c1bfba8f27c1b83b854ae.png

This can then be passed to subsequent WebService/.NET calls.