WebSphere Lombardi Edition 7.2 > Modeling processes > Basic modeling tasks


Set environment variables

Each process application and toolkit created in the Process Center repository includes environment variables. You should take advantage of these environment variables to ensure that your process implementations are utilizing correct values no matter which environment you deploy to or how much your environment changes at run-time. For example, suppose your process includes an implementation that requires the port number for an external application. By using an environment variable, you can set the port number for each environment in which the process will run. Plus, administrators can Configure installed snapshots.verify and adjust environment variable values from the Process Admin Console after a process application is installed

To set environment variables:

  1. Open the appropriate process application or toolkit in the Designer view

  2. Click the Setup category and double-click Environment Variables as shown in the following image:

  3. In the Environment Variables editor, click the Add button to add a new variable.

  4. Click the <NEW VARBL> placeholder in the Key cell, type the name of the new environment variable, and press Enter.

    Environment variable names should start with a lowercase letter, with words separated by periods. The following examples are all valid names: sapconnector.port, sapConnector.port, and sap.connector.port

  5. Click the Type cell for the newly entered variable and if this variable is to support connection to an ILOG JRules Rule Execution Server in each Lombardi environment, select ILOG Rule Server from the drop-down list. Otherwise, leave the Type cell blank.

  6. Click the Default cell for the newly entered variable, type in a value, and press Enter.

    If you do not provide values for the other environments, the default value is used for all environments.

  7. If you know the value for the Development, Test, Staging, or Production environment, click the appropriate cell, type in the value, and press Enter.

    If you do not know the appropriate value for each environment, you can leave the setting blank and an administrator can provide the correct value after installation If you do not provide a value for an environment and an administrator does not provide a value after installation, Lombardi uses the default value.

    The following image shows two environment variables set:

  8. To use one of the preceding variables in a script in the current process application, you can simply use the variable key preceded by tw.env. For example, to set the value of a process variable to an environment variable in a JavaScript, you can type:

    "tw.local.port = tw.env.sapconnector.port"

    If the environment variable you want to use in your script is in a toolkit, you can precede the variable key with tw.env.toolkit.[toolkit_acronym]. So, to use the same environment variable from a toolkit with an acronym of BA, you can type:

    "tw.local.port = tw.env.toolkit.BA.sapconnector.port"

To remove an environment variable, click the Key cell and then click the Remove button.

Parent topic: Basic modeling tasks

+

Search Tips   |   Advanced Search