Salesforce

Start.xml (Magic xpi 4.9)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Start.xml (Magic xpi 4.9)

The start.xml configuration file is created by the Magic xpi Studio during the build process (from the Build menu), and only if it does not already exist. This is the configuration file that is used when the project is executed. The file is located in the Magic xpi installation folder.

The start.xml file contains a section for each project. These sections define how each project is deployed on the grid, on which servers the project will run, and how many engines, workers, and triggers the project will contain. If the project is currently not running, the first MgxpiServer.EXE that starts is responsible for loading the project metadata to the Magic Space and for setting the project state to running. Any additional servers only join the work force.

It is possible to modify the start.xml file (using an external editor, such as Notepad or any XML Editor) and to control the project engine’s startup. You can configure the file to start multiple Magic xpi engines for each project, and to control where on the grid those engines run. You can also start multiple projects on multiple servers from a single start operation.

The Start link, the Debugger, and the Monitor all reference the start.xml file when instructed to start the project.

The file's default name is start.xml, as defined by the StartProjectFileName flag. It is based on a template that is located in the Magic xpi installation folder. To see an example of the start.xml file, click here.

You can set up any of the following configurations:

  • Single server + Single engine + Multiple workers

  • Single server + Multiple engines + Multiple workers

  • Multiple servers + Multiple engines + Multiple workers

The start.xml file has the following configurable parameters:

Parameter

Description

ProjectsDirPath=

The project's directory path. You can use this parameter in two different ways:

  • To define a single project location for all servers.

  • To define a specific location for a specific server under the current server.

Server host=

This flag defines the host on which this server should run.

The host definition can either be an IP address or a host name.

alternateHosts=

This flag gives you the option to define an alternate host for the server to work with if the main host is unavailable or if the startup procedure on the main host fails. For more information, click here.

Since version: 4.1

NumberOfWorkers=

This flag determines how many workers the server will load.

You can set different numbers of threads for different Magic xpi servers.

You can load a server without workers, NumberOfWorkers=0, if you want, for example, that the server will only listen for triggers.

The number of workers that will execute a flow at any given time is bound by the number of threads in the license.

The value of this flag must not be less than 0.

The default value is 10.

NumberOfInstances=

If you want several servers to run with the exactly the same configuration, you can define a single server section in the start.xml and define in this flag how many of those sections will run.

The default value is 1.

For more information on the various factors that can influence server performance, click here.

Triggers load=

This flag determines whether the project's triggers, per server, will be set to active when the project starts. Set the flag to either true (default) or false.

When you load more than one server to handle a specific project, there is no need for each server to handle the triggers. You should define that a specific server will listen for trigger events and the other servers will not.

This is not relevant for Web Services triggers and HTTP triggers.

You can also define which triggers will run on each server. For more information, click here. (Since version: 4.1)

Scheduler load=

This flag determines whether the project's Scheduler services, per server, will be set to active when the project starts. Set the flag to either true (default) or false.

Only a single server should load the scheduler; otherwise, you will have duplicate scheduled invocations.

AutoStart load=

This flag determines whether the project's Auto start flows will run when the server starts. Set the flag to either true (default) or false.

Magic xpi recognizes if an Auto start flow has already run, and it will not run again if the server crashes and is restarted.

If you have a flow that initializes database tables, you would not want all the servers that load to initialize the tables when they load.

Even if you set this flag as true under a specific server host, the Auto start flow might run on a different server host instead.

  • The start.xml file holds machines' host names. If you deploy the project on a different machine, you must modify the start.xml file to match the new project location and host name. Alternatively, you can delete the file completely and then rebuild the project.

  • If you build or rebuild a project, the start.xml file's content is not overwritten if that project's start.xml file already exists.

To see our video demonstration about running several instances of a server on one machine, click here.

Reference
Attachment 
Attachment