Process Designer Scripting API

We have provided a short collection of script fragments to take a look at and copy and paste to serve as starting points or fragments of your own scripts.

The Visual Process Designer Scripting API expose the following members:

 

Here are some specific examples.

API.AddInput Method

Adds an input item to the process.

Syntax: void AddInput(string fileName)

Parameters:

fileName

  Type: System.String

Path to the input file.

API.AddOutput Method

Adds an output item to the items for the specified export.

Syntax: void AddOutput(string exportName, string location)

Parameters:

exportName

  Type: System.String

Name of process export.

location

  Type: System.String

Path to the output file.

API.AddRuntimeFieldValue Method

Adds an output item to the items for the specified export.

Syntax: void AddRuntimeFieldValue(string fieldName, string fieldValue)

Parameters:

fieldName

  Type: System.String

Name of runtime field.

fieldValue

  Type: System.String

Value of runtime field.

API.ClearRuntimeFieldValues Method

Clears values for runtime fields.

Syntax: void ClearRuntimeFieldValues()

API.GetExports Method

Gets the list of process export names.

Syntax: IList<string> GetExports()

Return Value:

   Type: StringCollection

     A StringCollection containing the process export names.

API.GetInputs Method

Gets the list of input items.

Syntax: IList<string> GetInputs()

Return Value:

   Type: StringCollection

     A StringCollection containing the process inputs.

API.GetProcessName Method

Returns the name of the process.

Syntax: string GetProcessName()

Return Value:

   Type: String

     The name of the process.

API.GetOutputs Method

Gets the list of output items for a process.

Syntax: IList<string> GetOutputs()

Return Value:

   Type: StringCollection

     A StringCollection containing the process outputs.

API.GetOutputs Method

Gets the list of output items for a specified process export.

Syntax: IList<string> GetOutputs(string exportName)

Parameters:

exportName

  Type: System.String

Name of process export.

Return Value:

   Type: StringCollection

     A StringCollection containing the outputs of the process export.

API.GetRuntimeFieldValue Method

Returns the current value, if any, for a given runtime field name.

Syntax: string GetRuntimeFieldValue(string fieldName)

Parameters:

fieldname

  Type: System.String

Name of runtime field.

Return Value:

   Type: String

     Value for the specified runtime field or empty string.

API.HasRuntimeFieldValue Method

Returns true if a value has already been set for a given runtime field name.

Syntax: bool HasRuntimeFieldValue(string fieldName)

Parameters:

fieldname

  Type: System.String

Name of runtime field.

Return Value:

   Type: Boolead

     True if this field has a value already set