Source variables

Previous Next

A variable is a variable element in a text string that is given a value ( = that is expanded; of which the name is substituted by a value) at a later time than when the text string is declared.

A source variable is a text string that is expanded before it is handed to other environments than Development (the "source"). Source variables play a role in Development only.

You can use source variables in 3 contexts:

Values of task step parameters of type "Folder or File".

Values of task step parameters of type "SQL Command".

Custom XSL documents.

An occurrence of a source variable in a task is expanded when that task is checked.

The name of a source variable must start with the symbols ${ and end with the symbol }. The name contained by the curly braces must start with a letter (a-z, A-Z), and the rest of that name must be made up of alphanumeric characters. Full stops, hyphens and underscores are also allowed.

Names of source variables are case-sensitive. You cannot have overlapping source variable names, nor can you have names that overlap if it were not for the lowercase/uppercase distinction.

The value of a source variable is allowed to be any text string. Source variables support recursive substitution.

After you initialise a release tree, Delivery Manager distinguishes a number of predefined source variables. These identify special folders on the file system:

Predefined source variables

${previous}

The folder where the deliverables of the previous version were released to.

${release}

The folder where the deliverables of the current version are released to.

${root}

The parent folder where deliverables of current and past releases are found.

${prev_vs}

The previous release version number (or name)

${curr_vs}

The current release version number (or name)

 

You can also create source variables of your own.

 

 

Example

This example shows a source variable in a SQL statement submitted as a task step parameter of type "SQL Command."

INVOKE XML.EXPORT WITH

SELECT    '${release}\custom\initdata\Catalogue.xml' WriteOutputTo

,         *

FROM      tour

 

The variable is expanded when the task is checked. The result could look like this:

INVOKE XML.EXPORT WITH

SELECT    \\fs\myapp$\Releases\2.1.12\custom\initdata\Catalogue.xml' WriteOutputTo

,         *

FROM      tour

 

 

See Also

Setting a source variable

Recursive substitution in source variables