# Configuration Management and Version Control With Iguana

## Contents

If you want to ensure that all VMD files that your Iguana server uses are contained in the same directory as the configuration file and the data, you must use a relative path to specify the location of any VMD file used in a channel definition.

There are two similar (but different) types of relative paths used in Iguana:

1. Relative paths used by various HL7 and X12 built-in library functions.
2. Relative paths used in the LLP Listener source component.

# Relative paths for HL7 and X12 library functions

Iguana stores all of it VMD (and other) project files in the other directory. Iguana uses the other directory as a starting point, and then determines the location of VMD files relative to the other directory.
Note: These “other project files” can be shared between projects, so when multiple projects use the same file there is only a single copy stored within the other directory.

The other directory is located within the working directory, and defined as <working directory>\edit\<iguana user>\other\, for example: C:\IguanaConfig\edit\admin\other or C:\Program Files\iNTERFACEWARE\Iguana\edit\admin\other. If you have not explicitly defined a working directory, Iguana uses its installation directory as the working directory (such as C:\Program Files\iNTERFACEWARE\Iguana)

Iguana finds the file by appending the file path + name to the other directory, for example:

These are the built-in functions that use VMD project files with relative paths:

• hl7.parse{} and hl7.message{}
• chm.parse{}, chm.toXml{} and chm.transform{}
• x12.parse{} and x12.message{}

Consider the following code snippet:

In this example we assume a custom windows install, with a working directory of C:\IguanaConfig\, and that we are logged on as the admin user.

# Relative paths for the LLP Listener

The LLP Listener stores VMD files relative to the Iguana working directory (unlike library functions that use the other directory). If you have not explicitly defined a working directory, Iguana uses its installation directory as the working directory (such as C:\Program Files\iNTERFACEWARE\Iguana).
Note: These files can be shared between channels, so when multiple channels use the same file there is only a single copy stored within the workiing directory.

Iguana finds the file by appending the file path + name to the working directory, for example:

• “autoack.vmd” becomes “<working directory>\autoack.vmd” (i.e., C:\IguanaConfig\autoack.vmd or C:\Program Files\iNTERFACEWARE\Iguana\autoack.vmd)
• “vmdfiles\autoack.vmd” becomes “<working directory>\vmdfiles\autoack.vmd” (i.e., C:\IguanaConfig\vmdfiles\autoack.vmd or C:\Program Files\iNTERFACEWARE\Iguana\vmdfiles\autoack.vmd).

Consider the following LLP Listener component definition:

In this example, the location of the VMD file in the ACK VMD path field is specified by the relative path vmdfiles\autoack.vmd. If the Iguana working directory is D:\build\v3, the server will look for the VMD file in D:\build\v3\vmdfiles\autoack.vmd.

If you specify relative paths for all of your VMD files, you can ensure that any version of Iguana that is contained in a directory only uses VMD files that are stored in that directory. This makes it much easier when you want to transfer projects from one server to another (e.g., from development to test, or test to production).

Tip: The simplest solution is to locate all VMD files in the same directory as the IguanaConfiguration.xml configuration file. This means that all path names specified in channel definitions simply have to include the name of the VMD file.

In an LLP Listener channel source component, the default is to assume that the VMD file is in the same directory as the configuration file.

Another solution is to use an environment variable to specify the directory in which the VMD files are stored.

This example uses iguana_dir, an environment variable defined by Iguana, whose value is the location of the directory in which Iguana is installed.