Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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) 

Creates a new Process based on a file path.

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.

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.

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.

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.

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.

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.

  • No labels