IPublishMobileApplicationScheduledTask.WebApplication

Fore Syntax

WebApplication: String;

Fore.NET Syntax

WebApplication: string;

Description

The WebApplication property determines the path for publishing the mobile application.

Comments

The mobile application publishing path is defined by the IPublishMobileApplicationScheduledTask.Publicator property.

The path where the mobile application is published is generated as follows: http://<the server name, where the mobile application is to be published>/<the virtual directory name where the mobile application is to be published>, for example http://test/PPMobile_App_v9.0x64.

The virtual directory name where the mobile application is published by default: PPMobile_App_v9.0x64 - only for 64-bit version of Prognoz Platform 9.

Fore Example

Executing this example requires that the repository contains the following objects: a scheduled tasks container with the TASK_CONT identifier and a mobile application with the MA_PUB identifier.

Add links to the Metabase, Mobile, Fore system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    tCont: IScheduledTasksContainer;
    cInfo: IMetabaseObjectCreateInfo;
    maTask: IPublishMobileApplicationScheduledTask;
    MobApp: IMobileApplication;
Begin
    mb := MetabaseClass.Active;
    // Get a container of scheduled tasks
    tCont := mb.ItemById("TASK_CONT").Edit As IScheduledTasksContainer;
    // Create a task of mobile application publishing in the container (MA)
    cInfo := mb.CreateCreateInfo;
    cInfo.ClassId := MetabaseObjectClass.KE_CLASS_TASK_PUBLISHMOBILEAPP;
    cInfo.Parent := tCont As IMetabaseObjectDescriptor;
    maTask := mb.CreateObject(cInfo).Edit As IPublishMobileApplicationScheduledTask;
    // Specify the mobile application publishing path 
    maTask.WebApplication := "http://localhost/PPMobile_App_v9.0x64";
    // Specify the mobile application publicator 
    MobApp := mb.ItemById("MA_PUB").Bind As IMobileApplication;
    maTask.Publicator := MobApp.CreatePublicator;
    // Save the publishing task and the container of scheduled tasks
    (maTask As IMetabaseObject).Save;
    (tCont As IMetabaseObject).Save;
End Sub UserProc;

Example execution result: the task of mobile application publishing is added to the scheduled tasks container.

Fore.NET Example

Executing the example requires that the repository contains the following objects: a scheduled tasks container with the TASK_CONT identifier and a mobile application with the MA_PUB identifier.

Imports Prognoz.Platform.Interop.KeFore;
Imports Prognoz.Platform.Interop.Mobile;

[STAThread]
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    tCont: IScheduledTasksContainer;
    cInfo: IMetabaseObjectCreateInfo;
    maTask: IPublishMobileApplicationScheduledTask;
    MobApp: IMobileApplication;
Begin
    mb := Params.Metabase;
    // Get a container of scheduled tasks
    tCont := mb.ItemById["TASK_CONT"].Edit() As IScheduledTasksContainer;
    // Create a task of mobile application publishing in the container (MA)
    cInfo := mb.CreateCreateInfo();
    cInfo.ClassId := MetabaseObjectClass.KE_CLASS_TASK_PUBLISHMOBILEAPP As Integer;
    cInfo.Parent := tCont As IMetabaseObjectDescriptor;
    maTask := mb.CreateObject(cInfo).Edit() As IPublishMobileApplicationScheduledTask;
    // Specify the mobile application publishing path 
    maTask.WebApplication := "http://localhost/PPMobile_App_v9.0x64";
    // Specify the mobile application publicator 
    MobApp := mb.ItemById["MA_PUB"].Bind() As IMobileApplication;
    maTask.Publicator := MobApp.CreatePublicator();
    // Save the publishing task and the container of scheduled tasks
    (maTask As IMetabaseObject).Save();
    (tCont As IMetabaseObject).Save();
End Sub;

Example execution result: the task of mobile application publishing is added to the scheduled tasks container.

See also:

IPublishMobileApplicationScheduledTask