Property contexts

Properties are available in various contexts. Not all properties are available for all contexts. To plan and set properties, you must know where to access properties and how that setting behaves in context.
The following table shows the contexts in which properties are available and how you can use the properties.
Tip: The context that you set a property in can have narrow or widespread influence. For example, if you set a system property, that property persists in all areas. The key to setting properties effectively is to find a balance to setting narrowly as possible without setting them so narrow that you create extra work for yourself.

Consider this example: Initially you have one Tomcat server, Tomcat.server.url. Later, you add a second Tomcat server. If you set only a system-level property for one server, all subsequent references will target the initial Tomcat server. To differentiate the Tomcat servers, set the properties at the application level or the environment level, depending on your setup. The order of precedence that determines which property by the same name is used, must be considered as you call properties to generate expected results.

The following table shows the order of precedence.

Context Description
environment

Environment properties are available on the Properties tab for environments. Also, components can have component environment properties; these properties transfer to the environment when the component is deployed. An environment property overrides the value that is set on a component environment property that has the same name.

Reference syntax: ${p:environment/propertyName}.

Both the component and environment properties use the same syntax.

For example, assume that you are deploying a web application to three environments. Each environment might have the application server in a different location. You can specify this location in an environment property on each environment.

resource Selects all the properties with the same value in an environment.
application

Available on the application Properties tab. (Click Application > selected application > Configuration > Application Properties.)

Reference syntax: ${p:application/propertyName}.

component Selects all properties with the same value in a system.
process

Available on the application Properties tab. (Click Application > selected application > Configuration > Application Properties.)

Reference syntax: ${p:application/propertyName}.

A process step can access properties that are set earlier by other steps within the process, properties that are set by the application that started the component process, properties on the target environment and resource. Step property values become unavailable after the component process ends.

Reference syntax: ${p:propertyName}.

system

System (global) properties are available on the Settings tab. (Click Settings > Properties.)

Reference syntax: ${p:system/propertyName}.

The system property is broadest. If you plan to deploy an application, use application properties, because it's more specific.

If you have an xyz system property and an xyz application property, and you want to use the value of the system property, you must provide the entire context, otherwise the value resolves to the application property.

iteration

Iteration properties are available within the context of the For Each Agent step. The For Each Agent application process step can run processes for every agent in an environment. See For Each Agent step.

Reference syntax: ${p:iteration/propertyName}.


Feedback