Major modules running method

The three modules provided by XPLAFORM are run by programs other than XPLATFORM. Out of these the two (XPLATFORMAX, XPLauncher) are run by web browsers and one (XPLATFORM.exe) is run on the OS command line.

XPLATFORMAX

XPLATFORMAX is an ActiveX module for running XPLATFORM Engine on web browsers.

This module is included in the following setup files.

XPLATFORMAX is an object on web browsers, so it has elements(property, method, event). Here, only a simple explanation on elements will be done. Details can be found in “XPLATFORM Reference Guide”.

CLASS ID

Classid for AcitveX is “43C5FE00-DD32-4792-83DB-19AE4F88F2A6”.

The following is the HTML code for activating this module.

<SCRIPT LANGUAGE="javascript">
document.write('<OBJECT ID="XPlatformAXCtrl" CLASSID="CLSID: 43C5FE00-DD32-4792-83DB-19AE4F88F2A6"'
+'"CODEBASE="http://127.0.0.1/XPLATFORM9_XPLauncher.cab#VERSION=2011,10,4,1"  onError="fn_onError()" >'
+ '<PARAM NAME="key" VALUE=" XP_Sample ">'
+ '<PARAM NAME="xadl" VALUE="http://127.0.0.1/XP_Service/ SampleADL.xadl">'
+ '</OBJECT>');

Property

The following shows the arrangement of property values of XPLATFORMAX. The values marked as required must be designated to drive XPLATFORM engine.

Property name

required

Description

Default value

key

O

Key value of the service must be designated.

It needs to be the only value in the same ADL.

No default value..

xadl

O

Designates the service’s ADL route.

No default value..

componentpath

X

Designates the PATH where the components will be saved on the user’s PC. Generally this value is not designated.

Default value ="%USERAPP%\TobeSoft\XPLATFORM9\Component\"

Refer to “Alias path” for value of %USERAPP% .

autosize

X

Designates whether the size of XPLATFORM will change accordingly to the size of the web browser.

When false, the plugin width and height of the web browser are applied.

Default value=true

commthreadcount

X

Designates the number of communication thread XPLATFORM Engine uses.

It is desirable to set it high when there’s many CPU of user’s device.

This function is used only for communication process, so in the case of wanting to use multiple communications at the same time, you can get a fast response by increasing the number. However, in the case of the network itself being slow the effect will not take place even after increasing the number.

Default value =5

errorfile

X

It is the file route where error information XPLATORM Engine outputs are defined. If not designated the default error information of XPLATFORM Engine will be output. Generally is not designated.

No default value

handleflag

X

Decides whether exit() event will happen after XPLATFORM application program is shut down. If not designated, becomes true and exit() happens.

Default value =true

Commthreadwaittime

X

When the thread XPLATFORM application program uses does nothing, the thread will shut down. This is the property that sets the time (seconds) to wait before shut down when this happens.

usewininet

X

It is the property that designates the method of communicating with the server. It sets whether to communication to communicate using WINNET communication library.

Default value = false

autostart

X

It is the property that decides whether to automatically execute run() at the point XPLATFORMAX Control is created.

Default value =false

Method

Following is a rouge arrangement of the methods XPLATFORMAX can perform.

Method name

Description

callscript()

  • It is the method for performing the method of XPLATFORM Engine script in XPLATFORMAX.

getvariablevalue()

  • It is the method for gaining variable value of GlobalVariable of XPLATFORM in XPLATFORMAX.

run()

  • It is the method for XPLATFORMAX to run XPLATFORM Engine.

setvariablevalue()

  • It is the method that sets the variable value of GlobalVariable of XPLATFORM Engine in XPLATFORMAX.

stop()

  • It is the method for PlugIn to stop all manager in XPLATFORM.

quit()

  • It is the method for Plugin to load ADL and start performance.

addWebInfo

  • It is the method that automatically adds the cookies information of the current browser to cookies variable of globalvariable.

Event

Following shows the events that occur in XPLATFORMAX.

Event name

Description

addlog()

  • It is the event that happens when trace() function is executed in XPLATFORM Script.

  • The factor value of trace() function is applied intactly to the factor value of the event in XPLATFORM Script

