Process functions

AbortProcess

Declaration

void AbortProcess(string message)

Description

Aborts a process immediately with a specific message.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
message Message explaining why the process was aborted.

Return Value

Does not return a value.

AsyncCancelProcess

Declaration

void AsyncCancelProcess(string asyncJobId)

Description

Cancel a BI# process running asynchronously.

Supported Runtime Versions

5.0

Parameters Description
asyncJobId ID of an asynchronous BI# process.

Return Value

The function does not return a value.

AsyncForceKillProcess

Declaration

void AsyncForceKillProcess(string asyncJobId)

Description

Forcibly stops a BI# process running asynchronously.

Supported Runtime Versions

5.0

Parameters Description
asyncJobId ID of an asynchronous BI# process.

Return Value

The function does not return a value.

AsyncGetProcessResult

Declaration

variant AsyncGetProcessResult(string asyncJobId)

Description

Retrieves the result of a BI# process running asynchronously.

Supported Runtime Versions

5.0

Parameters Description
asyncJobId ID of an asynchronous BI# process.

Return Value

Async process result as variant.

AsyncGetProcessStatus

Declaration

ProcessStatus AsyncGetProcessStatus(string asyncJobId)

Description

Retrieves the status of a BI# process running asynchronously.

Supported Runtime Versions

5.0

Parameters Description
asyncJobId ID of an asynchronous BI# process.

Return Value

Async process status.

AsyncGetTraceId

Declaration

string AsyncGetTraceId(string asyncJobId)

Description

Returns the correlation ID of an asynchronous process.

Supported Runtime Versions

5.0

Parameters Description
asyncJobId ID of an asynchronous BI# process.

Return Value

Correlation ID of an asynchronous process if application logs are enabled, or empty string if not enabled.

AsyncIsProcessCancelled

Declaration

bool AsyncIsProcessCancelled(string asyncJobId)

Description

Returns if the asynchronous process is canceled.

Supported Runtime Versions

5.0

Parameters Description
asyncJobId ID of an asynchronous BI# process.

Return Value

True if the asynchronous process is canceled, false otherwise.

AsyncIsProcessCancelling

Declaration

bool AsyncIsProcessCancelling(string asyncJobId)

Description

Returns if the process is being canceled.

Supported Runtime Versions

5.0

Parameters Description
asyncJobId ID of an asynchronous BI# process.

Return Value

True if the asynchronous process is being canceled, false otherwise.

AsyncIsProcessCompleted

Declaration

bool AsyncIsProcessCompleted(string asyncJobId)

Description

Retrieves if the asynchronous process is completed.

Supported Runtime Versions

5.0

Parameters Description
asyncJobId ID of an asynchronous BI# process.

Return Value

True if the asynchronous process is completed, false otherwise.

AsyncIsProcessExecutionOver

Declaration

bool AsyncIsProcessExecutionOver(string asyncJobId)

Description

Returns if the asynchronous process execution is done. That is, if the process was successfully completed, canceled, or stopped forcibly.

Supported Runtime Versions

5.0

Parameters Description
asyncJobId ID of an asynchronous BI# process.

Return Value

True if the asynchronous process is completed, canceled, or faulted. False otherwise.

AsyncStartProcess

Declaration

string AsyncStartProcess(string process, int version, VariantList parameters)

Description

Executes a BI# process asynchronously.

Supported Runtime Versions

5.0

Parameters Description
process The BI# process to execute.
version The version of the process.
parameters The parameters of the process.

Return Value

Identifier of a process running asynchronously.

AsyncStartProcess

Declaration

string AsyncStartProcess(string process, int version, VariantList parameters, AsyncExecutionFlags flags)

Description

Executes the specified BI# asynchronously.

Supported Runtime Versions

5.0

Parameters Description
process The BI# process to execute.
version The version of the process.
parameters The parameters for the process.
flags Execution control flags.

Return Value

Identifier of a process running asynchronously.

AsyncStatusToString

Declaration

string AsyncStatusToString(ProcessStatus status)

Description

Converts the status of an asynchronous process to a string.

Supported Runtime Versions

5.0

Parameters Description
status Status of an asynchronous process.

Return Value

Status converted to a string.

AsyncWaitForAll

Declaration

void AsyncWaitForAll(StringList asyncJobIdList)

Description

