MobileApplication: IMobileApplication;
MobileApplication: Prognoz.Platform.Interop.Mobile.IMobileApplication;
The MobileApplication property returns the mobile application to be published.
The mobile application publishing path is defined by the IPublishMobileApplicationScheduledTask.WebApplication property.
Executing the example requires that the repository has a scheduled tasks container with the TASK_CONT identifier.
Add links to the Metabase, Mobile, Fore system assemblies.
Sub UserProc;
Var
mb: IMetabase;
tCont: IScheduledTasksContainer;
Tasks: IMetabaseObjectDescriptors;
i: Integer;
taskDescr, MobApp: IMetabaseObjectDescriptor;
maTask: IPublishMobileApplicationScheduledTask;
Begin
mb := MetabaseClass.Active;
// Get scheduled tasks container
tCont := mb.ItemById("TASK_CONT").Bind As IScheduledTasksContainer;
// Get all tasks from container
Tasks := tCont.Tasks;
For i := 0 To Tasks.Count - 1 Do
taskDescr := Tasks.Item(i);
// Select tasks of mobile application publishing
If taskDescr.ClassId = MetabaseObjectClass.KE_CLASS_TASK_PUBLISHMOBILEAPP Then
maTask := taskDescr.Bind As IPublishMobileApplicationScheduledTask;
// Display name of mobile application to be published in the console window
MobApp := maTask.MobileApplication As IMetabaseObjectDescriptor;
Debug.Write("Task of mobile application publishing '").
Debug.WriteLine(MobApp.Name + "'");
End If;
End For;
End Sub UserProc;
Example execution result: the console window displays names of the mobile applications that are published using the scheduled tasks container.
Executing the example requires that the repository has a scheduled tasks container with the TASK_CONT identifier.
Imports Prognoz.Platform.Interop.KeFore;
Imports Prognoz.Platform.Interop.Mobile;
…
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
tCont: IScheduledTasksContainer;
Tasks: IMetabaseObjectDescriptors;
i: Integer;
taskDescr, MobApp: IMetabaseObjectDescriptor;
maTask: IPublishMobileApplicationScheduledTask;
Begin
mb := Params.Metabase;
// Get scheduled tasks container
tCont := mb.ItemById["TASK_CONT"].Bind() As IScheduledTasksContainer;
// Get all tasks from container
Tasks := tCont.Tasks;
For i := 0 To Tasks.Count - 1 Do
taskDescr := Tasks.Item[i];
// Select tasks of mobile application publishing
If taskDescr.ClassId = MetabaseObjectClass.KE_CLASS_TASK_PUBLISHMOBILEAPP As integer Then
maTask := taskDescr.Bind() As IPublishMobileApplicationScheduledTask;
// Display name of mobile application to be published in the console window
MobApp := maTask.MobileApplication As IMetabaseObjectDescriptor;
System.Diagnostics.Debug.Write("Task of mobile application publishing '").
System.Diagnostics.Debug.WriteLine(MobApp.Name + "'");
End If;
End For;
End Sub;
Example execution result: the console window displays names of the mobile applications that are published using the scheduled tasks container.
See also: