/
Functions

Functions

Overview

Variables and functions can be used in free-text fields within tasks and workflows. When a variable or function is specified in a free-text field, the Controller inserts its value into the field when the task or workflow is run.

Also, triggers can pass variables and functions into the tasks and workflows they launch.

Universal Controller supports a number of functions that can be specified in free-text fields. They are resolved when a task instance runs or when a Set Variable action containing a function is executed.

Functions are entered using the following formats:
 

${_function}
${_function(arg1, ..., argN)}

Formatting Rules

  • Functions must be written either:
    • In all lower-case characters.
    • Exactly as shown in the tables on this page.
  • Functions have zero, one, or multiple parameters.
  • Each function parameter is one of three specific types:
    • String
    • Integer
    • Boolean
  • String parameters must be enclosed in single or double quotation marks.
  • Integer and Boolean parameters can be enclosed in single or double quotation marks.
  • Optional parameters are identified on this page by being enclosed in [square brackets]. When copying a function from the documentation, be sure to remove the square brackets; otherwise, the function will not resolve.
  • If a function has more than one optional parameter, any optional parameters preceding a specified optional parameter must be included in the function's parameter list. For example:
    • For function ${_responseJsonPath('pathExpression'[,'defaultValue','delimiter',prettyPrint])}, usage ${_responseJsonPath('.outputData','','',true)} would be valid, whereas ${_responseJsonPath('.outputData',,,true)}would not be valid.
    • For function ${_formatDate(['date_time', 'format', day_offset, use_business_days, hour_offset, minute_offset, timezone])}, usage ${_formatDate('2018-09-01','',0,true)} would be valid, whereas ${_formatDate('2018-09-01','',,true)}would not be valid.
  • All functions allow nesting to two levels. That is, a function can be an argument to another function, which itself can be an argument to another function.
    • You must use a double underscore preceding the name of a first-level nested function.
    • You must use a triple underscore preceding the name of a second-level nested function.

    For example, for 2nd day of next month less one Business Day:
${_formatDate('${__dayOfMonth(2,'${___dateadv('yyyy-MM-dd',0,1)}')}','',-1,true)}

Function Categories

Functions are listed alphabetically within the following categories on this page:

Conditional Functions

Return Conditional Value Depending on Equality of String Parameters

Description

Returns a conditional value depending on the equality of two string parameters.
 
(Returns if_value if string value1 is equal to string value2; otherwise, else_value is returned.)

Syntax

${_ifEqual('value1', 'value2', 'if_value', 'else_value'[, ignore_case])}

Parameters

  • value1
    Required; First string.
  • value2
    Required; Second string.
  • if_value
    Required; Return value if value1 equals value2.
  • else_value
    Required; Return value if value1 does not equal value2.
  • ignore_case
    Optional; Specification (true or false) whether or not to ignore case when comparing value1 and value2. Default is false.

Examples

Return Conditional Value Depending on Value of Boolean Parameter

Description

Returns a conditional value depending on the value of a boolean parameter.
 
Returns if_value if value is true; otherwise, else_value is returned.

Syntax

${_ifTrue(value, 'if_value', 'else_value')}

Parameters

  • value
    Required; Boolean value (true or false).
  • if_value
    Required; Return value if value is true.
  • else_value
    Required; Return value if value is false.

Example

Credential Functions

Return Key Location of a Credential

Description

Returns a token representing the Resolvable Credential Key Location that you want to embed.

Syntax

${_credentialKeyLoc('<credential_name>')}

Parameters

  • credential_name
    Required; Name of the Credential.
Example

${_credentialKeyLoc('RCredentialXYZ')} → $(ops_unv_cred_key_loc_c89e7b2caf4247909bc46041df8a2643)

Return Passphrase of a Credential

Description

Returns a token representing the Resolvable Credential Passphrase that you want to embed.

Syntax

${_credentialPassphrase('<credential_name>')}

Parameters

  • credential_name
    Required; Name of the Credential.
Example
${_credentialPassphrase('RCredentialXYZ')} → $(ops_unv_cred_passphrase_c89e7b2caf4247909bc46041df8a2643)

Return Token of a Credential

Description

Returns a token representing the Resolvable Credential Token that you want to embed.

Syntax

${_credentialToken('<credential_name>')}

Parameters

  • credential_name
    Required; Name of the Credential.
Example
${_credentialToken('RCredentialXYZ')} → $(ops_unv_cred_token_c89e7b2caf4247909bc46041df8a264


Return User Name of a Credential

Description

Returns a token representing the Resolvable Credential Runtime User that you want to embed.

Syntax

${_credentialUser('<credential_name>')}

Parameters

  • credential_name
    Required; Name of the Credential.
Example

${_credentialUser('RCredentialXYZ')} → $(ops_unv_cred_user_c89e7b2caf4247909bc46041df8a2643)

Return User Password of a Credential

Description

Returns a token representing the Resolvable Credential Runtime Password that you want to embed.

Syntax

${_credentialPwd('<credential_name>')}

Parameters

  • credential_name
    Required; Name of the Credential.
Example

${_credentialPwd('RCredentialXYZ')} → $(ops_unv_cred_pwd_c89e7b2caf4247909bc46041df8a2643)

Date Functions

Checks if Date Argument Equals Today's Date

Description

Checks if a date argument is equal to today's date in the specified format.
 
Returns true if date is equal to today's date in the specified format; otherwise, false is returned.

Syntax

${_isToday('date'[, 'format', is_relative])}

Parameters

  • date
    Required; Date to compare to today's date.
  • format
    Optional; Format of today's date. Default is yyyy-MM-dd.
  • is_relative
    Optional; Specification (true or false) for whether today's date is relative to the trigger/launch time of the task instance. Default is false.

Examples

Resolve to Current Date and Time

Description

Resolves to the current date and time.

Syntax

${_date(['format', day_offset, hour_offset, minute_offset])}

Parameters

Examples

Resolve to Current Date and Time (Advanced)

Description

Resolves to the current date and time.

Syntax

${_dateadv(['format', year_offset, month_offset, day_offset, hour_offset, minute_offset])}

Parameters

  • format
    Date format. Default format is yyyy-MM-dd HH:mm:ss Z. For details on the format parameter, see https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
  • year_offset
    Optional; +/- number of years to offset.
  • month_offset
    Optional; +/- number of months to offset.
  • day_offset
    Optional; +/- number of days to offset.
  • hour_offset
    Optional; +/- number of hours to offset.
  • minute_offset
    Optional; +/- number of minutes to offset.

Examples