Additional Attributes and Methods Available in the Groovy Script Templates

All Groovy scripts are passed an OrchestrationAttributes instance called orchAttr that contains additional information that can be used in the Groovy script. The following 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.

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.

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.

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.

toString()

(Orchestrator Studio 6.1.0)

String

Outputs a JSON string representing all values in this class.