Table of Contents

Search

  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using App Connections
  9. System Services, Listeners and Connectors
  10. Designing Human Tasks

Design

Design

Using Functions

Using Functions

You can use the following functions when working with XQuery in Process Designer or in any field that uses a formula to set a value.
For information about XQuery functions that are available in the Expression Editor but are not described below, see http://www.xqueryfunctions.com/xq/alpha.html. Note that Application Integration doesn't support all functions documented in the URL.
For information about using the Expression Editor to work with functions, see Using the Expression Editor.
Application Integration does not support inline functions in the Expression Editor. The Expression Editor comes with powerful functions that can invoke operating system features. You must review the contents passed into the functions before using them.

Atomic Values of All Types

You can use the following functions in
processes
and service connectors:
  • boolean
  • empty
  • exists
  • false
  • nilled
  • not
  • number
  • string
  • true

Attachments for Processes

The functions described in the following table are available for handling attachments in processes.
In case of a process, the
$cid
value in the attachment functions refers to the process field (Input, Output or Temp). For example, if the input parameter is called customerPhoto (of type attachment), to get the attachment size, use:
sff:GetAttachmentSize($input.customerPhoto)
Be sure that your field names do not have spaces so they can be easily referenced in XQuery.
For more examples of using the attachment functions, see Attachments.
Function
Syntax
Description
createAttachmentFromBase64
sff:createAttachmentFromBase64($contentName as xs:string, $encodedContent as xs:string, $mimeType as xs:string)
Creates an attachment from the base64-encoded content.
getAttachmentContentType
sff:getAttachmentContentType($cid as xs:string?)
Returns the content-type.
getAttachmentCount
sff:getAttachmentCount($cid as xs:long)
Returns the number of attachments.
getAttachmentName
sff:getAttachmentName($cid as xs:string?)
Returns the attachment (file) name if available.
getAttachmentProperty
sff:getAttachmentProperty($cid as xs:string?, $attribute as xs:string)
Returns the attachment attribute, given the mime header name such as 'content-type'.
getAttachmentSize
sff:getAttachmentSize($cid as xs:long)
Returns the attachment size in bytes.
getBase64FromAttachment
sff:getBase64FromAttachment($cid as xs:string)
Returns base64-encoded attachment content from the variable, which has the attachment type.
hasAttachment
sff:hasAttachment($cid as xs:boolean)
Checks if an attachment exists.
setAttachmentContentType
sff:setAttachmentContentType($cid as xs:string, $val as xs:string)
Sets the attachment content-type.
setAttachmentName
sff:setAttachmentName($cid as xs:string, $val as xs:string)
Sets the attachment name.
setAttachmentProperty
sff:setAttachmentProperty($cid as xs:string, $attribute as xs:string, $val as xs:string)
Sets the attachment mime header attribute value.

Dates and Times

