Altova MapForce Server 2024 

Global Resources

Home Prev Top Next

Altova Global Resources are aliases for file, folder, and database resources. Each alias can have multiple configurations, and each configuration maps to a single resource. Therefore, when you use a global resource, you can switch between its configurations. For example, you could create a database resource with two configurations: development and production. Depending on your goals, you can switch between these configurations. In MapForce Server, you can retrieve data from the development or production database by using the desired configuration as a command line parameter at mapping runtime.

 

Global resources can be used across different Altova applications (see subsection below).

 

Global resources in other Altova products

When stored as global resources, files, folders, and database connection details become reusable across multiple Altova applications. For example, if you often need to open the same file in multiple Altova desktop applications, you can define this file as a global resource. If you need to change the file path, you will need to change it only in one place. Currently, global resources can be defined and used in the following Altova products:

 

Altova Authentic

DatabaseSpy

MobileTogether Designer

MapForce

StyleVision

XMLSpy

FlowForce Server

MapForce Server

RaptorXML Server/RaptorXML+XBRL Server

 

For more information about creating Global Resources, refer to the "Altova Global Resources" chapter of MapForce documentation.

 

Resources in MapForce Server

When you compile a mapping to a MapForce Server execution file (.mfx), any global resource references used by the mapping are preserved, not resolved. This means that you will need to provide these references on the server side in order to run the mapping successfully. In MapForce Server, the following is required to run a .mfx file which uses global resources:

 

1.The Global Resources Definitions file. On the machine where MapForce is installed, the file is called GlobalResources.xml. You can find this file in the Documents\Altova folder. You can copy this file to the machine where MapForce Server runs and create multiple such files if necessary.

2.The Global Resource configuration name. Each Global Resource has a default configuration. You can also create additional configurations.

 

In MapForce, the Global Resource Definitions file and the Global Resource configuration name are set or changed from the graphical user interface. In MapForce Server, these are specified at mapping runtime (see below).

 

If you run the mapping through the command line interface, set the options --globalresourceconfig and --globalresourcefile after the run command, for example:

 

C:\Program Files (x86)\Altova\MapForceServer2024\bin\MapForceServer.exe run SomeMapping.mfx --globalresourcefile="C:\Users\me\Documents\Altova\GlobalResources.xml" --globalresourceconfig="Default"

 

If you run the mapping through the MapForce Server API, call the method SetOptions twice before calling the Run method. The first call is required to supply the Global Resource Definitions file path as an option, and the second call is required to supply the Global Resource configuration name. For further information, see the MapForce Server API.

© 2017-2023 Altova GmbH