Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt

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.


Code Block
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.

Code Block
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 CaptureImporter class and implements the Import method from CaptureImporter.

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.

Properties

Insert excerpt
DEV:database class
DEV:database class
nopaneltrue

Insert excerpt
CN:Engine ClassCN:
Engine Class
nopaneltrue

Insert excerpt
CN:Settings ClassCN:
Settings Class
nopaneltrue

string NodeDirectory

Path to the directory containing files extracted from the custom node.

dynamic Workflow

Dynamic object containing the executing workflow. Changes made to this object will not be saved.

Methods

Insert excerpt
CN:CreateProcess MethodCN:
CreateProcess Method
nopaneltrue

Insert excerpt
CN:Import Method (CaptureImporter)CN:
Import Method (CaptureImporter)
nopaneltrue

Insert excerpt
CN:LoadConfig MethodCN:
LoadConfig Method
nopaneltrue