Process Designer supports most built-in XQuery date and time functions described at http://www.xqueryfunctions.com/xq/alpha.html, in addition to the following functions:
Function Name
Syntax
Description
addToDate
date:addToDate(date, format, amount)
Adds a specified amount to one part of a datetime value, and returns a date in the same format as the date you pass to the function. For more information, see addtoDate.
adjust-date-to-timezone
fn:adjust-date-to-timezone(arg, timezone)
Adjusts a date value to a specific time zone, or removes the time zone component from the date value. For more information, see adjust-date-to-timwzone.
adjust-dateTime-to-timezone
fn:adjust-dateTime-to-timezone(arg, timezone)
Adjusts a dateTime value to a specific time zone, or removes the time zone component from the dateTime value. For more information, see adjust-dateTime-to-timezone.
adjust-time-to-timezone
fn:adjust-time-to-timezone(arg, timezone)
Adjusts a time value to a specific time zone, or removes the time zone component from the date value. For more information, see adjust-time-to-timezone.
current-date
fn:current-date()
Returns the current date. For more information, see current-date.
current-dateTime
fn:current-dateTime()
Returns the current dateTime with time zone. For more information, see current-dateTime.
current-time
fn:current-time()
Returns the current time. For more information, see current-time.
dateDiff
date:dateDiff(date, date, format)
Returns the length of time between two dates in the format specified. For more information, see dateDiff.
dateTime
fn:dateTime(arg1, arg2)
Constructs a dateTime from a date and time. For more information, see dateTime.
dateToMillis
date:dateToMillis($date)
Converts the time to milliseconds.
day-from-date
fn:day-from-date(arg)
Returns the day portion of a date. For more information, see day-from-date.
day-from-dateTime
fn:day-from-dateTime(arg)
Returns the day portion of a date/time. For more information, see day-from-dateTime.
days-from-duration
fn:days-from-duration(arg)
Returns the number of days in a duration. For more information, see days-from-duration.
getDatePart
date:getDatePart(date, format)
Returns the specified part of a date as an integer value. For more information, see getDatePart.
getLocale
date:getLocale()
Returns a string representing the current locale the process is running in. For more information, see getLocale.
getTimeZone
date:getTimeZone()
Returns a string that specifies the timezone ID where the process is running or where the user is running it. For more information, see getTimeZone.
hours-from-dateTime
fn:hours-from-dateTime(arg)
Returns the hour portion of a date/time. For more information, see hours-from-dateTime.
hours-from-duration
fn:hours-from-duration(arg)
Returns the hours in a duration. For more information, see hours-from-duration.
hours-from-time
fn:hours-from-time(arg)
Returns the hour portion of a time. For more information, see hours-from-time.
implicit-timezone
fn:implicit-timezone()
Returns the value of the implicit timezone property. For more information, see implicit-timezone.
lastDay
date:lastDay(date)
Passes the date for which you want to return the last day of the month. You can enter any valid expression that evaluates to a date. For more information, see lastDay.
toDate
date:toDate(date, format)
Converts a character string to a Date data type. You use the toDate format strings to specify the format of the source strings. For more information, see toDate.
millisToDate
date:millisToDate($millis)
Converts the current time from milliseconds. For more information, see millistoDate.
minutes-from-dateTime
fn:minutes-from-dateTime(arg)
Returns an xs:integer value between 0 and 59, both inclusive, representing the minute component in the localized value of $arg. For more information, see minutes-from-dateTime.
minutes-from-duration
fn:minutes-from-duration(arg)
Returns an xs:integer representing the minutes component in the value of $arg. For more information, see minutes-from-duration.
minutes-from-time
fn:minutes-from-time(arg)
Returns an xs:integer value between 0 and 59, both inclusive, representing the minute component in the localized value of $arg. For more information, see minutes-from-time.
month-from-date
fn:month-from-date(arg)
Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg. For more information, see month-from-date.
month-from-dateTime
fn:month-from-dateTime(arg)
Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg. For more information, see month-from-dateTime.
months-from-duration
fn:months-from-duration(arg)
Returns an xs:integer representing the minutes component in the value of $arg. The result is obtained by casting $arg to an xs:dayTimeDuration. For more information, see months-from-duration.
now
date:now()
Returns the current time in milliseconds.
seconds-from-duration
fn:seconds-from-duration(arg)
Returns an xs:decimal representing the seconds component in the value of $arg. The result is obtained by casting $arg to an xs:dayTimeDuration. For more information, see seconds-from-duration.
seconds-from-dateTime
fn:seconds-from-dateTime(arg)
Returns an xs:decimal value greater than or equal to 0 and less than 60, representing the seconds and fractional seconds in the localized value of $arg. For more information, see seconds-from-dateTime.
seconds-from-time
fn:seconds-from-time(arg)
Returns an xs:decimal value greater than or equal to 0 and less than 60, representing the seconds and fractional seconds in the localized value of $arg. For more information, see seconds-from-time.
timezone-from-date
fn:timezone-from-date(arg)
Returns the timezone component of $arg, if any. For more information, see timezone-from-date.
timezone-from-dateTime
fn:timezone-from-dateTime(arg)
Returns the timezone component of an xs:dateTime. For more information, see timezone-from-dateTime.
timezone-from-time
fn:timezone-from-time(arg)
Returns the timezone component of an xs:time. For more information, see timezone-from-time.
toChar
date:toChar(date, format)
Converts the date passed to a string based on the specified format string. For more information, see toChar.
trunc
date:trunc(xs:dateTime('date'), 'format')
Truncates dates to a specific year, month, day, hour, minute, second, or millisecond. For more information, see trunc.
year-from-date
fn:year-from-date(arg)
Returns an xs:integer representing the year in the localized value of $arg. The value might be negative. For more information, see year-from-date.
year-from-dateTime
fn:year-from-dateTime(arg)
Returns an xs:integer representing the year component in the localized value of $arg. For more information see year-from-dateTime.
years-from-duration
fn:years-from-duration(arg)
Returns an xs:integer representing the years component in the value of $arg. The result is obtained by casting $arg to an xs:yearMonthDuration. For more information, see years-from-duration.