Wait for all async processes to complete.

Supported Runtime Versions

5.0

Parameters Description
asyncJobIdList List of asynchronous job IDs.

Return Value

The function does not return a value.

AsyncWaitForSingle

Declaration

void AsyncWaitForSingle(string asyncJobId)

Description

Wait for a single async processes to complete.

Supported Runtime Versions

5.0

Parameters Description
asyncJobId ID of an asynchronous BI# process.

Return Value

The function does not return a value.

CV

Declaration

string CV(string customSetting)

Description

Returns a custom setting value.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
customSetting Name of the custom setting.

Return Value

The value of the requested custom setting. If the custom setting does not exist, an empty string is returned.

CV

Declaration

string CV(string customSetting, string defaultValue)

Description

Returns a custom setting value.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
customSetting Name of the custom setting.
defaultValue Default value to return if the custom setting does not exist.

Return Value

The value of the requested custom setting. If the custom setting does not exist, then the default parameter's value is returned.

DisableLogging

Declaration

string DisableLogging()

Description

Disables the logging of all runtime functions.

Supported Runtime Versions

4.0, 5.0

Parameters

The function has no parameters.

Return Value

Does not return a value.

EnableLogging

Declaration

string EnableLogging()

Description

Enables the logging of all runtime functions.

Supported Runtime Versions

4.0, 5.0

Parameters

The function has no parameters.

Return Value

Does not return a value.

ExecuteProcess

Declaration

int ExecuteProcess(string command, string arguments)

Description

Executes the specified command with the given arguments.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
command The command to execute.
arguments The arguments for the command.

Return Value

The exit code of the process.

ExecuteProcessAsynchronously

Declaration

int ExecuteProcessAsynchronously(string command, string arguments)

Description

Executes the specified command with the given arguments asynchronously.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
command The command to execute.
arguments The arguments for the command.

Return Value

The exit code of the process.

ExitProcess

Declaration

void ExitProcess(string message)

Description

Exits a process immediately with a specific message.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
message Message explaining why the process was exited.

Return Value

Does not return a value.

GetCurrentApplicationName

Declaration

string GetCurrentApplicationName()

Description

Gets the current application name.

Supported Runtime Versions

5.0

Parameters

The function has no parameters.

Return Value

Unique name of the current application.

GetCurrentTenantName

Declaration

string GetCurrentTenantName()

Description

Returns the name of the current tenant.

Supported Runtime Versions

4.0, 5.0

Parameters

The function has no parameters.

Return Value

The name of the current tenant.

GetCurrentTraceId

Declaration

string GetCurrentTraceId()

Description

Returns the correlation ID of the current process.

Supported Runtime Versions

5.0

Parameters

The function has no parameters.

Return Value

Correlation ID of the current process if application logs are enabled, or empty string if not enabled.

GetCurrentUserAuthenticationSystem

Declaration

AuthenticationSystem GetCurrentUserAuthenticationSystem()

Description

Returns the authentication system of the current user.

Supported Runtime Versions

5.0

Parameters

The function has no parameters.

Return Value

Authentication system.

GetCurrentUserAuthenticationSystemString

Declaration

string GetCurrentUserAuthenticationSystemString()

Description

Returns the authentication system of the current user.

Supported Runtime Versions

5.0

Parameters

The function has no parameters.

Return Value

Authentication system as a string.

GetCurrentUserId

Declaration

string GetCurrentUserId()

Description

Not supported anymore, throws an error. Original behavior: Returns the current user ID.

Supported Runtime Versions

4.0, 5.0

Parameters

The function has no parameters.

Return Value

The current user Id.

GetCurrentUserName

Declaration

string GetCurrentUserName()

Description

Returns the current user name.

Supported Runtime Versions

4.0, 5.0

Parameters

The function has no parameters.

Return Value

The current user name.

GetCustomSetting

Declaration

string GetCustomSetting(string customSetting, string defaultValue)

Description

Returns a custom setting value.

Supported Runtime Versions

5.0

Parameters Description
customSetting Name of the custom setting.
defaultValue Default value to return if the custom setting does not exist.

Return Value

The value of the requested custom setting. If the custom setting does not exist, then the default parameter's value is returned.

GetGlobalDataSourceConnectionString

Declaration

string GetGlobalDataSourceConnectionString(string name)

