Command conditions

Depending on the execution context, it might be necessary to run a different set of commands. This flexibility is achieved through the use of conditional commands. The Condition field for a command is used to define the situations when the associated command steps run.

Conditions are evaluated as boolean expressions. If the expression evaluates to true, the command is run. If false, the command is skipped and the next command is evaluated. If no condition is specified, the command is always run. The syntax of a condition is identical to the WHERE clause of an SQL statement, which allows enormous flexibility when evaluating scenarios. Some example conditions are detailed in Table 5-2. Example conditions. Be sure to place single quotes around string literals or tokens that are to evaluate strings.

Table 5-2. Example conditions

Condition

Evaluates to

BLANK

Command is run in all situations.

'[P.P_VERSION_LABEL]' IS NOT NULL

Command is run if the parameter with the token P_VERSION_LABEL in the package line is not null.

'[DEST_ENV.ENVIRONMENT_NAME]' = 'Archive'

Command is run when the destination Environment is named "Archive."

'[AS.SERVER_TYPE_CODE]' = 'UNIX'

Command is run if the application server is installed on a UNIX� machine.

The condition can include tokens. For more information about tokens, see Tokens.