Versions Compared

Key

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


Excerpt

The method that will run when a CustomNode is called by the engine.


Code Block
public abstract void Run();

Classes: CustomNodeActionNodeCaptureNode


Example

The following example defines an ExampleNode class that implements a Run method which gets a first name and last name from a Process' properties, and sets a full name to a third "Full Name" property.

Code Block
public class ExampleNode : CustomNode 
{
    public override void Run()
    {
        var firstName = Process.Properties.GetSingleValue("First Name");
        var lastName = Process.Properties.GetSingleValue("Last Name");
        var fullName = $"{firstName} {lastName}";
        Process.Properties.SetSingleProperty("Full Name", fullName);
    }
}

Remarks

You cannot derive a class from CustomNode and successfully compile your assembly unless you override this method. 

If your CustomNode is designed as an import node, deriving a class from CustomNode and implementing a Run method is optional. Custom importers can successfully spawn processes without a Run method executing on each process spawned. 

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.