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.
- For function
- 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
- Credential functions
- Date functions
- Mathematical functions
- Output functions
- Other Task functions
- SAP Connection functions
- Script functions
- SQL/Stored Procedure functions
- String functions
- System functions
- Universal Task functions
- Web Service Functions
Conditional Functions
Return Conditional Value Depending on Equality of String Parameters
Description |
Returns a conditional value depending on the equality of two string parameters. |
---|---|
Syntax |
|
Parameters |
|
Examples |
${_ifEqual('abc','def','YES','NO')} ${_ifEqual('abc','ABC','YES','NO',true)} ${_ifEqual('2015-08-15','${__date()}','17:00','18:00')} |
Return Conditional Value Depending on Value of Boolean Parameter
Description |
Returns a conditional value depending on the value of a boolean parameter. |
---|---|
Syntax |
|
Parameters |
|
Example |
${_ifTrue(${__isToday('Mon', 'E')},'20:00','22:00')} |
Credential Functions
Return Key Location of a Credential
Description |
Returns a token representing the Resolvable Credential Key Location that you want to embed. |
---|---|
Syntax |
|
Parameters |
|
Example |
|
Return Passphrase of a Credential
Description |
Returns a token representing the Resolvable Credential Passphrase that you want to embed. |
---|---|
Syntax |
|
Parameters |
|
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 |
|
Parameters |
|
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 |
|
Parameters |
|
Example |
|
Return User Password of a Credential
Description |
Returns a token representing the Resolvable Credential Runtime Password that you want to embed. |
---|---|
Syntax |
|
Parameters |
|
Example |
|
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. |
---|---|
Syntax |
|
Parameters |
|
Examples |
${_isToday('Wed', 'E')} ${_isToday('${__dayOfMonth(1,'','',true)}')} |
Resolve to Current Date and Time
Description |
Resolves to the current date and time. |
---|---|
Syntax |
|
Parameters |
|
Examples |
${_date} --> 2012-07-14 12:43:06 -0400 ${_date()} --> 2012-07-14 12:43:06 -0400 ${_date('yyyy-MM-dd', 5)} --> 2012-07-19 ${_date('yyyy-MM-dd HH:mm:ss', -2, -1)} --> 2012-07-12 11:43:06 ${_date('', 0, 0, 10)} --> 2012-07-14 12:53:06 -0400 |
Resolve to Current Date and Time (Advanced)
Description |
Resolves to the current date and time. |
---|---|
Syntax |
|
Parameters |
|
Examples |
${_dateadv} --> 2012-07-29 09:31:42 -0700 ${_dateadv('yyyy-MMM', -1)} --> 2011-Jul ${_dateadv('yyyy-MMM', 0, -1)} --> 2012-Jun |
Resolve to Current Unix Epoch Time
Description |
Resolves to the current time in milliseconds since Wed Dec 31 1969 19:00:00 GMT-0500 (EST) – the start of Unix epoch time. |
---|---|
Syntax |
|
Parameters |
n/a |
Return Date with Offsets
Description |
Returns the date after applying offsets. Optionally, can specify the output format. Whether a holiday is treated as a business day or a non-business day is specified by the Exclude Holidays for Business Days Universal Controller system property. |
---|---|
Syntax |
|
Parameters |
|
Example |
${_formatDate} --> 2018-08-24 15:37 ${_formatDate()} --> 2018-08-24 15:37 ${_formatDate('','MMddyyyy',5)} --> 08292018 ${_formatDate('2018-09-01','',5)} --> 2018-09-06 ${_formatDate('2018-09-01','',-5)} --> 2018-08-27 ${_formatDate('2018-10-13 12:13:14 -0400','',5,true,0,0,'Australia/Sydney')} --> 2018-10-14 03:13:14 +1100 |
Return Date with Offsets (Advanced)
Description |
Returns the date after applying offsets. Optionally, can specify the output format. Whether a holiday is treated as a business day or a non-business day is specified by the Exclude Holidays for Business Days Universal Controller system property. |
---|---|
Syntax |
|
Parameters |
|
Examples |
${_formatDateAdv} --> 2012-08-24 15:55 ${_formatDateAdv()} --> 2012-08-24 15:55 ${_formatDateAdv('','MMddyyyy',1)} --> 08242013 ${_formatDateAdv('2012-09-01','',0,1)} --> 2012-10-01 ${_formatDateAdv('2012-09-01','',0,-1)} --> 2012-08-01 ${_formatDateAdv('2012-09-01','',0,0,5,false)} --> 2012-09-06 |
Return Date with Time Zone
Description | Returns the Date and Time in another time zone. |
---|---|
Syntax |
|
Parameters |
|
Examples |
${_formatDateTz('2018-10-13 01:02:03 -0400', 'Australia/Sydney')} --> 2018-10-13 16:02:03 +1100 ${_formatDateTz('2018-10-13 01:02:03 -0400', 'Australia/Sydney','yyyy-MM-dd HH:mm Z')} --> 2018-10-13 16:02 +1100 ${_formatDateTz('${ops_launch_time}', '${ops_time_zone}')} = ${_formatDateTz('2018-06-13 15:35:00 -0400', 'Europe/Berlin')} = 2018-06-13 21:35:00 +0200 |
Return Day of Week
Description |
Returns the day of week for the specified date as a number. |
---|---|
Syntax |
|
Parameters |
|
Example |
${_dayOfWeek} --> 6 ${_dayOfWeek()} --> 6 ${_dayOfWeek('2012-07-04')} --> 4 ${_dayOfWeek('2012-07-04', 'mon')} --> 3 |
Return Days between Dates
Description |
Returns the number of days between date1 and date2.
The start date is inclusive, but the end date is not. |
---|---|
Syntax |
|
Parameters |
date1 and date2 are specified in any of the following formats:
|
Example |
${_daysBetween('2012-08-01','2012-09-01')} --> 31 |
Return Non-Business Day of Month
Description |
Returns the Nth non-business day of month for the month of the date specified. Optionally, can start from the end of the month. Whether a holiday is treated as a business day or a non-business day is specified by the Exclude Holidays for Business Days Universal Controller system property. |
---|---|
Syntax |
|
Parameters |
|
Examples |
${_nonBusinessDayOfMonth(1)} --> 2012-08-04 ${_nonBusinessDayOfMonth(1,'2012-09-01')} --> 2012-09-01 ${_nonBusinessDayOfMonth(1,'2012-09-01','',true)} --> 2012-09-30 |
Return Nth Business Day of Month
Description |
Returns the Nth business day of month for the month of the date specified. Optionally, can start from the end of the month. Whether a holiday is treated as a business day or a non-business day is specified by the Exclude Holidays for Business Days Universal Controller system property. |
---|---|
Syntax |
|
Parameters |
|
Examples |
${_businessDayOfMonth(1)} --> 2012-08-01 ${_businessDayOfMonth(1,'2012-09-01')} --> 2012-09-04 ${_businessDayOfMonth(1,'2012-09-01','',true)} --> 2012-09-28 |
Return Nth Day of Month
Description |
Returns the Nth day of month for the month of the date specified. Optionally, can start from the end of the month. |
---|---|
Syntax |
|
Parameters |
|
Examples |
${_dayOfMonth(5)} --> 2012-08-05 ${_dayOfMonth(15,'2012-09-01','MM/dd/yyyy')} --> 09/15/2012 ${_dayOfMonth(1,'2012-09-01','',true)} --> 2012-09-30 |
Return Number of Business Days between Dates
Description |
Returns the number of business days between date1 and date2.
The start date is inclusive, but the end date is not. Whether a holiday is treated as a business day or a non-business day is specified by the Exclude Holidays for Business Days Universal Controller system property. |
---|---|
Syntax |
|
Parameters |
date1 and date2 are specified in any of the following formats:
|
Example |
${_businessDaysBetween('2012-08-01','2012-09-01')} --> 23 |
Mathematical Functions
Add
Description |
Return the sum of the augend added with the addend. |
---|---|
Syntax |
|
Parameters |
|
Example |
${_add('77', '33')} --> 110 ${_add('${augend}','${addend}')} --> 22 |
Divide
Description |
Return the quotient of the dividend divided by divisor. |
---|---|
Syntax |
|
Parameters |
|
Example |
${_divide('7','20')} --> 0 ${_divide('20','7')} --> 2 ${_divide('20','5')} --> 4 ${_divide('${dividend}','${divisor}')} --> 20 |
Multiply
Description |
Return the product of the multiplicand multiplied with the multiplier. |
---|---|
Syntax |
|
Parameters |
|
Example |
${_multiply('7','20')} --> 140 ${_multiply('${multiplicand}','${multiplier}')} --> 500 |
Return Absolute Value
Description |
Return the absolute value of the parameter. |
---|---|
Syntax |
|
Parameters |
|
Example |
${_abs('-1200')} --> 1200 ${_abs('1200')} --> 1200 ${_abs('${parameter}')} --> 100 |
Return Modulo
Description |
Return the modulo (remainder) of the dividend divided by divisor. |
---|---|
Syntax |
|
Parameters |
|
Example |
${_mod('10', '2')} --> 0 ${_mod('10', '3')} --> 1 ${_mod('70', '65')} --> 5 ${_mod('${dividend}','${divisor}')} --> 3 |
Subtract
Description |
Return the difference of the subtrahend subtracted from the minuend. |
---|---|
Syntax |
|
Parameters |
|
Example |
${_subtract('77','33')} --> 44 ${_subtract('33','77')} --> -44 ${_subtract('${minuend}','${ subtrahend }')} --> 95 |
Other Task Functions
Business Services Membership
Description |
Resolves to a delimited list of business service names the task instance is a member of. |
---|---|
Syntax |
|
Parameters |
|
Example |
If a task instance is a member of business services A, B, and C.
If a task instance is not a member of any business service, the function will evaluate to empty. |
Output Functions
(For Web Service output, see Web Service Functions.)
Note
A prerequisite for the use of these functions is that Automatic Output Retrieval and Wait For Output are selected at task level, with the exception of the EXTENSION output type.
Task Instance Output
Description |
Resolves to the output data, of the specified
|
---|---|
Syntax |
|
Parameters |
|
Sibling Task Instance Output
Description |
Resolves to the output data, of the specified
|
---|---|
Syntax |
|
Parameters |
|
Task Instance Output Number of Lines
Description |
Resolves to the number of lines of output data, of the specified
|
---|---|
Syntax |
|
Parameters |
|
Example |
|
Sibling Task Instance Output Number of Lines
Description |
Resolves to the number of lines of output data, of the specified outputType, of the task instance specified by the siblingName parameter.
|
---|---|
Syntax |
|
Parameters |
|
Example |
${ |
Task Instance Output by Specific Line(s)
Description |
Resolves to the specified line(s) of output data, of the specified
|
---|---|
Syntax |
|
Parameters |
|
Sibling Task Instance Output by Specific Line(s)
Description |
Resolves to the specified line(s) of output data, of the specified
|
---|---|
Syntax |
|
Parameters |
|
Task Instance Output by Line(s) Matching Regular Expression
Description |
Resolves to the line(s) of output data that match the specified regular expression, of the specified
|
---|---|
Syntax |
|
Parameters |
|
Example |
STDOUT contains: |
Sibling Task Instance Output by Line(s) Matching Regular Expression
Description |
Resolves to the line(s) of output data that match the specified regular expression, of the specified
|
---|---|
Syntax |
|
Parameters |
|
Task Instance Output By XPath
Description |
Resolves to the XML output data of the task instance that is resolving the function, corresponding to the evaluated XPath expression.
|
Syntax |
|
Parameters |
|
Example |
|
Sibling Task Instance Output By XPath
Description |
Resolves to the XML output data of the task instance specified by the The sibling task instance must be within the same workflow and the Execution User of the task instance that is resolving the function must have Read permission for the sibling task instance.
|
Syntax |
|
Parameters |
|
Example |
${_outputXPathFromTask('Sibling_With_XML_Output', 'STDOUT', '//code/text()')}
|
Task Instance Output By JsonPath
Description |
Resolves to the JSON output data of the task instance that is resolving the function, corresponding to the evaluated JsonPath expression.
|
Syntax |
|
Parameters |
|
Example |
|
Sibling Task Instance Output By JsonPath
Description |
Resolves to the JSON output data of the task instance specified by the The sibling task instance must be within the same workflow and the Execution User of the task instance that is resolving the function must have Read permission for the sibling task instance.
|
Syntax |
${_outputJsonPathFromTask('siblingName', 'outputType', 'pathExpression'[, 'defaultValue', 'delimiter', prettyPrint])} |
Parameters |
|
Example |
|
Task Instance Output By JsonPath As Array
Description |
Resolves to the JSON output data of the task instance that is resolving the function, corresponding to the evaluated JsonPath expression.
|
Syntax |
${_outputJsonPathAsArray('outputType', 'pathExpression'[, 'defaultValue', prettyPrint])} |
Parameters |
|
Example |
|
Sibling Task Instance Output By JsonPath As Array
Description |
Resolves to the JSON output data of the task instance specified by the The sibling task instance must be within the same workflow and the Execution User of the task instance that is resolving the function must have Read permission for the sibling task instance.
|
Syntax |
${_outputJsonPathFromTask('siblingName', 'outputType', 'pathExpression'[, 'defaultValue', prettyPrint])} |
Parameters |
|
Example |
JSON
|
Task Instance Output Path
Description |
Returns a token representing the path to a temporary file containing the specified task instance output data.
The resolved token is supported within the Command, Parameters, and Script of a Windows and Linux/Unix Task. |
---|---|
Syntax |
|
Parameters |
|
Example |
application.exe -file ${_outputPath('STDOUT')} > application.exe -file $(ops_output_path_1638302212442528629FTPBE4AJQV2FT_stdout_txt) application.exe -file ${_outputPath('SQL')} > application.exe -file $(ops_output_path_1639503212294078671DNPMULGSEVMHT_sql_csv) application.exe -file ${_outputPath('SQL', 'tsv')} > application.exe -file $(ops_output_path_1639503212294078671DNPMULGSEVMHT_sql_tsv) application.exe -file ${_outputPath('EXTENSION', 'json')} > application.exe -file $(ops_output_path_1639503212294187671OAI9SM79CNC2V_extension_json) |
Sibling Task Instance Output Path
Description |
Returns a token representing the path to a temporary file containing the specified sibling task instance output data.
The resolved token is supported within the Command, Parameters, and Script of a Windows and Linux/Unix Task. |
---|---|
Syntax |
|
Parameters |
|
Example |
application.exe -file ${_outputPathFromTask('Sibling_Instance_Name', 'STDERR')} > application.exe -file $(ops_output_path_1639503212294128671YL1B04U3OT55P_stderr_txt) application.exe -file ${_outputPathFromTask('Sibling_Instance_Name', 'STOREDPROC')} > application.exe -file $(ops_output_path_1639503212294197671Q13UV8MSH6355_storedproc_csv) application.exe -file ${_outputPathFromTask('Sibling_Instance_Name', 'STOREDPROC', 'tsv')} > application.exe -file $(ops_output_path_1639503212294197671Q13UV8MSH6355_storedproc_tsv) application.exe -file ${_outputPathFromTask('Sibling_Instance_Name', 'WEBSERVICE', 'json')} > application.exe -file $(ops_output_path_1639503212294088671CAWMP3VNQ468B_webservice_json) |
SAP Connection Functions
Returns Property of an SAP Connection
Description |
Returns a token representing the property associated with an SAP connection |
---|---|
Syntax |
|
Parameters |
|
Example |
|
Script Functions
Returns Path to Data Script
Description |
Returns a token representing the path to a Data Script that you want to embed. |
---|---|
Syntax |
|
Parameters |
|
Example |
Script Name: MyDataScript Script UUID: 507ffdbd0eba4b62b0e31e0fd22f6bec
Note The Agent will replace the resolved token with a path to a temporary file containing the content of the Data Script. For additional details, refer to Embedding a Data Script. |
Note
_scriptPath
requires Agent 6.4.0.0 or later.
SQL/Stored Procedure Functions
Return Column Names for SQL Results from Current Task
Description |
Returns the column names for the SQL results from the current SQL or Stored Procedure task. Column names are separated by the specified |
---|---|
Syntax |
|
Parameters |
|
Return Column Names for SQL Results from Sibling Task
Description |
Returns the column names for the SQL results from a sibling SQL or Stored Procedure task, within the same workflow. Column names are separated by the specified |
---|---|
Syntax |
|
Parameters |
|
Return SQL Results from Current Task
Description |
Returns all SQL results from the current SQL or Stored Procedure task. Columns are separated by the specified |
---|---|
Syntax |
|
Parameters |
|
Return SQL Results from Sibling Task
Description |
Returns all SQL results from a sibling SQL or Stored Procedure task, within the same workflow. Columns are separated by the specified |
---|---|
Syntax |
|
Parameters |
|
Return SQL Warnings from Current Task
Description |
Returns all SQL warnings from the current SQL or Stored Procedure task. Columns are separated by the specified |
---|---|
Syntax |
|
Parameters |
|
Return SQL Warnings from Sibling Task
Description |
Returns all SQL warnings from a sibling SQL or Stored Procedure task, within the same workflow. Columns are separated by the specified |
---|---|
Syntax |
|
Parameters |
|
Return String Value of Row/Column by Column Name
Description |
Returns the string value of a row/column from a previously executed SQL task within the same workflow, or from the current SQL task. |
---|---|
Syntax |
|
Parameters |
|
Return String Value of Row/Column by Column Number
Description |
Returns the string value of a row/column from a previously executed SQL task within the same workflow, or from the current SQL task. |
---|---|
Syntax |
|
Parameters |
|
Return String Values of Columns
Description |
Returns the string values of columns in a specific row in CSV (comma-separated values) format, from a previously executed SQL task within the same workflow, or from the current SQL task. |
---|---|
Syntax |
|
Parameters |
|
String Functions
String Functions can accept:
- String content in a String parameter.
- Variable name in a String parameter (prefixed with _var) from which string content can be obtained.
- Integer and Boolean parameters.
For String functions that accept a String value parameter directly, the value parameter can be specified using hard-coded text, variables, functions, or any combination of the three.
Note
When using String functions that accept a String value parameter directly, you should be aware of expectations with respect to escape characters and escape sequences (see Escape Sequences, below).
For String functions that accept a variable name parameter, the fully resolved value of the variable by the specified name will be used as the String value argument. The variable must be fully resolvable and must not contain an unresolved function.
Note
Indexing functions use zero-based numbering; that is, the initial element is assigned the index 0.
Escape Sequences
An escape character preceded by a backslash (\) is an escape sequence (see the following table for a list of escape sequences).
If you are using a String function to manipulate a String value that potentially may contain an escape sequence, you should use the String function that accepts a variable name parameter to allow for passing the value to the function without the escape sequence being interpreted.
Escape Sequences |
Escape Sequence Description |
---|---|
\t |
Insert a tab in the text at this point. |
\b |
Insert a backspace in the text at this point. |
\n |
Insert a newline in the text at this point. |
\r |
Insert a carriage return in the text at this point. |
\f |
Insert a formfeed in the text at this point. |
\' |
Insert a single quote character in the text at this point. |
\" |
Insert a double quote character in the text at this point. |
\\ |
Insert a backslash character in the text at this point. |
Convert Characters in Value to Lower Case
Description |
Converts all of the characters in the |
---|---|
Syntax |
|
Parameters |
|
Convert Characters in Variable to Lower Case
Description |
Converts all of the characters in the variable to lower case using the rules of the default locale. |
---|---|
Syntax |
|
Parameters |
|
Convert Characters in Value to Upper Case
Description |
Converts all of the characters in the |
---|---|
Syntax |
|
Parameters |
|
Convert Characters in Variable to Upper Case
Description |
Converts all of the characters in the variable to upper case using the rules of the default locale. |
---|---|
Syntax |
|
Parameters |
|
Escape Characters in Variable Using XML Entities
Description |
Escapes the characters in a variable value using XML entities. |
---|---|
Syntax |
|
Parameters |
|
Example |
Variable Name: ${_varEscapeXml('escape_me')} --> `1234567890\E-=[]\;',./ ~!@#$%^&*()_+{}|:"<>? |
Escape Characters in Variable Using JSON String Rules
Description |
Escapes the characters in a variable value using JSON string values. |
---|---|
Syntax |
|
Parameters |
|
Example |
Variable Name: ${_varEscapeJson('escape_me')} --> `1234567890\\E-=[]\\;',.\/ ~!@#$%^&*()_+{}|:\"<>? |
Escape Characters in Variable Using JavaScript String Rules
Description |
Escapes the characters in a variable value using JavaScript String rules. |
---|---|
Syntax |
|
Parameters |
|
Example |
Variable Name: ${_varEscapeJavaScript('escape_me')} --> `1234567890\\E-=[]\\;\',.\/ ~!@#$%^&*()_+{}|:\"<>? |
Escape Characters in Variable Using HTML Entities
Description |
Escapes the characters in a variable value using HTML entities. (Supports all known HTML 4.0 entities.) |
---|---|
Syntax |
|
Parameters |
|
Example |
Variable Name: ${_varEscapeHtml('escape_me')} --> `1234567890\E-=[]\;',./ ~!@#$%^&*()_+{}|:"<>? |
Escape Characters in Variable as a Literal Pattern
Description |
Returns a literal regular expression pattern String for the value of the specified variable. |
---|---|
Syntax |
|
Parameters |
|
Example |
Variable Name: ${_varLiteralPattern('escape_me')} --> \Q`1234567890\E\\E\Q-=[]\;',./ ~!@#$%^&*()_+{}|:"<>?\E |
Randomly Generate a String
Description |
Randomly generates a String with a specified length. |
---|---|
Syntax |
|
Parameters |
Note The following characters are included in the default character set, in addition to the space character. ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890`-=~!@#$%^&*()_+[]\{}|;':",./<>? |
Example |
${_randomString(24, '', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@#$%*')} --> 5*L8T1RN#$AQWEKPA@BQ19JD |
Replace Substring of Value with Regular Expression
Description |
Replaces each substring of value that matches the specified regular expression, regex, with the specified replacement. |
---|---|
Syntax |
|
Parameters |
|
Replace Substring of Variable with Regular Expression
Description |
Replaces each substring of |
---|---|
Syntax |
|
Parameters |
|
Return Base64 Encoded String
Description |
Returns the value of the specified variable encoded using the Base64 encoding scheme. |
---|---|
Syntax |
|
Parameters |
|
Example |
Where Variable rawstring contains a value of "Test String":
|
Return Copy of Value with Whitespace Omitted
Description |
Returns a copy of |
---|---|
Syntax |
|
Parameters |
|
Return Copy of Variable with Whitespace Omitted
Description |
Returns a copy of |
---|---|
Syntax |
|
Parameters |
|
Return Index of Substring in String Value
Description |
Returns the index within the string value of the first occurrence of the specified substring, |
---|---|
Syntax |
|
Parameters |
|
Return Index of Substring in String Variable
Description |
Returns the index within the string variable of the first occurrence of the specified substring, |
---|---|
Syntax |
|
Parameters |
|
Return Index of Substring Plus Offset in String Value
Description |
Returns the index within this string of the first occurrence of the specified substring plus the specified offset. The integer returned is the smallest value. |
---|---|
Syntax |
|
Parameters |
|
Return Index of Substring Plus Offset in String Variable
Description |
Returns the index within this string of the first occurrence of the specified substring plus the specified offset. The integer returned is the smallest variable. |
---|---|
Syntax |
|
Parameters |
|
Return Index of Rightmost Occurrence of Substring in String Value
Description |
Returns the index within the string value of the rightmost occurrence of the specified substring, |
---|---|
Syntax |
|
Parameters |
|
Return Index of Rightmost Occurrence of Substring in String Variable
Description |
Returns the index within the string variable of the rightmost occurrence of the specified substring, |
---|---|
Syntax |
|
Parameters |
|
Return Index of Rightmost Occurrence of Substring Plus Offset in String Value
Description |
Returns the index within this string of the rightmost occurrence of the specified substring, plus the specified offset. The returned index is the largest value. |
---|---|
Syntax |
|
Parameters |
|
Return Index of Rightmost Occurrence of Substring Plus Offset in String Variable
Description |
Returns the index within this string of the rightmost occurrence of the specified substring, plus the specified offset. The returned index is the largest variable. |
---|---|
Syntax |
|
Parameters |
|
Return Length of Value
Description |
Returns the length of |
---|---|
Syntax |
|
Parameters |
|
Return Length of Variable
Description |
Returns the length of |
---|---|
Syntax |
|
Parameters |
|
Return New String that is Substring of Value
Description |
Returns a new string that is a substring of |
---|---|
Syntax |
|
Parameters |
|
Example |
${_substring('hamburger', 4, 8)} --> urge ${_substring('smiles', 1, 5)} --> mile |
Return New String that is Substring of Variable
Description |
Returns a new string that is a substring of |
---|---|
Syntax |
|
Parameters |
|
Examples |
If the value of the ${_varSubstring('food', 4, 8)} --> urge ${_varSubstring('face', 1, 5)} --> mile |
Return URL-Encoded String
Description |
Returns a URL-encoded string according to the ASCII Encoding Reference for UTF-8; all non-alphanumeric characters are replaced with their equivalent hexadecimal escape sequences. |
---|---|
Syntax |
|
Parameters |
|
Example |
Where Variable rawstring contains a value of “
|
Variable By XPath
Description |
Resolves to the evaluated XPath expression applied to the value of the specified variable.
|
---|---|
Syntax |
${_varXPath('variableName', 'xPathExpression'[, 'defaultValue', 'delimiter', prettyPrint])} |
Parameters |
|
Example |
|
Variable By JsonPath
Description |
Resolves to the evaluated JsonPath expression applied to the value of the specified variable.
|
---|---|
Syntax |
${_varJsonPath('variableName', 'pathExpression'[, 'defaultValue', 'delimiter', prettyPrint])} |
Parameters |
|
Example |
|
Variable By JsonPath As Array
Description |
Resolves to the evaluated JsonPath expression applied to the value of the specified variable.
|
---|---|
Syntax |
${_varJsonPathAsArray('variableName', 'pathExpression'[, 'defaultValue', prettyPrint])} |
Parameters |
|
Example |
|
Variable Number of Lines
Description |
Resolves to the number of lines the value of the specified variable has.
|
---|---|
Syntax |
${_varNumberOfLines('variableName')} |
Parameters |
|
Example |
|
Variable By Specific Line(s)
Description |
Resolves to the specified line(s) of variable data for the specified variable.
|
---|---|
Syntax |
${_varLines('variableName', startLine, numberOfLines[, 'defaultValue', 'resultDelimiter'])} |
Parameters |
|
Example |
|
Variable By Line(s) Matching Regular Expression
Description |
Resolves to the line(s) of variable data that match the specified regular expression, of the specified variable.
|
---|---|
Syntax |
${_varLinesByRegex('variableName', 'regexPattern'[, maxCount, numberOfLinesBefore, numberOfLinesAfter, 'defaultValue', 'resultDelimiter'])} |
Parameters |
|
Example |
|
Variable Path
Description |
Returns a token representing the path to a temporary file containing the value of the specified variable.
The resolved token is supported within the Command, Parameters, and Script of a Windows and Linux/Unix Task. |
---|---|
Syntax |
${_varPath('variableName'[, 'fileExtension'])} |
Parameters |
|
Example |
|
System Functions
Display Variables
Description |
Displays all the defined and built-in variables associated with the task instance. |
---|---|
Syntax |
|
Parameters |
(none) |
Example |
${_scope} --> {ops_workflow_id=, ops_task_type=Unix, ops_status=DEFINED, ops_retry_interval=60, ops_exit_code=0, ops_retry_maximum=0, ops_cmd_parms=, ops_cmd=ls -la; exit ${_random('9')};, ops_retry_count=0, ops_agent_id=67e4994143d2617201cdf4ba9df9ab0a, ops_task_id=84880af243d26172019aa1d25988a8f9, ops_task_name=uc - Linux Ls} |
Generate Random Number
Description |
Generates a random number between |
---|---|
Syntax |
|
Parameters |
|
Resolve to GUID (Globally Unique ID)
Description |
Resolves to a 32-byte GUID (Globally Unique ID). |
---|---|
Syntax |
|
Parameters |
(none) |
Resolve to Host Name
Description |
Resolves to the hostname of the machine running the Controller, if available. |
---|---|
Syntax |
|
Parameters |
(none) |
Resolve to IP Address
Description |
Resolves to the IP address of the machine running the Controller. |
---|---|
Syntax |
|
Parameters |
(none) |
Resolve to the Sibling SYS_ID
Description |
Resolves to the sys_id of the first task instance found within the same workflow specified by the sibling name. |
---|---|
Syntax |
|
Parameters |
|
Example |
${_siblingid('Timer 60')} --> 5dbaaab943d26172015e10ab3e894e10 |
Resolve to Variable Value
Description |
Locates the specified variable in the specified sibling task instance within the same workflow and resolves to the variable value. |
---|---|
Syntax |
|
Parameters |
|
Resolve Variable
Description |
Resolves the variable specified by the |
---|---|
Syntax |
|
Parameters |
|
Resolve Variable (Advanced)
Description |
Resolves the variable specified by the |
---|---|
Syntax |
|
Parameters |
|
Universal Task Functions
Convert Array Field Variable
Description |
Given the variable name representing the Array field, generate a String of delimited Array field entry data. The function will remain unresolved if the Array field contains unresolved variables or functions. |
---|---|
Syntax |
|
Parameters |
|
Example |
ops_af_p1 ---------- P1A=5 P1B=42 ---------- ops_af_p2 ---------- P2A=Red P2B=White P2C=Blue ---------- convertArrayFieldVariable(String arrayFieldVariableName, String delimiter, String separator, String keyQuote, String valueQuote) ================================================================================================================================ ${_convertArrayFieldVariable('ops_af_p1')} P1A=5,P1B=42 --------------- ${_convertArrayFieldVariable('ops_af_p1', '=')} P1A=5,P1B=42 --------------- ${_convertArrayFieldVariable('ops_af_p1', ':')} P1A:5,P1B:42 --------------- ${_convertArrayFieldVariable('ops_af_p1', ':', ';')} P1A:5;P1B:42 --------------- ${_convertArrayFieldVariable('ops_af_p1', '::', ',', '\'')} 'P1A'::5,'P1B'::42 --------------- ${_convertArrayFieldVariable('ops_af_p1', '=', ',', '\'', '"')} 'P1A'="5",'P1B'="42" --------------- ${_convertArrayFieldVariable('ops_af_p1', "", "", '\'', '\'')} 'P1A'='5','P1B'='42' --------------- ${_convertArrayFieldVariable('ops_af_p1', ':', '\\n', '\'', '\'')} 'P1A':'5' 'P1B':'42' --------------- ${_convertArrayFieldVariable('ops_af_p2')} P2A=Red,P2B=White,P2C=Blue --------------- ${_convertArrayFieldVariable('ops_af_p2', '=')} P2A=Red,P2B=White,P2C=Blue --------------- ${_convertArrayFieldVariable('ops_af_p2', ':')} P2A:Red,P2B:White,P2C:Blue --------------- ${_convertArrayFieldVariable('ops_af_p2', ':', ';')} P2A:Red;P2B:White;P2C:Blue --------------- ${_convertArrayFieldVariable('ops_af_p2', '::', ',', '\'')} 'P2A'::Red,'P2B'::White,'P2C'::Blue --------------- ${_convertArrayFieldVariable('ops_af_p2', '=', ',', '\'', '"')} 'P2A'="Red",'P2B'="White",'P2C'="Blue" --------------- ${_convertArrayFieldVariable('ops_af_p2', '', '', '\'', '\'')} 'P2A'='Red','P2B'='White','P2C'='Blue' --------------- ${_convertArrayFieldVariable('ops_af_p2', ':', '\\n', '\'', '\'')} 'P2A':'Red' 'P2B':'White' 'P2C':'Blue' --------------- |
Get Array Field Variable Value
Description |
Given the variable name representing the Array field and the name of an entry in the Array field, return the value for the entry. |
---|---|
Syntax |
|
Parameters |
|
Example |
ops_af_p1 ---------- P1A=5 P1B=42 ---------- ops_af_p2 ---------- P2A=Red P2B=White P2C=Blue ---------- getArrayFieldVariableValue(String arrayFieldVariableName, String name) ======================================================== P1A = ${_getArrayFieldVariableValue('ops_af_p1', 'P1A')} ---------- P1A=5 ---------- P1B = ${_getArrayFieldVariableValue('ops_af_p1', 'P1B')} ---------- P1B=42 ---------- P2A = ${_getArrayFieldVariableValue('ops_af_p2', 'P2A')} ---------- P2A=Red ---------- P2B = ${_getArrayFieldVariableValue('ops_af_p2', 'P2B')} ---------- P2B=White ---------- P2C = ${_getArrayFieldVariableValue('ops_af_p2', 'P2C')} ---------- P2C=Blue ---------- |
Web Service Functions
All functions will remain unresolved if no Web Service output record can be found for the task instance, for the current attempt.
All functions will remain unresolved if a required parameter either is not specified or specified incorrectly.
Raw Output from Web Service Task
Description |
Resolves to the raw output data of the Web Service task instance that is resolving the function.
|
---|---|
Syntax |
|
Parameters |
|
Raw Output from Sibling Web Service Task
Description |
Resolves to the raw output data of the Web Service task instance specified by the
|
---|---|
Syntax |
|
Parameters |
|
XML Output Data from Web Service Task
Description |
Resolves to the XML output data of the Web Service task instance that is resolving the function, corresponding to the evaluated xPath expression.
|
---|---|
Syntax |
|
Parameters |
|
Examples |
If you want to obtain the <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <command-response> <type>set_variable</type> <success>true</success> <info>No changes detected for variable variableName, ignoring Set Variable command.</info> <errors></errors> </command-response> ${_responseXPath('//info')} Select the info node in the document no matter where it is. ${_responseXPath('/command-response/info')} Select the info node from a specific path in the document, starting from the root node. |
XML Output Data From Sibling Web Service Task
Description |
Resolves to the XML output data of the Web Service task instance specified by the siblingName, corresponding to the evaluated xPath expression.
|
---|---|
Syntax |
|
Parameters |
|
JSON Output Data From Web Service Task
Description |
Resolves to the JSON output data of the Web Service task instance that is resolving the function, corresponding to the evaluated JsonPath expression.
|
---|---|
Syntax |
|
Parameters |
|
JSON Output Data From Sibling Web Service Task
Description |
Resolves to the JSON output data of the Web Service task instance specified by the siblingName, corresponding to the evaluated JsonPath expression.
|
---|---|
Syntax |
|
Parameters |
|
JSON Output Data As Array From Web Service Task
Description |
Resolves to the JSON output data of the Web Service task instance that is resolving the function, corresponding to the evaluated JsonPath expression.
|
---|---|
Syntax |
|
Parameters |
|
JSON Output Data As Array From Sibling Web Service Task
Description |
Resolves to the JSON output data of the Web Service task instance specified by the siblingName, corresponding to the evaluated JsonPath expression.
|
---|---|
Syntax |
|
Parameters |
|