Altova MapForce 2025 Enterprise Edition

Global Resource Setup Part 2

Home Prev Top Next

The second part of the global resource setup consists in defining properties of a global resource in the Global Resource dialog box. The properties depend on the type of a global resource (see subsections below). You can access the Global Resource dialog box by clicking the Add button in the Manage Global Resources dialog box.

 

To find out more about setting up different types of global resources, see the following examples: XML Files as Global Resources, Folders as Global Resources, Databases as Global Resources.

 

Files

The file-specific properties are shown in the Global Resource dialog box below. The setup has three major parts: (i) the name of the file, (ii) the location of this file, and (iii) the list of configurations defined for this file alias.

MF_GlobalRes_Setup2_1

The settings Result of MapForce Transformation and Result of StyleVision Transformation are discussed in Transformation Results as Global Resources.

 

Folders

The folder-specific properties are shown in the Global Resource dialog box below. The setup has three major parts: (i) the name of the folder, (ii) the location of this folder, and (iii) the list of configurations defined for this folder alias.

MF_GlobalRes_Setup2_2

 

Databases

When you add a database connection as a global resource, a connection wizard guides you through the steps required to set up the connection. For more information, see Start Database Connection Wizard. Once you complete the wizard, the database connection parameters are displayed in the Global Resource dialog box (see screenshot below).

mf_globalresource_09

In the Global Resource dialog box, it is possible to edit some of the database connection parameters. The parameters are grouped into two categories: database parameters and MapForce-specific execution parameters (see below).

Database

These parameters are shared among Altova applications. In MapForce, they are used at design time, that is, when the mapping is loaded, or when you click the Output pane in MapForce to preview the mapping.

 

MapForce-specific execution parameters

These parameters are applicable when you generate program code or compile a mapping to MapForce Server execution file (.mfx). They are used at mapping runtime as follows:

 

In generated C++, C#, or Java program code.

If you compile the mapping to a MapForce Server execution file, and automatic JDBC conversion takes place. For more information about automatic JDBC conversion, see Database mappings in various execution environments.

 

If a mapping uses a Global Resource to connect to a database, the database connection details in the Global Resource dialog box take precedence over those defined in the mapping. The Component Settings dialog box informs you that the connectivity parameters are defined as a Global Resource. To change the database component to connect to the database directly (without using Global Resources), click Change, and follow the wizard steps to reconnect to the database.

 

Global Resource dialog icons

 

_ic_add_gr_config

Add Configuration: Pops up the Add Configuration dialog in which you enter the name of the configuration to be added.

glob-copyic

Add Configuration as Copy: Pops up the Add Configuration dialog in which you can enter the name of the configuration to be created as a copy of the selected configuration.

ic_DeleteConfig

Delete: Deletes the selected configuration.

ic_SaveAsFilePath

Open: Browse for the file to be created as the global resource.

ic_OpenFolder

Open: Browse for the folder to be created as the global resource.

 

 

Global resource setup: General procedures

The broad procedure of creating and configuring global resources is described below:

 

1.Click the _ic_global_resource toolbar button (Manage Global Resource). Alternatively, go to the Tools menu and click Global Resources.

2.Click Add and select the resource type you wish to create (file, folder, database). The Global Resource dialog box will appear.

3.Enter a descriptive name in the Resource alias text box (e.g., InputFile).

4.Setting up the default configuration depends on the type of the global resource: (i) For a file or folder, browse for the file or folder to which this resource should point by default; (ii) for a database connection, click Choose Database and follow the Database Connection Wizard to connect to the database (see Connecting to a Database). This database connection will be used by default when you run the mapping.

5.If you need an additional configuration (e.g., an additional output folder), click the _ic_add_gr_config button in the Global Resource dialog box, enter the name of this configuration, and specify the path to this configuration.

6.Repeat the previous step for each additional configuration required.

 

Note:Database connections are supported as global resources only in MapForce Professional and Enterprise editions.

 

© 2018-2024 Altova GmbH