Description

RTI_TASK_SUBMIT creates and optionally launches a background task. It is a member of the RTI_TASK_xxx programs. Use RTI_TASK_SUBMIT to trigger a background task from a program.

RTI_TASK_SUBMIT allows you to launch tasks which require the presentation server, for example OIPI reports. It can be configured to start up an additional OpenInsight for each requested task, or to maintain a “background queue” of OpenInsight invocations that can be used to process requests in the order they are submitted.

[See RTI_TASK_SCHEDULER for the case where you to create a task triggered by time.]

Syntax

Rslt = RTI_TASK_SUBMIT(callType, funcName {,<param1>} {,<param2>}… {,<param10>})

Parameters

The function has the following parameters:

ParameterDescription
callType

There are three possible values:

ValueDescription
ValueDescription
nullLaunch immediately
0Add task to the queue
1Add to the queue, launch a poller to process the queue
funcNameThe name of the fuction or subroutine to execute.
taskdetailsAn @FM delimited array containing the information to place into the Task Scheduler for the specific job. Used with the ADD tasktype only.
{,<param1>}, {,<param2>}...{,<param10>}The arguments for the function. RTI_TASK_SUBMIT supports functions with up to ten arguments.

Returns

The “task ID” of the newly submitted task. The TaskID will be used to query the background processor about the status of the request, and retrieve any generated results, with the RTI_TASK_STATUS call

RTI_TASK_SUBMIT uses the ShellExecute function to launch a new Oinsight.exe to execute the task. Unlike OERUN, which similarly runs background tasks via the engine server, RTI_TASK_SUBMIT uses oinsight.exe to support tasks which require the presentation server, such as OIPI reports.

In immediate mode, the launched OInsight.exe will execute the requested task and terminate. In polling mode, the launched OInsight.exe will check to see if a “task manager” is currently running, and if it is not, it will remain running as the task manager, dispatching the requests to additional OInsight.exe instances. If a task manager is already running, the launched OInsight.exe will terminate, leaving the processing of the task to the already-running task manager.

See RTI_TASKMANAGER for configuration information.

RTI_TASK_SUBMIT can be called from any program, including other tasks or programs that are not in event context, such as INET and O4W routines. Launching OIPI reports and returning PDFS to web clients is a common use.

See Also

RTI_TASK_STATUSRTI_TASK_STARTUPRTI_TASK_SHUTDOWNRTI_TASKMANAGER