Digital Signatures

The functions described in the following sections are available for use in digital signatures.

HMAC Functions

The following functions enable you to generate a digital signature by calculating a keyed-hash message authentication code (HMAC):
Function
Syntax
Description
hmacSignature
dsig:hmacSignature($data as xs:string, $key as xs:string, $algorithm as xs:string, $encoding as xs:string?) as xs:string
Generates an HMAC signature using the specified algorithm such as HMACSHA256 or HMACSHA512 and the optional encoding where
$encoding
is one of the following values:
  • Base64 (default)
  • Base64Url
  • Hex
  • Hex64
hmacSHA1signature
dsig:hmacSHA1signature($data as xs:string, $key as xs:string, $encoding as xs:string?) as xs:string
Calculates an HMAC using the SHA1 algorithm and the optional encoding where
$encoding
is one of the following values:
  • Base64 (default)
  • Base64Url
  • Hex
  • Hex64
$data
consist of four parts, including a JSON string in base64 encoding.
To ensure that you get hex binary and not base64 when you use the
hash:hash
function on the payload, use the following expression:
let $md5hex := hash:hash($jsonPayload,"MD5") return xs:base64Binary(xs:hexBinary($md5hex))
hmacSHA256signature
dsig:hmacSHA256signature($data as xs:string, $key as xs:string, $encoding as xs:string?) as xs:string
Calculates an HMAC using the SHA256 algorithm and the optional encoding where $encoding is one of the following values:
  • Base64 (default)
  • Base64Url
  • Hex
  • Hex64
hmacSHA512signature
dsig:hmacSHA512signature($data as xs:string, $key as xs:string, $encoding as xs:string?) as xs:string
Generates an HMAC SHA512 signature using the optional encoding where
$encoding
is one of the following values:
  • Base64 (default)
  • Base64Url
  • Hex
  • Hex64
hmacSHA256signatureForList
dsig:hmacSHA256signatureForList($data as xs:string, @delimiter as xs:string, $key as xs:string, $encoding as xs:string?) as xs:string
Generates an HMAC SHA512 signature using the optional encoding where
$encoding
is one of the following values:
  • Base64 (default)
  • Base64Url
  • Hex
  • Hex64
For more information, see hmacSHA256signatureForList.

Key Signing Functions

The following functions enable you to generate digital signatures based on private keys:
Function
Syntax
Description
signWithKeyFile
dsig:signWithKeyFile($messageToSign as xs:string, $pathToKey as xs:string, $encryptionAlgorithm as xs:string, $digestAlgorithm as xs:string, $encoding as xs:string) as xs:string
Generates a signature using an asymmetric algorithm and a private key, specified in a PKCS8 file.
Arguments:
  • $digestAlgorithm: SHA1 or SHA256
  • $encryptionAlgorithm: RSA (common) or DSA (if using SHA1 for $digestAlgorithm).
  • $pathToKey: The PKCS8 certificate as a Base64-encoded string (-----BEGIN PRIVATE KEY----- ..... n-----END PRIVATE KEY-----\n) or a binary private key file.
  • $encoding
    (optional), which may be:
  • Base64 (default)
  • Hex64
  • Base64Url
