CreateProcess Method
Creates a new Process based on a workflow and a file.
This Process can be inserted into the database by calling the InsertProcess method.
Classes: CustomNode, CaptureImporter
Overloads
CreateProcess(string)
Creates a new Process based on a file path.
public Process CreateProcess(string path);
Parameters
value string
File to spawn the new process from.
Example
The following example demonstrates creating a new process from a file and then inserting that process into the database.
var filePath = @"C:\Documents\invoice.pdf"; var process = CreateProcess(filePath); Database.InsertProcess(process);
Remarks
This method assumes there is a single initiator on the node from which to begin the process.
Throws an InvalidOperationException if there are multiple initiators on the process.
This method supports a null or empty string path argument. This will create a process without a document.
The original file that is targeted by this method for process is removed when the new process is created.
The returned Process will not exist in the database unless inserted using the InsertProcess method on the Database class.
Use care when creating processes from files without subsequently inserting them into the database. In these cases, the original file used to create the process is lost.
CreateProcess(string, string)
Creates a new Process beginning at a specific node in the executing workflow.
public Process CreateProcess(string path, string startNode);
Parameters
value string
File to spawn the new process from.
value string
Name of the node at which to begin the process.
Example
The following example demonstrates creating a new process from a file, beginning at the node "Target Node", and then inserting that process into the database.
var filePath = @"C:\Documents\invoice.pdf"; var process = CreateProcess(filePath, "Target Node"); Database.InsertProcess(process);
Remarks
Throws an Exception if the targeted node is not found.
This method supports a null or empty string path argument. This will create a process without a document.
The original file that is targeted by this method for process is removed when the new process is created.
The returned Process will not exist in the database unless inserted using the InsertProcess method on the Database class.
Use care when creating processes from files without subsequently inserting them into the database. In these cases, the original file used to create the process is lost.