beforeexit()

  • It is the event that happens right before the shutdown of XPALTFORM Engine

  • After beforeexit event, exit Event happens. When the handledflag value is set as false in beforeexit event, exit event does not happen, and thus does not shut down.

  • It happens when exit function is called in XPLATFORM and after the event of onbeforeexit of application happens, beforeexit happens in XPLATFORMAX.

communication()

  • It is the even that happens at the start and the end of XPLATFORM’s communication.

error()

  • It is the event that happens when an error occurs during XPLATFORMAX loading or running XPLATFORM Engine.

exit()

  • This event happens when XPALTFORM Engine shuts down.

  • It is effected by beforeexit() event.

load()

  • This even happens after the initial loading of XPALTFORM Engine is complete. .

  • Onload event happens in XPALTFORM Script.

  • The event happens in the following order: loadtypedefinition loadingglobalvariables load

loadingglobalvariables()

  • This event happens after the objects of GlobalVariables are created.

  • This is before the URL of dataset and form are loaded, so when the needed information in loading within the event is added or modified, it will load with the modified value.

  • Onloadingglobalvariables event of application will also occur in XPLATFORM Script.

loadtypedefinition()

  • It is the even that happens after the loading of components registered on TypeDefinition is complete.

  • It means the distribution of components is also complete.

  • Onloadtypedefinition event of application also happens in XPLATFORM Script

usernotify()

  • It is the even that happens on PlugIn in the case of calling userNotify () function in XPALTFORM Script.

  • In XPALTFORM Script, the factor value of userNotify () function is applied intactly as the factor value of the event.

XPLauncher

XPLauncher is an activeX module used to perform XPLATFORM Engine as an exclusive browser. This module is included in the following setup files.

XPLauncher is an object on the web browser so it has elements (property, method, event). Here, only a rough explanation on elements is done. For detailed explanation, refer to “XPLATFORM Reference Guide”.

CLASS ID

Classid for AcitveX is “A30D5481-7381-4dd9-B0F4-0D1D37449E97”.

Following is the HTML code for activating this module.

<SCRIPT LANGUAGE="javascript">
document.write('<OBJECT ID="XPlatformAXCtrl" CLASSID="CLSID: A30D5481-7381-4dd9-B0F4-0D1D37449E97"'
+'"CODEBASE="http://127.0.0.1/XPLATFORM9_XPLauncher.cab#VERSION=2011,10,28,1"  onError="fn_onError()" >'
+ '<PARAM NAME="key" VALUE=" XP_Sample ">'
+ '<PARAM NAME="xadl" VALUE="http://127.0.0.1/XP_Service/ SampleADL.xadl">'
+ '</OBJECT>');

Property

Following shows the property value of XPLauncher. The values marked as required must be designated to drive XPLATFORM engine.

Property name

required

Description

Default value

Key

O

It sets the key value of the service.

It has to be the only value of the same ADL.

No default value

Xadl

O

It designates the ADL route of the service.

No default value

commthreadcount

X

It designates the number of communication thread XPLATFORM Engine uses.

It is desirable to set the value high if the user’s device has many CPUs.

This function is used only for communication process, so in the case of wanting to use multiple communications at the same time, you can get a fast response by increasing the number. However, in the case of the network itself being slow the effect will not take place even after increasing the number.

Default value =5

componentpath

X

It designates the path of how components will be saved on the user’s PC.

Generally this value is not designated.

Default value

="%USERAPP%\TobeSoft\XPLATFORM\9.2\Component\"Refer to “Alias path” for value of %USERAPP%.

errorfile

X

This is the defined file path of the error information XPLATFORM engine outputs. When not designated the basic error information of XPLATFORM Engine will be output.

Generally it is not designated.

No default value

globalvalue

X

When XPLATFORM Engine is run, this property sets the additional variable to globalvariable.

No default value

loadingimage

X

This property sets the images XPLATFORM Engine shows while loading screen, data

In the case server path is entered in, download and save under the designated ComponentPath.

No default value

splashimage

X

It designates the path for splash image that will be shown while XPLATFORM Engine is loading.

If not an image is selected, the basic image of XPLATFORM will be output.

This image is shown in the middle of the screen.

This image is shown only while XPLATFORM engine is loading.

No default value

onlyone


This property decides whether key and XADL value will be launched only once in the same instance or not.


Default : false

commthreadwaittime


When the thread XPLATFORM application program uses is doing nothing, the thread shuts down. This property sets the time (seconds) to wait before shutdown.

enginesetupkey


