Referring to properties

IBM® UrbanCode™ Deploy provides several ways to refer to properties.

Referring to properties

Properties can be referred to by scope or without scope. You refer to a property by scope this way:
${p:scope/propertyName}
If you create an environment variable that is named UAT, you can refer to it this way:
${p:environment/UAT}
You refer to a property without scope this way:
${p:propertyName}
You can refer to the same environment variable without scope this way:
${p:UAT}
Use the ? syntax if you are not sure about a property name:
${p?:propertyName}

This syntax returns a blank if the property is not found, and avoids the undefined property error.

Properties in application processes and component processes

When you create or edit process steps for applications and components, you can use the autocomplete feature to determine which properties are available in a particular context. When you are editing an input field for a process step, if you type ${p:, a list of the available property scopes is displayed. Select a scope from the list. The list of all available properties in that scope is then displayed. Select the property to use from the list.

Secure properties

When you create a property, you can specify whether it is secure. Secure properties are stored in encrypted form. Secure properties are encrypted with a DESede encryption algorithm with CBC and PKSC5Padding modes and a 168-bit key. Secure properties are displayed in obscured form in the user interface.

If you create a custom plug-in that uses secure properties, the property value is displayed in obscured form in the user interface. For example, if your plug-in prints the property value to standard output and you examine the standard output in the user interface, the property value is displayed in obscured form.

If your custom plug-in writes the property value to a file, then the property value is not obscured.

Property order of precedence

If a property is defined in multiple places, its value is determined by the property order of precedence. The following list defines the order of precedence from highest to lowest:

Process
Component version
Resource
Agent
Environment
Component
Application
System

If you have an environment property that is named ${p:environment/db.hostname} and a resource property with the same name, you can refer to the resource property by using ${p:db.hostname} or ${p:resource/db.hostname}. Because the resource property is higher on the order of precedence than the environment property, in this case you must refer to the environment property by using the scoped format: ${p:environment/db.hostname}.

Setting multiple component properties by environment

When components share a property, you can save time by setting the property value on the environment instead of setting it on every component. To use this feature:

  1. Click Components > selected component > Configuration > Environment Property Definitions.
  2. On the Environment Property Definitions page, define the property.
  3. Repeat the process for each effected component.
  4. On the environment that uses the components, click Configuration > Environment Properties > Set a Single Value.
  5. Set the property value.

Component version properties

Properties can be defined for component versions. Each version can have a unique property value. To use this feature:

  1. Click Components > selected component > Configuration > Version Property Definitions.
  2. On the Version Property Definitions page, define the property. By default, this value is applied to every version that is created for this component.
  3. To override a component version property with a unique value, click Configuration > Version Properties for the version.
  4. Set the property value.

Using the ? wildcard in property references

The question mark character, ?, can be used to reference properties. The syntax is:
${p?:propertyName}
For example:
${p?:agent/wsadmin.path}
returns the value of the property if it exists, otherwise it returns an empty string.

Escaped characters

IBM UrbanCode Deploy escapes the following characters:
\
=
,

Replace "\\" with "\"; "\=" with "="; and "\," with ",".


Feedback