signWithKeyString
dsig:signWithKeyString($messageToSign as xs:string, $key as xs:string, $encryptionAlgorithm as xs:string, $digestAlgorithm as xs:string, $encoding as xs:string) as xs:string
Generates a signature using an asymmetric algorithm and a private key, specified in a PKCS8 certificate encoded string.
Arguments:
  • $digestAlgorithm: SHA1 or SHA256
  • $encryptionAlgorithm: RSA (common) or DSA (if using SHA1 for $digestAlgorithm).
  • $key: The PKCS8 certificate as a Base64-encoded string (-----BEGIN PRIVATE KEY----- ..... n-----END PRIVATE KEY-----\n) or a binary private key.
  • $encoding
    (optional), which may be:
    • Base64 (default)
    • Hex64
    • Base64Url
signWithCertificate
dsig:signWithCertificate($messageToSign as xs:string, $pathToCertificate as xs:string, $keyRecoveryPassword as xs:string, $encryptionAlgorithm as xs:string, $digestAlgorithm as xs:string, $encoding as xs:string $keyStorePassword as xs:string, $aliasName as xs:string, $keyStoreType as xs:string) as xs:string
Generates a signature using a PKCS12 certificate.
Arguments:
  • $pathToCertificate: File location on the agent that contains either a PKCS12 or JKS (Java keystore) certificate.
  • $keyRecoveryPassword: Password to access the key in the certificate.
  • $keyStorePassword: Password to open the key store. If empty, assumes the keystore is not password-protected.
  • $aliasName: Optional. Alias of entry in the keystore on the Secure Agent which contains the key. If the alias is not supplied (or empty), the first entry is used.
  • $keyStoreType: Type of keystore, which may be:
    • PKCS12 (default)
    • JKS (Java keystore)

Hashing Functions

The following functions enable you to generate a message hash string:
Function
Syntax
Description
hash
hash:hash($string, $alg)
Generates a hash string for a message using the specified algorithm (optional), where $alg is one of the following:
  • MD5 (default)
  • SHA1
  • SHA256

List Functions

The list functions support only the native Saxon functions. The following functions allow you to work with lists:
Function
Syntax
Description
append
list:append($objectlist, $newItem)
Appends a new item to a list.
count
list:count($objectlist)
Counts the items in a list.
head
list:head($objectlist)
Returns the first item in a list.
list
list:list($sequence)
Converts a sequence of IDs into a semicolon-separated list of IDs for an object list.
remove
list:remove($objectlist, $position)
Removes the item at the specified position from the list.
replace
list:replace($objectlist, $position, $newItem)
Replaces an existing item in a list with a new value.
sequence
list:sequence($objectlistFieldName)
Converts a semicolon-separated list to a sequence.
When an object list field is inserted into formula and content, the field is wrapped in the list:sequence(object_field_name) XQuery function. For object lists in hosted objects, this converts the semicolon-separated list of IDs in the object list into a sequence. For object lists for process objects, the value is already a sequence and the function returns the list unchanged.
tail
list:tail($objectlist)
Return all items from the list with the exception of the first item.

List Function Examples

Perhaps the most common example of using the list functions is to get an object from a list each time a step is invoked, possibly from within a repeated Process or
Service
step. For example:
let mylist.Current:=list:head(mylist.List) let mylist.List:=list:tail(mylist.List)
The following example converts an object list in a semicolon-separated list, then iterates over each item:
for $objectid in list:sequence($objectlist) ...
The following example converts a sequence of IDs into a semicolon-separated list of IDs for an object list for hosted objects. For an object list for process objects, it returns a sequence of values:
let $mergedObjectLists := ( as:sequence($objectlist1), as:sequence($objectlist2) ) return list:list($mergedObjectLists)

