Salesforce

Starting and Stopping the Magic xpi Project (Magic xpi 4.14)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Starting and Stopping the Magic xpi Project (Magic xpi 4.14)

  1. Starting a project can be done manually in one of the following ways:

    • By clicking the link. The Start link is created in the project’s directory when the project is built. The link points to the start.xml configuration file.

    • By clicking the Start option from the Monitor or the Debugger. This option also uses the start.xml file that is in the project folder.

  1. The options in step 1 create a server entity (or entities) in the IMM with the metadata from the project’s start.xml file, a unique ID and a status of START_REQUESTED.( You can see the server entities and the statuses in the Monitor.) Every time you start the project, another instance of the entity is created in the IMM.

  2. The IMM-Controller scans IMM looking for server entities whose status is WAITING_FOR_AGENT.

  3. Once the IMM-Controller finds a server entity with a status of WAITING_FOR_AGENT, it scans for the IMM according to the host name or IP address defined in the server entity, which is based on the start.xml file. The Controller passes all of the parameters/startup information defined in this server entity to the IMM-Agent.

  1. The IMM-Agent running on the host machine specified in the server entity starts the Magic xpi Server (the MgxpiServer.exe process, also known as the engine) according to the parameters passed to it from the IMM-Controller.

    • If a project is not running, the first MgxpiServer.exe process that starts will create the project by loading the project entity to the IMM.

    • If a project is running already, the loaded MgxpiServer.exe process will join the existing project and add its own workers and triggers to the work force.

  1. One of the parameters passed to the Magic xpi project is also the ID of the server entity created in the IMM. When the Magic xpi server registers, it connects to the IMM and searches for the server entity identified by the ID and updates the status to RUNNING. For more information about the project's running sequence, click here.

  2. The server can now start handling requests.

Stopping a project can be done by:

  • Clicking the link. The Stop link is created in the project’s directory when the project is built.

  • By clicking the Stop option from the Monitor or the Debugger.

Startup Failed

If a server entity’s status remains as START_REQUESTED and does not change to RUNNING, the Imm-Controller checks with the IMM-Agent to see whether the actual process is running. If the process is not running, the server entity’s status will change to START_FAILED. If the process is running, the Controller will first instruct the IMM-Agent to terminate the process and then it will update the server entity with START_FAILED.

Reference
Attachment 
Attachment