Use > Application deployment > Components > Parameters and special variables

Parameters and special variables

In certain types of components, you can use component parameters to represent information that may differ depending on the application, release, version, target, tier, or environment.

In the following Configuration File component, the parameters DBHOST and DBPORT are used to represent the database server host names and database port, respectively.

Example of parameters

The notation for a parameter reference is as follows: @{parameter_name}

When you reference a parameter by using this notation in the Content box, the parameter definition appears in the table immediately below the Content box.

  • The Name of the parameter is what appears between the curly braces in the Content box.
  • A component parameter name may not contain the following characters: space, \, @, {, or }
  • If the box in the (required) column is selected, the parameter is required to have a value when the component is deployed.
  • If the box in the (encrypted) column is selected, the parameter is encrypted, and its value is not displayed anywhere in the Application Deployment user interface.

The value of a parameter can be a simple number or text—as in the DBPORT parameter in this example—or it can be a variable whose value is assigned at deployment time. The DBHOST parameter in the example references a variable that represents a comma-separated list of the host names of the servers that are part of the Oracle 11.2.0.1 tier in the specified target.

There are three types of variables that you can use to specify parameter values: special variables, release parameters, and global parameters. Each has a specific purpose and function (see Types of variables).

When you specify the value of a parameter in the component definition, you are specifying the default value for that parameter. You can modify that value at deployment time. This is useful, for example, if you want to override the default value for a specific target or environment (see Customize deployment parameters).

For information about creating, managing, and referencing parameters, see Working with parameters and variables. For information about rules and constraints related to parameters, see Special considerations.

Types of variables

There are three types of variables that you can reference in a parameter definition:

 

Type

Description

Special Variables

Special variables are build into Application Deployment. They represent information that is not determined until you specify a version and a target on the Deployment screen.

A special variable pertains to one of three things: what is being deployed (the application, release, or version), where it is being deployed (the target or environment), or who is deploying it (the SA user).

See Special variables.

Release Parameters

Release parameters are available to all components within a release. They are created and managed by the application owner and can be modified by anyone who has permission to edit the application. The value of a release parameter does not change unless it is explicitly modified.

A release parameter has the same value within a specific version of the release.

See Release parameters.

Global Parameters

Global parameters are available to all applications. They are created and managed by the Application Deployment administrator. The value specification of a global parameter does not change unless it is explicitly modified by the administrator.

The actual value of a global parameter can vary depending on the environment and target.

See Global parameters.

All three types of variables can be referenced by using the Select Special Variable dialog:

This dialog can be accessed at different points in the Application Deployment process (see Accessing the select special variable dialog).

At deployment time, Application Deployment resolves the value of each component parameter by recursively following any references to special variables, release parameters, and global parameters.

For example, say that a component parameter named LogDir is defined as follows:

The release parameters, AppDir and LogDir, are defined as follows:

The global parameter AppBaseDir is defined to be /opt:

The default parameters look like this in the version:

Assuming that there are no target or environment overrides, the ultimate value of the component parameter LogDir will be /opt/ThisApp/log when the component is deployed:

Special variables

Special variables represent information about the following types of items:

  • The server where the component will be deployed
  • The tier that contains that server
  • The application to which the component belongs
  • The release and version being deployed
  • The environment where the targets reside
  • The SA user who initiated the deployment

In the following example, the DBHOST parameter refers to a variable that represents a comma-separated list of the host names of the servers that are part of the Oracle 11.2.0.1 tier.

Parameter that references a special variable

Although the values of some special variables may be known earlier, their values are not assigned (bound) until deployment time.

Note that “Server Name” special variables refer to the name of the server in SA. This name can be changed in SA without any change to the actual server host name. “Hostname” special variables refer to the actual host name of the server. The SA server name may or may not be the same as the host name.

For information about referencing a special variable in a parameter definition, see Specifying the value of a parameter.

Release parameters

Release parameters have values that are the same within a specific version of a release. They can be referenced by any component in the release. In the following example, the APP_DIR release parameter is used to represent the installation directory for the application:

Example of a release parameter

You can “build” the parameter value by adding information before or after the release parameter reference. In this example, the LOG_DIR parameter value adds the text “/log” to the value of the APP_DIR release parameter.

Release parameters can reference global parameters, special variables, and other release parameters (within the same release).

If you have permission to edit an application, you can define or modify release parameters for any release of that application (see Defining a release parameter).

When a new release is cloned from an existing release, the release parameters are also cloned.

Global parameters

Global parameters are the same across all applications. They can be referenced by any component in any application. They can also be referenced by release parameters. The following example uses the OUR_NAME global parameter to represent the name of the company:

Example with a global parameter

As you can with release parameters, you can build the parameter value by adding information before or after the global parameter reference. In this example, the OUR_RGN parameter value adds the text “_EMEA” to the value of the company_name global parameter.

Global parameters can reference special variables and other global parameters.

Your Application Deployment administrator manages the global parameters (see Administer application settings for more information).

Working with parameters and variables

The topics in this section provide “how to” information to help you do the following things:

Specifying a component parameter

If you have permission to edit (or create) an application, you can add a parameter to the content of a Script or Configuration File component included in that application.

OO Flow and Application Configuration components can also use parameters. You can modify the value of the parameters for those component types, but you cannot add or delete the parameters themselves.

Example of a parameter reference in a script component

To add a parameter to the content of a Script or Configuration File component:

  1. In the Content box, type the name of the parameter by using the following notation:
    @{parameter_name}

    A parameter name may not contain the following characters: space, @, \, {, or }.
  2. Optional: If the parameter is required to have a value when the component is deployed, select the box in the (required) column.
  3. Specify the parameter value. You can specify a constant value, reference a variable, or both (see Specifying the value of a parameter for instructions).
  4. Optional: If you want the parameter to be encrypted, select the box in the (encrypted) column.
  5. Click the “Save Release” button on the tool bar to save your changes.