Math

In processes and service connectors, you can use the math functions described at http://www.w3.org/2005/xpath-functions/math.

Miscellaneous

The following miscellaneous functions are available:
Function
Syntax
Description
aesEncryption
util:aesEncryption(key, dataToEncrypt)
Encrypts the specified data with the provided key using the Advanced Encryption Standard (AES) algorithm. For more information about the function, see aesEncryption.
aesDecryption
util:aesDecryption(key, dataToDecrypt)
Decrypts the specified data with the provided key using the Advanced Encryption Standard (AES) algorithm. You must use the same key that you had used for encrypting the data in the aesEncryption function. For more information about the function, see aesDecryption.
base64Decode
util:base64Decode(data, charSet)
Returns the base64-decoded version of the input string provided based on the character set specified in the charSet argument. This function is typically used for attachments.
Application Integration supports the character sets that Azul JDK supports for encoding. For example, US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, and UTF-16.
Default for the charSet argument is UTF-8.
base64Encode
util:base64Encode(data, charSet)
Returns the base64-encoded version of the input string provided based on the character set specified in the charSet argument.
Application Integration supports the character sets that Azul JDK supports for encoding. For example, US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, and UTF-16.
Default for the charSet argument is UTF-8.
base64EncodeURL
util:base64EncodeUrl(str, charSet)
Returns a base64-encoded version of the string provided, safe to use in a URL.
Any "+" and "/" characters are replaced with "-" and "_". Any "=" characters are removed.
Default for the charSet argument is UTF-8.
decode
util:decode(value, search1, result1, args, default)
Searches a field for the specified value. For more information, see decode.
error
fn:error(error, description, error-object)
Raises a custom error.
escapeJsonString
util:escapeJsonString(str)
Escapes special characters in the provided string to make it valid for usage in JSON. See JSON standard for details. For more information about the function, see escapeJsonString.
exactly-one
fn:exactly-one(arg)
Returns a sequence if it contains exactly one item, otherwise returns errors.
format
util:format(value, pattern, timezoneId, locale)
Formats string content.
Use the following arguments:
  • value: The string being formatted.
  • pattern: A pattern describing how the value must be formatted. See Formatting Dates, Times, and Numbers.
  • timezoneId: Optional. The time zone ID. If you do not use a stored value (typically returned by a call to date:getTimeZone()), you can omit this argument as Process Designer will call date:getTimeZone().
  • locale: Optional. The locale. If you do not use a stored value (typically returned by a call to date:getLocale()), you can omit this argument as Process Designer will call date:getLocale().
