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.
AsyncCancelOperation
Declaration
bool AsyncCancelOperation(string asyncOperationId)
Description
Cancels an asynchronous operation. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. The asyncOperationId must start with "lq:" in case of an asynchronous Lakehouse load query. The asyncOperationId must start with "ls:" in case of an asynchronous Lakehouse script.
Supported Runtime Versions
5.0
Parameters
|
Description
|
---|---|
asyncOperationId
|
ID of an asynchronous operation.
|
Return Value
True if the operation was canceled, false otherwise.
AsyncCancelOperation
Declaration
bool AsyncCancelOperation(SQLConnection connection, string asyncOperationId)
Description
Cancel an asynchronous operation. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. The asyncOperationId must start with "lq:" in case of an asynchronous Lakehouse load query. The asyncOperationId must start with "ls:" in case of an asynchronous Lakehouse script.
Supported Runtime Versions
5.0
Parameters
|
Description
|
---|---|
connection
|
Relational connection.
|
asyncOperationId
|
ID of an asynchronous operation.
|
Return Value
True if the operation was canceled, false otherwise.
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.
AsyncForceKillOperation
Declaration
bool AsyncForceKillOperation(string asyncOperationId)
Description
Forcibly stops an asynchronous operation. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. The asyncOperationId must start with "lq:" in case of an asynchronous Lakehouse load query. The asyncOperationId must start with "ls:" in case of an asynchronous Lakehouse script.
Supported Runtime Versions
5.0
Parameters
|
Description
|
---|---|
asyncOperationId
|
ID of an asynchronous operation.
|
Return Value
True if the operation was forcibly stopped, false otherwise.
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.
AsyncGetOperationResult
Declaration
variant AsyncGetOperationResult(string asyncOperationId)
Description
Retrieves the result of an asynchronous operation. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. Lakehouse operations are not supported by this overload. The returned variant contains a basic BI# type in case of an asynchronous BI# process. The returned variant contains a BookExportResult in case of an asynchronous book export.
Supported Runtime Versions
5.0
Parameters
|
Description
|
---|---|
asyncOperationId
|
ID of an asynchronous operation.
|
Return Value
Asynchronous operation result as a variant.
AsyncGetOperationResult
Declaration
variant AsyncGetOperationResult(SQLConnection connection, string asyncOperationId)
Description
Retrieves the result of an asynchronous operation. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. The asyncOperationId must start with "lq:" in case of an asynchronous Lakehouse load query. The asyncOperationId must start with "ls:" in case of an asynchronous Lakehouse script. The returned variant contains a basic BI# type in case of an asynchronous BI# process. The returned variant contains a BookExportResult in case of an asynchronous book export. The returned variant contains a LakehouseLoadQueryResult in case of an asynchronous Lakehouse load query. The returned variant contains a LakehouseScriptResult in case of an asynchronous Lakehouse script.
Supported Runtime Versions
5.0
Parameters
|
Description
|
---|---|
connection
|
Relational connection.
|
asyncOperationId
|
ID of an asynchronous operation.
|
Return Value
Asynchronous operation result as a variant.
AsyncGetOperationStatus
Declaration
AsyncOperationStatus AsyncGetOperationStatus(string asyncOperationId)
Description
Retrieves the status of an asynchronous operation. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. Lakehouse operations are not supported by this overload.
Supported Runtime Versions
5.0
Parameters
|
Description
|
---|---|
asyncOperationId
|
ID of an asynchronous operation.
|
Return Value
Status of an asynchronous operation.
AsyncGetOperationStatus
Declaration
AsyncOperationStatus AsyncGetOperationStatus(SQLConnection connection, string asyncOperationId)
Description
Retrieves the status of an asynchronous operation. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. The asyncOperationId must start with "lq:" in case of an asynchronous Lakehouse load query. The asyncOperationId must start with "ls:" in case of an asynchronous Lakehouse script.
Supported Runtime Versions
5.0
Parameters
|
Description
|
---|---|
connection
|
Relational connection.
|
asyncOperationId
|
ID of an asynchronous operation.
|
Return Value
Status of an asynchronous operation.
AsyncGetOperationType
Declaration
AsyncOperationType AsyncGetOperationType(string asyncOperationId)
Description
Gets the type of asynchronous operation by reading the prefix of the decorated async operation ID. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. The asyncOperationId must start with "lq:" in case of an asynchronous Lakehouse load query. The asyncOperationId must start with "ls:" in case of an asynchronous Lakehouse script.
Supported Runtime Versions
5.0
Parameters
|
Description
|
---|---|
asyncOperationId
|
Decorated ID of an asynchronous operation.
|
Return Value
Instance of AsyncOperationType enum.
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.
AsyncIsOperationExecutionOver
Declaration
bool AsyncIsOperationExecutionOver(string asyncOperationId)
Description
Returns if the asynchronous operation execution is done. That is, if the operation was successfully completed, canceled, or stopped forcibly. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. Lakehouse operations are not supported by this overload.
Supported Runtime Versions
5.0
Parameters
|
Description
|
---|---|
asyncOperationId
|
ID of an asynchronous operation.
|
Return Value
True if the asynchronous operation is completed, canceled, or faulted. False otherwise.
AsyncIsOperationExecutionOver
Declaration
bool AsyncIsOperationExecutionOver(SQLConnection connection, string asyncOperationId)
Description
Returns if the asynchronous operation execution is done. That is, if the operation was successfully completed, canceled, or stopped forcibly. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. The asyncOperationId must start with "lq:" in case of an asynchronous Lakehouse load query. The asyncOperationId must start with "ls:" in case of an asynchronous Lakehouse script.
Supported Runtime Versions
5.0
Parameters
|
Description
|
---|---|
connection
|
Relational connection.
|
asyncOperationId
|
ID of an asynchronous operation.
|
Return Value
True if the asynchronous operation is completed, canceled, or faulted. False otherwise.
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 the status of a BI# process running asynchronously.
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.
AsyncStartProcess
Declaration
string AsyncStartProcess(string process, int version, VariantList parameters, AsyncExecutionFlags flags, RuntimeSettings runtimeSettings)
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.
|
runtimeSettings
|
Runtime settings.
|
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. This function is obsolete. Please use the ToString() function instead.
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
Waits for all asynchronous operations to complete. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. Lakehouse operations are not supported by this overload.
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
Waits for a single asynchronous operation to complete. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. Lakehouse operations are not supported by this overload.
Supported Runtime Versions
5.0
Parameters
|
Description
|
---|---|
asyncJobId
|
ID of an asynchronous BI# process.
|
Return Value
The function does not return a value.
AsyncWaitForSingle
Declaration
void AsyncWaitForSingle(SQLConnection connection, string asyncJobId)
Description
Waits for a single asynchronous operation to complete. The asyncOperationId must start with "pe:" in case of an asynchronous BI# processes. The asyncOperationId must start with "be:" in case of an asynchronous book export. The asyncOperationId must start with "lq:" in case of an asynchronous Lakehouse load query. The asyncOperationId must start with "ls:" in case of an asynchronous Lakehouse script.
Supported Runtime Versions
5.0
Parameters
|
Description
|
---|---|
connection
|
Relational connection.
|
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 canceled).
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.