ExecuteOnline

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalBoolean ExecuteOnline( SalString nWhat,
                      SalString sMethodName )

The ExecuteOnline method opens the "Run Task" dialog with predefined parameters (if any) for the Task. When the "OK" button is pressed, the Task is executed immediately ("online"), locking the client until the Task is finished. The opposite of  "online" is executing the Task as Scheduled Task where the execution is performed by a Background Job.

Parameters

Name Description
SalString nWhat Const.METHOD_Inquire to inquire if target object is available, Const.METHOD_Execute to perform the actual action.
SalString sMethodName The method name of the Task

Returns

When nWhat is Const.METHOD_Inquire: TRUE if the Task is available, FALSE otherwise
When nWhat is Const.METHOD_Execute: TRUE if the Task was performed, FALSE otherwise.

Comments

The task must first be registered and granted (as a Presentation Object) in order to be scheduled. All necessary security checks are made by running the method with nWhat set to Const.METHOD_Inquire.

Example

Function: UM_AnalyzeSchema
   Parameters
      Number: nWhat
   Actions
      Return TaskScheduler.ExecuteOnline( nWhat, 'DATABASE_SYS.EXECUTE_ANALYZE_SCHEMA__' )
C# code

Do I mention about the feature shim for this method??? as this example is from the FeatureShimFactory.cs

switch (TypeGetFromUrl(url.LocalPath))
{
	case Const.NAVIGATOR_TypeTask:
		Var.TaskScheduler.ExecuteOnline(Const.METHOD_Execute, ActionGetFromUrl(url.LocalPath));
		break;
	............