If you use a locale argument but do not use a timezoneId argument, you must add the comma that would follow timezoneId. For example:
util:format("789","##00.00","",date:getLocale())
If the pattern argument contains a date, use lowercase letters to denote the year format. For example, use
yyyy
. If you use uppercase letters, errors might occur.
generate-random-string
util:generate-random-string(length as xs:integer)
Generates a random string of the specified length.
generateUUID
util:generateUUID()
Generates a universally unique identifier.
getAssetLocation
util:getAssetLocation()
Returns the location where the process or the guide that uses the function is stored. For more information, see getAssetLocation.
getAssetName
util:getAssetName()
Returns the name of the process or the guide that uses the function. For more information, see getAssetName.
getCatalogResource
util:getCatalogResource()
Returns the resource based on a catalog location URL within the organization. Takes any catalog resource in the Informatica Cloud organization as its parameter and returns an element node.
To display the element data, add a wrapper function. For example:
serialize(util:getCatalogResource("project:/spi.ipd/services.xml"))
getInstanceStartTime
util:getInstanceStartTime()
Returns the start time of the running instance of the specified process or guide. For more information, see getInstanceStartTime.
getOrganizationId
util:getOrganizationId()
Returns a string that is the organization Id of the context of the currently executing process. For more information, see getOrganizationId.
getOrganizationName
util:getOrganizationName()
Returns the organization name in the context of the executing process, guide, service connector, or data access service connector. For more information, see getOrganizationName.
getProcessId
util:getProcessId()
Returns the process Id of the currently executing or completed process.
getUserName
util:getUserName()
Returns a string that is the login name or ID of the authenticated User running the process .
getUserSystem
util:getUserSystem()
Returns a string that is the name of the system that authenticated the user running the process.
iif
util:iif(condition, val1, val2)
Returns val1 if the condition is true. Else, returns val2. For more information, see iif.
in
util:in(valueToSearch, values, caseFlag)
Matches input data with a list of values. By default, the match is case sensitive. For more information, see in.
isNull
util:isNull(value)
Checks whether the input passed is empty. For more information, see isNull.
one-or-more
fn:one-or-more
Returns a sequence if it contains one or more items, otherwise returns errors.
parseJSON
util:parseJSON(jsonStr)
Parses the provided JSON string and converts it to XML elements.
parseXML
util:parseXML(xmlStr)
Parses the provided XML string and converts it to an XML element.
random
util:random()
Returns a random number from 0 to 1.
resolveURN
util:resolveURN()
Retrieves the URN mapping for an organization.
safeNumber
util:safeNumber()
Holds a number value safely so it cannot be changed.
toDecimal
util:toDecimal(value, scale)
Converts a string or numeric value to a decimal value. For more information, see toDecimal.
toInteger
util:toInteger(value, flag)
Converts a string or numeric value to a decimal value. For more information, see toInteger.
setProcessTitle
ipd:setProcessTitle()
Sets the title of the process.
Use this function only in Informatica Process Designer.
simplifyXml
util:simplifyXml(undefined)
Utility function that is used to remove all namespaces and convert attributes into child elements. For more information, see simplifyXml.
toJSON
util:toJSON(elements)
Converts the provided list of XML elements to a JSON string.
toXML
util:toXML(element)
Converts the provided XML element to an XML string.
trace
util:trunc(arg, precision)
Provides an execution trace to be used in debugging queries. For more information, see trace.
trunc
util:trunc(arg, precision)
Truncates numbers to a specific digit based on the number of decimal places specified by the precision. For more information, see trunc(Numbers).
zero-or-one
fn:zero-or-one(arg)
Returns a sequence if it contains zero or one items, otherwise returns an error.

Numbers

The following number functions are available in the Expression Editor:
  • abs
  • avg
  • ceiling
  • floor
  • max
  • min
  • round
  • round-half-to-even
  • sum

Sequences

The following sequences functions are available in the Expression Editor:
  • count
  • distinct-values
  • index-of
  • insert-before
  • last
  • position
  • remove
  • reverse
  • subsequence
  • unordered

String

The following string functions are available in the Expression Editor:
  • codepoint-equal
  • codepoints-to-string
  • compare
  • concat
  • contains
  • default-collation
  • ends-with
  • lang
  • lower-case
  • matches
  • normalize-space
  • normalize-unicode
  • replace
  • starts-with
  • string-join
  • string-to-codepoints
  • substring
  • substring-after
  • substring-before
  • tokenize
  • translate
  • upper-case

XML

You can add common XML functions as you build expressions. From the Expression Editor, a list of common XML functions displays in these categories:
  • XML Documents, URIs, and IDs (processes only)
  • XML Namespaces and Names
  • XML Nodes
The following XML Nodes functions are available in the Expression Editor:
Function
Syntax
Description
data
fn:data(arg)
Returns the atomic value of a node.
The function takes a sequence of items and returns a sequence of atomic values. For more information, see data.
deep-equal
fn:deep-equal(parameter1, parameter2, collation)
Assesses whether two nodes have the same content and attributes. For more information, see deep-equal.
root
fn:root(arg)
Returns the root of the tree that contains the argument. For more information, see root.

0 COMMENTS

We’d like to hear from you!