This property designates the ProductKey value of a specific version of XPLATFORM that will be used as execution route.

In the case of using a setup module exclusively made by the website, if you set the product that is given when making setup in property, you can solve the problem of not being able to run runtime in launcher because of the fixed route.

Method

Following roughly shows the methods XPLauncher can run.

Method name

Description

launch()

  • Runs XPLATFORM Engine as an exclusive browser.

makeshortcut()

  • Creates shortcut icon.

isexistshortcut

  • This method checks if the shortcut icon that is relevant to the input factor exists.

getEngineVersion

  • It is a method to bring engine setup version that is relevant to engine key installed on the system.

download

  • It is the method that downloads the used resources when running application.

deleteshortcut

  • It is the method of deleting shortcut icons.

addWebInfo

  • It is the method that adds the cookies information of the current browser to cookies variables of globalvariable.

Event

Following shows the events that occur in XPLauncher.

Event name

Description

error()

  • This event occurs when an error occurs while running XLaucher.

XPLATFORM.exe(V9.2 altered)

XPLATFORM Engine can be run directly on the command line of MS Windows. It usually uses shortcut icons and you can run the file XPLATFORM.exe in many different options.

Execution Syntax

Following is an example of using option.

XPLATFORM.exe –option1 option1_value –option2 option2_value … -optionN –optionN_value

Execution option

Following is a description of options.

Execution option

Value

Description

X

(required)

Path name(string)

Designates the path of ADL document.

K

(required)

KEY name(string)

Sets the key value of service.

Needs to be the only value of services on url.

C

Path name(string)

Designates the path component is installed on user device.

If not designated, it will be designated to

"%USERAPP%\TobeSoft\XPLATFORM9\9.2\Component\".

\"Refer to “Alias path” for value of %USERAPP%.

SP

Path name(string)

Designates the path of Splash Image.

If not designated, the basic image of XPLATFORM will be output.

This image is shown in the middle of the screen.

This image is shown only while EXPLATFORM Engine is loading.

LF

Place value(int)

Designates the LEFT place of the first execution of application.

Applies to the MainFrame of the first screen.

TP

Place value(int)

Designates TOP place of the first execution of application.

Applies to the MainFrame of the first screen.

WD

Size

(int)

Designates the WIDTH of first execution of application. Applied to the MainFrame of the first screen.

HT

Size(int)

Designates the HEIGHT of first execution of application.

Applies to the MainFrame of the first screen.

ERR

Path name (string)

Designates the path for “errordefine.xml” file which defines the error code value.

It is used to alter the error information XPLATORM Engine outputs.

If not designated, the basic error information of XPLATFORM Engine will be output.

THR

Number(int)

It designates the number of threads of managers within the engine and others.

If not designated, it will be set to five.

If the user’s device has high specifications, it is desirable to set the value high.

TW

Time

(int)

It designates the time the communication thread of XPLATFORM Runtime will wait for.

LG

Path name(string)

It designates the path to set LoadingImage.

OO

Whether – is or not (bool)

When Runtime engine is launched with the same key, XADl, it sets whether only one runtime engine will be launched or not.

GF

File name (string)

It is the Temp file name used to pass on XPLATFORM value when GlobalVariable is set on launcher. It is read when XPLATFORM is uploaded, and then deleted. It may not work properly if you input yourself and not use the launcher.

V

Variable character string (string)

It sets the list of variables to add to global variables when launching runtime engine.

It is entered in the form of

Variable name:type=value Variable name:type=value.

The sorting is done by space. So it becomes the format of A:s=b C:g=d E=f”. For variables that will be used as cookies when communicating, write s for its type and for general variable don’t write anything or write g for its type.

SIE

Whether – is or not (bool)

If an error occurs while loading adl it decides whether to shut down after popping many message boxes.

CT

Time second(int)

It sets Timeout which checks if the initial network is connected. Whether network is connected or not is checked before application is running. If the network is not connected during the time, it shuts down automatically.

SCR

(V9.2 modified)

Screen ID character string (string)

It designates the ScreenID to be used in LayoutManager.

XPLATFORM.exe file path

XPLATFORM.exe file is installed as “XPLATFORM9_SetupEngine.cab” or “XPLATFORM9_SetupEngine.exe”

For MS Windows, below is the setup path.

\Program Files\TOBESOFT\XPLATFORM\9.2\XPLATFORM.exe