Substitution Variables

A substitution variable is a variable that you can reuse in resource, logging, and application configurations. Substitution variables enable late binding of property values to values set at administration time. For example, you can create an HTTP client resource template and bind its port property to a substitution variable that is set when the template is instantiated. The types of substitution variables are:

  • String (default type)
  • Integer
  • Boolean
  • Password

You can create substitution variables at design time and during administration. At design time, instead of explicitly setting property values, you can bind them to substitution variables. During administration, you set the substitution variables values to values supported by the resources available on the node on which the components and bindings are deployed.

A substitution variable is identified by a name. Names may not contain whitespace. When a property value is bound to a substitution variable, the property value is a string containing the substitution variable name surrounded by two pairs of percent signs.

Substitution variables are defined in substitution variable files. When you create an SOA project, a file named SubstitutionVariables.substvar is automatically added to the project in the Resource Templates special folder. By default, the file does not have any variables defined. You can also create additional substitution variables files.