Versions Compared

Key

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


Excerpt

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

Creates a new Process based on the executing workflow.

Creates a new Process beginning at a specific node in the executing workflow.



CreateProcess(string) 
Anchor
CreateProcess(string)
CreateProcess(string)

Creates a new Process based on a file path.

Code Block
public Process CreateProcess(string path);


Parameters

value string

File to spawn the new process from.

Returns

Process

A new process held in memory.


Example

The following example demonstrates creating a new process from a file and then inserting that process into the database.

Code Block
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) 
Anchor
CreateProcess(string, string)
CreateProcess(string, string)

Creates a new Process beginning at a specific node in the executing workflow.

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

Returns

Process

A new process held in memory.


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.

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