Description

Returns a global data source connection string identified by its name. This function is deprecated. Use OLAPCreateNamedConnection(), XMLACreateNamedConnection() or SQLCreateNamedConnection() instead.

Supported Runtime Versions

4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
name Name of the global data source connections string to be returned.

Return Value

The global data source connection string identified by name.

GetNumberOfRunningTasks

Declaration

int GetNumberOfRunningTasks()

Description

No longer supported. Use the Async Execution functionality instead.

Supported Runtime Versions

4.0, 5.0

Parameters

The function has no parameters.

Return Value

0. Always.

GetProcessCategory

Declaration

string GetProcessCategory()

Description

Returns the category of the current process as defined with the @Category tag.

Supported Runtime Versions

3.0, 4.0, 5.0, 6.0

Parameters

The function has no parameters.

Return Value

The category of the current process.

GetProcessDescription

Declaration

string GetProcessDescription()

Description

Returns the description of the current process as defined with the @Description tag.

Supported Runtime Versions

3.0, 4.0, 5.0, 6.0

Parameters

The function has no parameters.

Return Value

The description of the current process.

GetProcessMinVersion

Declaration

string GetProcessMinVersion()

Description

Returns the minimum version of the Application Engine that is required to run the current process.

Supported Runtime Versions

3.0, 4.0, 5.0, 6.0

Parameters

The function has no parameters.

Return Value

The minimum version of the Application Engine that is required to run the current process.

GetProcessName

Declaration

string GetProcessName()

Description

Gets the name of the current process.

Supported Runtime Versions

5.0

Parameters

The function has no parameters.

Return Value

Name of the current process.

GetProcessParameterDescription

Declaration

string GetProcessParameterDescription(string parameterName)

Description

Returns the description of a certain parameter of the current process.

Supported Runtime Versions

3.0, 4.0, 5.0, 6.0

Parameters Description
parameterName The name of the process parameter to return the description for.

Return Value

The description of a certain parameter of the current process.

GetProcessParameterNames

Declaration

StringArray GetProcessParameterNames()

Description

Returns the names of all parameters of the current process.

Supported Runtime Versions

3.0, 4.0, 5.0, 6.0

Parameters

The function has no parameters.

Return Value

The names of all parameters of the current process.

GetProcessReturnValueDescription

Declaration

string GetProcessReturnValueDescription()

Description

Returns the description of the return value of the current process as defined with the @Returns tag.

Supported Runtime Versions

3.0, 4.0, 5.0, 6.0

Parameters

The function has no parameters.

Return Value

The description of the return value of the current process.

IsProcessCancellationRequested

Declaration

bool IsProcessCancellationRequested()

Description

Checks if cancellation of the current process has been requested.

Supported Runtime Versions

5.0

Parameters

The function has no parameters.

Return Value

True if cancellation has been requested. False otherwise.

RaiseError

Declaration

void RaiseError(string message, int errorCode)

Description

Raises an error that can be handled in a try statement.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
message A message describing the error's cause.
errorCode A code representing the error.

Return Value

Does not return a value.

SetCustomSetting

Declaration

void SetCustomSetting(RepositoryConnection repositoryConnection, string customSetting, string value)

Description

Sets a value of a custom setting. If the custom setting does not exist or cannot be set due to insufficient access rights, an exception is thrown.

Supported Runtime Versions

5.0

Parameters Description
repositoryConnection Repository connection.
customSetting Name of the custom setting.
value New value of the custom setting.

Return Value

Does not return a value.

Sleep

Declaration

void Sleep(int milliseconds)

Description

Puts the current process to sleep for a certain number of milliseconds. The Sleep function can be terminated prematurely when the calling process is force-killed (not just cancelled).

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
milliseconds Duration of the sleeping period measured in milliseconds.

Return Value

Does not return a value.

TasksAreRunning

Declaration

bool TasksAreRunning()

Description

No longer supported. Use the Async Execution functionality instead.

Supported Runtime Versions

4.0, 5.0

Parameters

The function has no parameters.

Return Value

False. Always.

WaitForAllTasks

Declaration

void WaitForAllTasks()

Description

No longer supported. Use the Async Execution functionality instead.

Supported Runtime Versions

4.0, 5.0

Parameters

The function has no parameters.

Return Value

Does not return a value.