Specifying the value of a parameter

If you have permission to edit an application, you can change the default value of any of its component parameters. You can also change the value of its release parameters. You can specify a constant value (text or a number), or you can reference any of the items in the following table.

 

Variable reference formats

Variable Type

Format

Example

Special variable

${special_variable_name}

${application.name}

Release parameter

${release=>parameter_name}

${release=>APP_DIR}

Global parameter

${global=>parameter_name}

${global=>APP_BASE_DIR}

You can select a variable from a list of pertinent special variables, release parameters, and global parameters by using the Select Special Variable dialog.

You can combine text with variable references, as shown in these examples:

${release=>APP_DIR}/log

/var/${application.name}/my_data

${global=>TestBaseDir}/${application.name}

To specify the value of a parameter:

  1. In the parameter table, click anywhere in the Value column for the parameter that you want to specify. A text box and a button appear in the Value column:
  2. Follow these steps to select a special variable, release parameter, or global parameter reference from a list:
    1. Click the button. The Select Special Variable dialog opens.
    2. Select the special variable, release parameter, or global parameter that you want to reference.
    3. Click OK. The variable reference now appears in the Value column.
  3. Optional: Specify any additional text that you want to include in the parameter value.
  4. Click Save Release on the tool bar to save your changes.

If you have Deploy permission for the application and Write permission for the pertinent environment, you can override the default parameter values at deployment time by following similar steps in the Parameter Editor (see Customize deployment parameters).

Defining a release parameter

If you have permission to edit an application, you can define or modify its release parameters. These parameters are available to all components included in the release; they are not available outside the release.

To define or modify a release parameter:

  1. On the Application screen, select the release that you want to work with.
  2. On the tool bar, click Edit release properties. The Release Attributes dialog opens.

    You can also open this dialog from the Manage Applications tool (see Managing applications).
  3. To add a new release parameter, follow these steps:
    1. Click Add Release Parameter button.
    2. Enter the Name of your new parameter. The name must be unique within the release parameters. The name cannot include any of these characters: @, \, {, or }.
    3. Click OK.
  4. Click anywhere in the Value column for this parameter.
  5. Specify the value of the parameter (for detailed instructions, see Specifying the value of a parameter).

    You can reference special variables, other release parameters, and global parameters in the value specification. For example:

  6. Optional: To encrypt the parameter value, select the box in the (encrypted) column.
    Note that the (required) column is not pertinent in this context.
  7. Click Save Release on the tool bar to save your changes.

Deleting a release parameter

If you have permission to edit an application, you can delete any release parameters that are not referenced by any component parameters or other release parameters. You cannot delete a release parameter that is in use.

To delete a release parameter:

  1. On the Application screen, select the release that you want to work with.
  2. On the tool bar, click Edit release properties. The Release Attributes dialog opens.
  3. In the Release Parameters table, select the parameter that you want to delete.
  4. Click Delete Parameter. A confirmation dialog appears.
  5. Click Yes to confirm the delete.
  6. Click Save Release on the tool bar to save your changes.

Accessing the select special variable dialog

You can open the Select Special Variable Dialog from various places in the Application Deployment user interface.

How to open the select special variable dialog

Location

Parameter Type

Instructions

Application screen

Component

In the component editor, click anywhere in the Value column for any component parameter.

Release

  1. Click Edit release properties.
  2. Click anywhere in the Value column for any release parameter.

Deployment screen

Any

  1. Expand the Parameters section of the Deployment Options area.
  2. Click Edit button in the upper left corner of the Parameters section. The Parameter Editor dialog opens.
  3. In the right-most column, double-click the value of any parameter listed. The Parameter Values dialog opens.
  4. Click the button to the right of the Target Value or Environment Value box.

Administration screen

Global

  1. Go to the Application Settings page.
  2. Click anywhere in the Value column for any release parameter.

Special considerations

Be aware of the following constraints and considerations as you specify parameter definitions.

Cycles

You cannot create circular references (cycles) in parameter definitions. The following specification, for example, will cause an error when you attempt to save the release:

If a cycle is created after you save the application—for example, if the global parameters are later modified— you will not be able to create a deployment job for any new versions of this release. The Deployment screen will report an “infinite loop” error.

Self-referencing

Parameters are not allowed to reference themselves.

Deleting

If a component or release parameter in an existing version references a global parameter, that global parameter cannot be deleted.

If a component or release parameter in the current release references a release parameter, that release parameter cannot be deleted.

If a global parameter A references global parameter B, global parameter B cannot be deleted.

A deployment job will not be created if the version contains a reference to a global parameter that has been deleted.

The warning icon will appear on the application tool bar if you save a release that includes a component that references a release parameter that has been deleted. Click the warning icon to determine which parameter has been deleted.

Naming

You cannot use the following characters in the names of component parameters, release parameters, or global parameters: @, \, {, or }.

You also cannot use spaces in the names of component parameters for Script or Configuration File components. Spaces are allowed in OO Flow component parameter names, release parameter names, and global parameter names.

Release parameter names must be unique within the release parameter list for a specific release.

Global parameter names must be unique within the global parameter list.

Release parameters may have the same names as component parameters or global parameters.

Global parameters may have the same names as component parameters or release parameters.

Importing and exporting

Global parameters and release parameters can be imported and exported (see Import and export data).

Only those global parameters that are referenced by one or more release or component parameters will be imported when a partial import is performed.

Overriding

Environment or target value overrides created for a given release parameter will also be used for all releases that are cloned from the original release.

Target and environment overrides for global and release parameters follow the same order of precedence as component parameters. A target override supersedes an environment override, and an environment override supersedes the default value.