CaptureImporter Class
Base object from which custom Capture Importers derive and define behavior. An Importer in GlobalCapture is used to inject documents into a workflow. Inherit from this class to create Nodes that start a GlobalCapture workflow.
public abstract class CaptureImporter
Example
The following example defines an ExampleCaptureImporter class that implements an Import method which gets a list of files from a target directory to pass to the GlobalCapture engine for import.
public class ExampleCaptureImporter : CaptureImporter
{
public override List<string> Import()
{
var directory = @"C:\Capture Files\";
return Directory.GetFiles(directory).ToList();
}
}
Import will fire any time a workflow is saved, and when the frequency specified expires. Note that any errors or unhandled exceptions in the Import method will trigger a retry of the import at the next sweep interval (by default, every 2 seconds). This interval is configurable in the Engine .config file, as the EngineRate key specified in milliseconds.
Remarks
If your custom node is designed as an importer for GlobalCapture, a class must be defined within your assembly that inherits the 162169575 class and implements the Import method from 162169575.
This class does not need to be defined on nodes that are not configured both as an import type and for the GlobalCapture product type.
The NodeDirectory field refers to a folder containing the files within the .s9n file executing on the process. This folder exists only as long as the specific process is executing the custom node, and is deleted when the Custom Node is finished.
If a CustomNode class is defined and a Run method is implemented on a Custom Import node, the code within the Run method will execute independently on every process spawned as a result of the Import Method (ActionImporter) or Import Method (CaptureImporter). Utilize this pattern to save space when a custom importer must perform actions specific to the processes it creates.