A collection of XPath functions are available in the Task Definition Editor Mapper menu bar. These functions are based on the XPath 1.0 specification.
The functions have zero, one, or multiple arguments. Each function returns a single result.
The menu bar contains the following drop-down menus:
The Operator menu contains the following functions:
Greater: Checks whether the first argument is greater than the second and returns Boolean true if the first argument is greater; otherwise it returns false.
Greater or Equal: Checks whether the first argument is greater than or equal to the second and returns Boolean true if the first argument is greater or equal to the second; otherwise, it returns false.
Less: Checks whether the first argument is less than the second and returns Boolean true if the first argument is less than the first; otherwise it returns false.
Less or Equal: Checks whether the first argument is less than or equal to the second and returns Boolean true if the first argument is less than or equal to the second; otherwise it returns false.
Addition: Adds the input values and returns the sum of all arguments.
Subtraction: Subtracts the second argument from the first argument and returns the result.
Multiplication: Multiplies the arguments together and returns the product.
Division: Divides the first argument by the second and returns the quotient.
Remainder: Divides the first argument by the second and returns the remainder.
Negative: Converts the numerical value of the input argument to a negative value.
Not Equal: Compares the two arguments to see if they are not equal to one another. This function returns Boolean true if they are not equal; otherwise it returns false.
Equal: Compares the two arguments to see if they are equal to one another. This function returns Boolean true if they are equal; otherwise it returns false.
The Boolean menu contains the following functions:
Logical And: Checks whether both arguments are true and returns Boolean true if they are both true. If either argument is false, the function returns false.
Logical Or: Checks whether either argument is true and returns Boolean true if one argument is true. If both arguments are false, the function returns false.
Logical Not: Checks whether the argument is false and returns Boolean true if the argument is false. If the argument is true, the function returns false.
Language: Checks whether the language of the context node is the same as or is a sub-language of the language specified in the argument. The function returns Boolean true if the language is the same or a sublimating; otherwise it returns false.
Logical False: Returns Boolean false.
Logical True: Returns Boolean true.
Boolean: Converts the argument to a Boolean. For detailed information about the logic, see the XPath 1.0 specification.
The String menu contains the following functions:
Contains: Checks whether the string in the first argument contains the string in the second argument string. If the first string contains the second, the function returns Boolean true; otherwise it returns false.
Normalize Space: Returns the string in the argument with whitespace normalized by stripping leading and trailing whitespace and by replacing sequences of whitespace characters with a single space.
String: Converts the given object to a string.
Starts With: Checks whether the string in the first argument starts with the string in the second argument, and if it does the function returns Boolean true. Otherwise, the function returns false.
String Length: Returns the number of characters in the input string.
Substring: Returns the substring of the first argument starting at the position specified in the second argument with the length specified in the third argument. The position of the first character is 1, the position of the second character is 2, and so on. The third argument is optional. If the third argument is not specified, then the function returns the substring starting at the position specified in the second argument and continuing to the end of the string.
Substring Before: Returns the substring of the string in the first argument that precedes the first occurrence of the string in the second argument. If the string in the first argument does not contain the second argument string, the function returns an empty string.
Substring After: Returns the substring of the string in the first argument string that follows the first occurrence of the string in the second argument. If the string in the first argument does not contain the second argument string, the function returns an empty string.
Translate: Returns the string in the first argument, but with occurrences of characters in the second argument replaced by the character at the corresponding position in the third argument.
Concat: Returns the concatenation of the arguments.
String Literal: Allows you to specify a literal string that can then be mapped to another argument or to a tree node.
The Nodes menu contains the following functions.
An expanded name consists of a local part and a namespace URI.
Local Name: Returns the local part of the expanded name of the node in the argument node-set that is first in document order.
Name: Returns the qualified name that represents the expanded name of the node in the argument node-set that is first in document order.
Namespace URI: Returns the namespace URI of the expanded name of the node in the argument node-set that is first in document order.
Position: Returns the context position.
Last: Returns the context size.
Count: Returns the number of nodes in the argument node-set.
The Number menu contains the following functions:
Number: Converts the argument to a number. For detailed information about the logic, see the XPath 1.0 specification.
Numeric Literal: Allows you to specify a literal number that you can then map to tree nodes or use as arguments for other functions.
Round: Returns the integer that is closest to the input argument.
Sum: Returns the sum of the result of converting the string values of each node in the argument node-set to a number.
Floor: Returns the largest integer that is not greater than the input argument.
Ceiling: Returns the smallest integer that is not less than the argument.
The Date & Time menu contains the following functions:
Current Date: Returns the current date. This function takes no arguments.
Current Time: Returns the current time. This function takes no arguments.
Current Date and Time: Returns the current date and time. This function returns no arguments.
Deadline Literal: Returns a literal date and time for a deadline. When you select this function, a dialog appears to assist you with entering the deadline in the correct format.
Duration Literal: Returns a literal time period for a duration. When you select this function, a dialog appears to assist you with entering the duration in the correct format.
The WLM Functions menu contains the following functions:
Get Email (LDAP): Returns the email address for the user specified in the input argument.
Get Task Owner: Returns the user who claims the task, or null if the task is not claimed. The task owner is automatically assigned by the WLM SE when a user claims the task.
Get Manager Email (LDAP): Returns the email address for the manager of the user specified in the input argument. To retrieve the email address of the manager of the user who claimed a task, use the result of Get Task Owner as the input for this argument.
Get Manager UID (LDAP): Returns the LDAP UID for the manager of the user specified in the input argument. To retrieve the email address of the manager of the user who claimed a task, use the result of Get Task Owner as the input for this argument.