Services (Magic xpi 4.13)

« Go Back


Created BySalesforce Service User
Approval Process StatusPublished

Services (Magic xpi 4.13)

The Services section in the Settings dialog box provides you with a central location for defining the external systems that your Magic xpi project needs to access during project execution. These external systems definitions are saved in an XML file (Services.xml) in your <project name> folder. The definitions can be modified easily, and can take effect at any stage of the project (development or deployment) without the need to rebuild your project. However, after such modification, you will need to either restart the Magic xpi engine or start a new one.

Magic xpi’s environment variables can be used in this dialog box with the following syntax: %environment variable name%. You can reuse predefined environment settings in different projects, and therefore switch execution environments quickly and easily. For example, when you activate a trigger interface, you need to specify the service properties. To do this, you define a service in the Services section and refer to it from that component. Note that environment variables are not supported in the Web Services component.

Some services can use a predefined resource's credentials in their configuration.

You can define the following services in the Settings dialog box's Services section:

To define a new service:

  1. From the Project menu, select Settings to open the Settings dialog box.

  2. In the left hand pane of the Settings dialog box, park on Services.

  3. Click Add. The New Service dialog box opens.

  4. Select one of the services from the Service Type drop-down list. In the Service Name field, enter a name for your new service, and click OK. Note that the service name can contain up to 30 characters and can only contain English characters.

  5. Your new service now appears in the Settings dialog box's Services section, either under the name that you entered or under a generic file carrying the same service type name.

  6. Click on the new service in the left pane. You can enter a description for the service in the field above the service's parameters.

  7. Next, enter the service's parameters. These parameters are different for each service. The parameters that you define here also appear in the Setting section of the component's Properties pane when you drag the component to the trigger area. For more information on specific service parameters, click on the services above.

  8. Each service has additional buttons that are specific to the service and are used to configure the service. For more information on these buttons, click on the service links above.

  9. When you have finished defining your service, click Apply or OK to save your service. You can then close the Settings dialog box. Alternatively, you can close the Settings dialog box without saving your new service.

If you right-click a service, a context menu with the following options opens:

  • Delete

  • Rename

  • Select as default: If you create more than one service under a specific service type, select this option to define one of these services as the default service for that type. The default service will be selected automatically for any new trigger of that type that is used in the project. This option is available when you right-click from a service that is not the default. The default service is identified by its bold font.

When you park on Services in the left hand pane of the Settings dialog box, the Load button is enabled. Click this button to import a service file. You can either overwrite or merge existing entries. Click here for more information.

Magic xpi saves the defined services in two separate XML files. These are:

  • The Services.xml file: Each new project copies the Services.xml template files, located in the <Magic xpi>\Studio\Templates\ProjectTemplates\Magic xpi\Magic xpi Project\Magic xpi file, and places the file under the project folder. Then, the specific configuration for each project modifies the Services.xml file under the project folder. You can configure a project to use a Services.xml file from a different location other than under the project, and instead select files that are under the Magic xpi installation folder.

  • The service_types.xml file: This holds general predefined service type definitions, and is saved in the Magic xpi installation folder in the Runtime folder. There is only one service type definition file for each Magic xpi Studio installation.

  • The services are generated in the %currentprojectdir% Service folder.

  • Service files are saved with an attribute on the root element that identifies them as services.