Additional Attributes and Methods Available in the Groovy Script Templates

All scripts are passed an OrchestrationAttributes instance called orchAttr that contains additional information that can be used in the script. This table provides a description of the attributes.

Attribute

Type

Description

orchestrationName

String

The name of the currently running orchestration.

token

String

The token for the current session.

langpref

String

The language of the execution user.

locale

String

The locale of the execution user.

dateFormat

String

The date format of the execution user.

dateSeperator

String

The date separator of the execution user.

simpleDateFormat

Sting

The Java simple date format of the execution user.

decimalFormat

String

The decimal format of the execution user.

addressNumber

Integer

The address number of the execution user.

alphaName

String

The name of the execution user.

appsRelease

String

The current application release.

country

String

The country code of the execution user.

username

String

The user name of the execution user.

environment (Orchestrator Studio 6.1.0)

String

The current environment of the execution user.

tempDir (Orchestrator Studio 6.1.0)

String

The temp directory configured in the rest.ini.

(Release 9.2.4.0+ The user session temp directory, a dynamic sub directory of the one configured in the rest.ini.)

This table describes the methods available in the OrchestrationAttributes class.

Method

Response Type

Description

writeWarn(String message)

String

Write a message as a warning to the log.

writeDebug(String message)

String

Write a message as a debug to the log.

writeWarn(String message, Exception e)

String

Write a message as a warning to the log with an exception.

writeDebug(String message, Exception e)

String

Write a message as a debug to the log with an exception.

getOrchestrationName()

String

Get the name of the currently running orchestration.

getToken()

String

Get the token for the current session.

getLangPref()

String

Get the language preference for the execution user.

getLocale()

String

Get the locale of the execution user.

getDateFormat

String

Get the date format of the execution user.

getDateSeperator()

String

Get the date separator.

getSimpleDateFormat()

String

Get the Java simple date format of the execution user.

getDecimalFormat()

String

Get the decimal format of the execution user.

getAddressNumber()

Integer

Get the address number of the execution user.

getAlphaName()

String

Get the name of the execution user.

getAppsRelease()

String

Get the current application release.

getCountry()

String

Get the country code for the execution user.

getUsername()

String

Get the username for the execution user.

getEnvironment()

(Orchestrator Studio 6.1.0)

String

Get the current execution environment.

getTempDir()

(Orchestrator Studio 6.1.0)

String

Get the temp directory configured in the rest.ini.

(Release 9.2.4.0+ returns the user session temp directory)

getTempFileName(String fileName)

(Orchestrator Studio 6.1.0)

String

Build a fully qualified file name in the temp directory configured in the rest.ini. The fileName parameter is the name of the file to be appended to the directory.

(Release 9.2.4.0+ returns file name in the user session temp directory)

getUniqueTempFileName(String baseFileName)

(Orchestrator Studio 6.1.0)

String

Build a fully qualified unique file name in the temp directory configured in the rest.ini. The baseFileName parameter is the name of the file to be appended to the directory. If that file name already exists, a unique ID will be appended to baseFileName until a unique name is found.

(Release 9.2.4.0+ returns a unique file name in the user session temp directory)

toString()

(Orchestrator Studio 6.1.0)

String

Outputs a JSON string representing all values in this class.

getTempRootFileName(String fileName)

(Release 9.2.6.2)

String

Build a fully qualified file name in the root temp directory configured in the rest.ini. The fileName parameter is the name of the file to be appended to the directory.

getMachineKey()

(Orchestrator Studio 9.2.4)

String

Get the machine key (first 10 characters) of the AIS server. (Release 9.2.4.2)

The maximum length for this field is ten characters. If the string is longer than ten characters, it will be truncated.

getMachineName()

(Orchestrator Studio 9.2.4)

String

Get the machine name of the AIS server. (Release 9.2.4.2)

getLongUserId ()

(Orchestrator Studio 9.2.4)

String

Get the long User Id for the currently logged in user. (Release 9.2.4.2)

mapResultSetToDataSet(ResultSet resultSet, String dataSetName)

(Orchestrator Studio 9.2.5.4)

HashMap<String, Object>

Used in Database Connector scripts. This helper method allows users to easily add the SQL rowset data to the output map of the connector. It returns a map with the dataset populated.

touchSession()

(Orchestrator Studio 9.2.6.4)

void

Used for long running scripts that do not actively use the AIS token. This method allows callers to manually keep the session alive during the runtime of the script so that subsequent orchestration steps that use the session will not fail (so that the session will not timeout).

mapResultSetToDataSetAsStrings(ResultSet resultSet, String dataSetName)(Orchestrator Studio 9.2.7.0)

HashMap<String, Object>

Used in Database Connector scripts. This helper method allows users to easily add the SQL rowset data to the output map of the connector. It returns a map with the dataset populated with all the values included as string values (toString method called for each object returned).