6.2

Table Of Contents
To select the appropriate action script type for a life cycle stage, in the blueprint canvas, double-click the
Script Type column and select the script from the drop-down menu. For a custom task script, select one
or more operating systems. You can set supported scripts from the drop-down menu.
Depending on the script type you select, you can author code and access the relevant properties through
the variables in the script. For an action script of a life cycle stage, you can also use different script types
in the same operating system family for each life cycle in the same component. For example, you can use
the Windows CMD script for the INSTALL stage and a PowerShell script for the CONFIGURE stage. See
Types of Properties.
When you author an action script, the exit and return codes vary between script types. The application
architect should set proper exit codes in the script that are applicable to the application deployment. If the
script lacks exit and return codes, the last command that ran in the script becomes the exit status. See
Understanding the Deployment and Update Process.
Table 121. Action Script Exit and Return Codes
Script Type Description
Bash You can use return 0 or exit 0 codes in action scripts to indicate success status. To
indicate error status, you can use return non-zero or exit non-zero.
Windows CMD Do not use exit 0 and exit non-zero codes in the action script. If you use these codes in
the script, the computed properties task processing is stopped prematurely. Use exit /b 0
to indicate success status and exit /b non-zero for error status.
Windows PowerShell You can use exit 0 to indicate success status and exit non-zero for error status.
BeanShell You can use System.exit(0); to indicate success status and System.exit(1);/non-zero
for error status.
When you use Windows PowerShell to author a script, you cannot use the warning, verbose, debug,
and host calls in an action script.
Configuring Component Properties
Component properties are used to parameterize scripts so that Application Services can pass the defined
properties as environment variables to scripts running in a virtual machine.
Before running a script from the life cycle stage, the Application Services agent in the virtual machine
communicates with the Application Services server to resolve the properties. The agent then proceeds to
create script-specific variables from these properties and passes them to the scripts.
n
Types of Properties
Application Services supports string, array, content, computed, boolean, single select, integer, and
double properties.
n
Defining Property Values
An application catalog administrator can define properties in the library for services and custom
tasks.
Using Application Services
VMware, Inc. 103