Expressions

A dynamic property expression allows you to source information from other places like a custom property, another dynamic property of the Components or a property in another entity, for example, a Deployment Target or an Environment.

This page includes the following:

Syntax

Note: For security reasons, using/referencing “foreign” protected properties is not supported. You can define protected properties at application level and can reference them at component level to use them for component deployment Workflows.

Absolute paths

Absolute paths replace the expression with the value of another property (referenced by its full name) which is available on the same entity. If the other property is not found, a warning is logged and nothing is returned.

Relative paths

Expressions not starting with a / searches for the variable in the same namespace.

Double Evaluation

You can use expressions within expressions. The expressions are evaluated from inner to outer.

Note: If the types of referenced dynamic properties differ they get cast automatically to the correct type (if applicable).

Context and Related Entities

Dynamic properties can reference properties of related entities which are available at deployment time. For example, a database component may access the ip-address property of the target on which it gets installed. The component may be installed on multiple deployment targets, so the property value changes depending on the component-target combination which gets currently evaluated.

During deployment, the properties are always evaluated for a single component on a single target. Therefore the dynamic properties of the following entities can be referenced:

To access the dynamic properties of a related entity, use the following expression {@[related entity]/[property name]}. If no related entity is defined in the expression, the originated context is the component. If a dynamic property that is fetched within an expression is overridden on another entity the overridden value is evaluated.

If the related entity or the property on the related entity is not found a warning gets logged and an empty string returned.

Example:

Global variables

The following global properties are available in an expression {@global/[property name]}:

Component Links

In addition to the predefined related entities, all linked components that are defined via Component Links can be accessed like related entities via the link name. See: Working with Component Links

Endpoints

When deploying a component to targets and the targets have a deployment handler (see Deployment Panel on targets), the properties of the component are not evaluated against each endpoint/target individually, but only once against the deployment handler. Some Actions expect information of the actual endpoints. To access information of the endpoints, use the expression {@endpoints/[property name]}. This returns the property values of all endpoints that are managed by the deployment handler that gets currently evaluated, separated with commas.

Notes:

Using Curly Brackets in Expressions

If you want to use curly brackets in expressions, you must escape them. To do so:

  1. Define a Dynamic property of type static text that contains the open bracket and another one that contains the closing bracket. For example, /cb_open = { and /cb_close = }
  2. Use these Dynamic Properties in expressions wherever needed. For example, if you want a connection string to look like this:

    SQLDRIVERCONNECT=ODBCVAR=SNNNNNRN,Driver={SQL Server Native Client 11.0};Server=tcp:dbserver,1433;Database=ae_db;Uid=ae_user;PWD=--XXX;MARS_CONNECTION=Yes

    Define the dynamic property expression as follows:

    SQLDRIVERCONNECT=ODBCVAR=SNNNNNRN,Driver={/cb_open}SQL Server Native Client 11.0{/cb_close};Server=tcp:dbserver,1433;Database=ae_db;Uid=ae_user;PWD=--XXX;MARS_CONNECTION=Yes