XPath Extension Functions

March 26, 2018 | Author: Alfa | Category: Xslt, Parameter (Computer Programming), X Path, Function (Mathematics), Xml Schema


Comments



Description

14/05/2010XPath Extension Functions Oracle® Fusion Middleware Developer's Guide for Oracle SOA Suite 11g Release 1 (11.1.1) Home Book Contents Index Contact Part Number E10224-03 List Us View PDF Previous Next B XPath Extension Functions T his appendix describes the XPath extension functions. Oracle provides XPath functions that use the capabilities built into Oracle SOA Suite and XPath standards for adding new functions. T his appendix includes the following sections: Section B.1, "SOA XPath Extension Functions" Section B.2, "BPEL XPath Extension Functions" Section B.3, "Mediator XPath Extension Functions" Section B.4, "Advanced Functions" Section B.5, "Workflow Service Functions" Section B.6, "Using the XPath Building Assistant" Section B.7, "Creating User-Defined XPath Extension Functions" For additional information about XPath functions, visit the following URL: http://www.w3.org B.1 SOA XPath Extension Functions T his section describes the following SOA XPath extension functions: Section B.1.1, "Database Functions" Section B.1.2, "Date Functions" Section B.1.3, "Mathematical Functions" Section B.1.4, "String Functions" B.1.1 Database Functions T his section describes the following database functions: B.1.1.1 lookup-table T his function returns a string based on the SQL query generated from the parameters. T he string is obtained by executing: SELECT outputColumn FROM table WHERE inputColumn = key against the data source that can be either a JDBC connect string (jdbc:oracle:thin:username/password@host:port:sid) or a data source JNDI identifier. Only the Oracle Thin Driver is supported if the JDBC connect string is used. …oracle.com/docs/…/bp_appx_functs.htm 1/69 14/05/2010 XPath Extension Functions Example: oraext:lookuptable('employee','id','1234','last_name','jdbc:oracle:thin:xyz/xyz@localhost:1521:ORCL') Signature: oraext:lookup-table(table, inputColumn, key, outputColumn, data source) Arguments: table - The table from which to draw the data. inputColumn - The column within the table. key - The key value of the input column. outputColumn - The column to output the data. data source - The source of the data. Property IDs: namespace-uri: http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc namespace-prefix: oraext B.1.1.2 query-database T his function returns a node set by executing the SQL query against the specified database. Signature: oraext:query-database(sqlquery as string, rowset as boolean, row as boolean, data source as string) Arguments: sqlquery - The SQL query to perform. rowset - Indicates if the rows should be enclosed in an element. row - Indicates if each row should be enclosed in an element. data source - Either a JDBC connect string (jdbc:oracle:thin:username/password@host:port:sid) or a JNDI name for the database. Property IDs: namespace-uri: http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc namespace-prefix: oraext B.1.1.3 sequence-next-val Returns the next value of an Oracle sequence. T he next value is obtained by executing SELECT sequence.nextval FROM dual against a data source that can be either a JDBC connect string …oracle.com/docs/…/bp_appx_functs.htm 2/69 14/05/2010 XPath Extension Functions (jdbc:oracle:thin:username/password@host:port:sid) or a data source JNDI identifier. Only the Oracle Thin Driver is supported if a JDBC connect string is used. Example: oraext:sequence-nextval('employee_id_sequence','jdbc:oracle:thin:xyz/xyz@localhost:1521:ORCL') Signature: oraext:sequence-next-val(sequence as string, data source as string) Arguments: sequence - The sequence number in the database. data source - Either a JDBC connect string or a data source JNDI identifier. Property IDs: namespace-uri: http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc namespace-prefix: oraext B.1.2 Date Functions T his section describes the following functions: B.1.2.1 add-dayTimeDuration-to-dateTime T his function returns a new date time value adding dateTime to the given duration. If the duration value is negative, then the resulting value precedes dateTime. Signature: xpath20:add-dayTimeDuration-from-dateTime(dateTime as string, duration as string) Arguments: dateTime as string - The dateTime to which the function adds the duration, in string format. duration as string - The duration to add to the dateTime , or subtract if the duration is negative, in string format. Property IDs: namespace-uri: http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20 namespace-prefix: xpath20 B.1.2.2 current-date T his function returns the current date in ISO format YYYY-MM-DD. Signature: xpath20:current-date(object) Arguments: Object - T he time in standard format …oracle.com/docs/…/bp_appx_functs.htm 3/69 functions.services. The format is hh:mm:ssTZD.functions.T he time in standard format Property IDs: namespace-uri: http://www.Xpath20 namespace-prefix: xpath20 B.tip.2. Signature: xpath20:day-from-dateTime(object) Arguments: object . Signature: xpath20:current-time(object) Arguments: object .2.1.services. The default day is 1.tip. Property IDs: namespace-uri: …oracle.14/05/2010 XPath Extension Functions Property IDs: namespace-uri: http://www.functions.5 day-from-dateTime T his function returns the day from dateTime.3 current-dateTime T his function returns the current datetime value in ISO format CCYY-MM-DDThh:mm:ssTZD.services.T he time in standard format Property IDs: namespace-uri: http://www.2.pc.oracle.com/XSL/Transform/java/oracle.1.oracle.htm 4/69 .4 current-time T his function returns the current time in ISO format.1.com/docs/…/bp_appx_functs.T he time in standard format as a string.com/XSL/Transform/java/oracle.pc.pc.tip.com/XSL/Transform/java/oracle. Signature: xpath20:current-dateTime(object) Arguments: object .Xpath20 namespace-prefix: xpath20 B.oracle.Xpath20 namespace-prefix: xpath20 B. format as string) Arguments: dateTime . Signature: xpath20:hours-from-dateTime(dateTime as string) Arguments: dateTime .1.tip. format . Signature: xpath20:implicit-timezone(object) Arguments: object . Property IDs: namespace-uri: http://www.services.Xpath20 …oracle. Property IDs: namespace-uri: http://www.functions.2.Xpath20 namespace-prefix: xpath20 B.oracle.services.1. Signature: xpath20:format-dateTime(dateTime as string.services.com/docs/…/bp_appx_functs.tip. Property IDs: namespace-uri: http://www. indicating a deviation from UTC (Coordinated Universal Timezone).1.hh:mm.com/XSL/Transform/java/oracle.6 format-dateTime T his function returns the formatted string of dateTime using the format provided.tip.8 implicit-timezone T his function returns the current time zone in ISO format +/.com/XSL/Transform/java/oracle.pc.Xpath20 namespace-prefix: xpath20 B.T he format for the output.The string with the date and time.com/XSL/Transform/java/oracle.2.14/05/2010 XPath Extension Functions http://www.oracle.2.The dateTime to be formatted.functions.functions.services.7 hours-from-dateTime T his function returns the hour from dateTime.Xpath20 namespace-prefix: xpath20 B.functions.htm 5/69 . The default hour is 0.pc.oracle.T he time in standard format.com/XSL/Transform/java/oracle.tip.pc.oracle.pc. Signature: xpath20:month-from-dateTime(dateTime as string) Arguments: dateTime as string .The dateTime as a string.services. Signature: xpath20:seconds-from-dateTime(dateTime as string) Arguments: dateTime as a string .pc.12 subtract-dayTimeDuration-from-dateTime …oracle.functions.2.tip.tip.1.Xpath20 namespace-prefix: xpath20 B.The dateTime to be formatted. The default minute is 0.oracle.1.functions.com/XSL/Transform/java/oracle.oracle. Property IDs: namespace-uri: http://www.services. The default second is 0.11 seconds-from-dateTime T his function returns the second from dateTime.com/docs/…/bp_appx_functs.10 month-from-dateTime T his function returns the month from dateTime.pc.2.1.9 minutes-from-dateTime T his function returns the minute from dateTime.com/XSL/Transform/java/oracle.Xpath20 namespace-prefix: xpath20 B.2. Signature: xpath20:minutes-from-dateTime(dateTime as string) Arguments: dateTime as string .com/XSL/Transform/java/oracle. Property IDs: namespace-uri: http://www.Xpath20 namespace-prefix: xpath20 B.1. Property IDs: namespace-uri: http://www.2.oracle.pc.tip.services.The date and time. The default month is 1 (January).functions.htm 6/69 .14/05/2010 namespace-prefix: xpath20 XPath Extension Functions B. tip.functions.functions. then the resultant dateTime value follows input-dateTime value. or to add if the duration is negative.pc.The dateTime from which the function subtracts the duration.oracle.com/XSL/Transform/java/oracle. in string format.services. Property IDs: namespace-uri: http://www. T he default time zone is GMT+00:00.The duration to subtract to the dateTime .htm 7/69 . Property IDs: namespace-uri: http://www.pc. in string format.functions.2. Signature: xpath20:year-from-dateTime(dateTime as string) Arguments: dateTime .tip. Property IDs: namespace-uri: http://www.services.The dateTime for which this function returns a time zone.The dateTime as a string. duration as string) Arguments: dateTime as string .14 year-from-dateTime T his function returns the year from dateTime.1.oracle.2.13 timezone-from-dateTime T his function returns the time zone from dateTime.oracle.Xpath20 namespace-prefix: xpath20 B.com/docs/…/bp_appx_functs.tip. Signature: xpath20:timezone-from-dateTime(dateTime as string) Arguments: dateTime as string .com/XSL/Transform/java/oracle. If the duration value is negative.pc.Xpath20 namespace-prefix: x p20 B.14/05/2010 XPath Extension Functions T his function returns a new dateTime value after subtracting the duration from dateTime.Xpath20 namespace-prefix: xpath20 …oracle. duration as string .services.com/XSL/Transform/java/oracle. Signature: xpath20:subtract-dayTimeDuration-from-dateTime(dateTime as string.1. 1 abs T his function returns the absolute value of inputNumber.The number for which the function returns an absolute value.1 compare T his function returns the lexicographical difference between inputString and compareString by comparing the unicode value of each character of both the strings. T his function returns -1 if inputString lexicographically precedes the compareString.3 Mathematical Functions T his section describes the following function. If the inputNumber is negative. B.functions.1. the inputNumber is returned. the negation of inputNumber is returned.pc.4.Xpath20 namespace-prefix: xpath20 B. propertyName . compareString as string) Arguments: variableName .The qualified name (QName) of the property.pc.1. 'BMW') returns -1 Signature: xpath20:compare(inputString as string.3.4 String Functions T his section describes the string functions.com/XSL/Transform/java/oracle.services. Property IDs: namespace-uri: http://www.oracle.Xpath20 namespace-prefix: xpath20 B. T his function returns 1 if inputString lexicographically follows the compareString.tip.tip.14/05/2010 XPath Extension Functions B.functions. Example: xpath20:compare('Audi'.1.com/docs/…/bp_appx_functs. Example: abs(-1) returns 1.oracle. T his function returns 0 if both inputString and compareString are equal.2 compare-ignore-case …oracle.1.If inputNumber is not negative.services. B.1.htm 8/69 . Property IDs: namespace-uri: http://www.com/XSL/Transform/java/oracle.4.The source variable for the data. Signature: xpath20:abs(inputNumber as number) Arguments: inputNumber as number . ExtFunc namespace-prefix: oraext B.1.oracle.oracle.functions.tip.T he character that separates the items in the output string. for example.pc.pc.4 ends-with T his function returns true if inputString ends with searchString.The node set to be converted into a delimited string.com/docs/…/bp_appx_functs. Example: xpath20:compare-ignore-case('Audi'. a comma or a semicolon.'bmw') returns -1 Signature: xp:compare-ignore-case(inputString as string.4.services.1.3 create-delimited-string T his function returns a delimited string created from nodeSet delimited by delimiter.The string to compare against the input string. T his function returns 1 if inputString lexicographically follows the compareString.4. T his function returns 0 if both inputString and compareString are equal.functions.The string of data to be searched. delimiter as string) Arguments: nodeSet .tip. delimiter .services.'Map') returns true Signature: xpath20:ends-with(inputString as string. Property IDs: namespace-uri: http://www. T his function returns -1 if inputString lexicographically precedes the compareString.com/XSL/Transform/java/oracle.htm 9/69 . Signature: oraext:create-delimited-string(nodeSet as node-set.14/05/2010 XPath Extension Functions T his function returns the lexicographical difference between inputString and compareString while ignoring case and comparing the unicode value of each character of both the strings.Xpath20 namespace-prefix: xpath20 B.com/XSL/Transform/java/oracle. CompareString . Example: xpath20:ends-with('XSL Map'. Property IDs: namespace-uri: http://www. searchString as string) Arguments: …oracle. compareString as string) Arguments: inputString . .4.'2'.functions.oracle.com/docs/…/bp_appx_functs.4.string.One of the strings to be used in the formatted output.functions.oracle.com/XSL/Transform/java/oracle.1.pc.The string of data to be searched.Xpath20 namespace-prefix: xpath20 B. searchString .string. Property IDs: namespace-uri: http://www. Signature: oraext:get-content-from-file-function(object) Arguments: …oracle. Property IDs: namespace-uri: http://www. Property IDs: namespace-uri: http://www.pc.1.ExtFunc namespace-prefix: oraext B.'2'.functions.services.com/XSL/Transform/java/oracle.The input element that the function returns as an XML representation.htm 10/69 .6 get-content-as-string T his function returns the XML representation of the input element.The string for which the function searches.pc.oracle.5 format-string T his function returns the message formatted with the arguments passed.services.tip.) Arguments: string .services.'4') returns '2 + 2 = 4' Signature: oraext:format-string(string.tip.7 get-content-from-file-function T his function returns the content of the file. Signature: oraext:get-content-as-string(element as node-set) Arguments: element as node-set .ExtFunc namespace-prefix: oraext B.4.com/XSL/Transform/java/oracle.1.14/05/2010 XPath Extension Functions inputString .tip. At least one argument is required and supports up to a maximum of 10 arguments.. Example: oraext:format-string('{0} + {1} = {2}'. resourceLocation .resourceLocation.4.com/XSL/Transform/java/oracle.The URL of the resource.4.tip.ExtFunc namespace-prefix: oraext B.tip.1.The message key in the resource bundle.pc. The URL is assumed to be a directory only if it ends with /.1.messageKey) Arguments: resourceURL .country.14/05/2010 XPath Extension Functions object: Property IDs: namespace-uri: http://www. variant as string.The language of the localized output. language . resource bundle as string. resourceLocation as string. This function uses language.The country of the localized output.oracle. country .The name of the ZIP file containing the resource bundle.variant. Example: oraext:index-within-string('ABCABC.resourceBundleName. variant .com/docs/…/bp_appx_functs.language.'MyResourceBundle'. language as string.pc.ExtFunc namespace-prefix: oraext B.''.services.'MSG_KEY') returns a locale-specific string from a resource bundle 'MyResourceBundle' in the C:\ directory Signature: oraext:get-localizedstring(resourceURL. and resource bundle to identify the correct resource bundle.'US'.services. country.The language variant of the localized output.The subdirectory location of the resource.'en'.functions. T he resource bundle in obtained by resolving resourceLocation against the resourceBaseURL. resourceBundleName . Usage: oraext:get-localized-string(resourceBaseURL as string. variant. T his function returns -1 if searchString is not found. Property IDs: namespace-uri: http://www. key as string) Example: oraext:get-localizedstring('file:/c:/'.8 get-localized-string T his function returns the locale-specific string for the key.htm 11/69 .''.oracle. 'B') returns 1 …oracle. country as string.com/XSL/Transform/java/oracle.9 index-within-string T his function returns the zero-based index of the first occurrence of searchString within the inputString .functions. messageKey . The string to be left-trimmed.pc.ExtFunc …oracle.oracle.functions. T his function returns -1 if searchString is not found.1. Example: oraext:left-trim(' account ') returns 'account ' Signature: oraext:left-trim(inputString) Arguments: inputString .The string for which the function searches in the inputString.ExtFunc namespace-prefix: oraext B.pc.10 last-index-within-string T his function returns the zero-based index of the last occurrence of searchString within inputString .1.tip.services. Property IDs: namespace-uri: http://www.ExtFunc namespace-prefix: oraext B.com/XSL/Transform/java/oracle.htm 12/69 .com/docs/…/bp_appx_functs.14/05/2010 XPath Extension Functions Signature: oraext:index-within-string(inputString as string.com/XSL/Transform/java/oracle.functions.tip. searchString as string) Arguments: inputString .11 left-trim T his function returns the value of inputString after removing all the leading white spaces.oracle.pc.tip.The string of data to be searched.oracle. searchString .The string of data to be searched. searchString as string) Arguments: inputString .services.functions. searchString .The string for which the function searches in inputString. Property IDs: namespace-uri: http://www.services.com/XSL/Transform/java/oracle.4. Example: oraext:last-index-within-string('ABCABC'. Property IDs: namespace-uri: http://www.4. 'B') returns 4 Signature: oraext:last-index-within-string(inputString as string. 4.tip.tip.4.*a$') returns true Signature: xpath20:matches(intputString.oracle.1.htm 13/69 .13 matches T his function returns true if intputString matches the regular expression pattern regexPattern.4.functions.pc.1.com/XSL/Transform/java/oracle.Xpath20 namespace-prefix: xpath20 B.Xpath20 namespace-prefix: xpath20 B.14 right-trim T his function returns the value inputString after removing all the trailing white spaces. Property IDs: namespace-uri: http://www.The string of data that is in lowercase. Example: xpath20:lower-case('ABc!D') returns 'abc!d' Signature: xpath20:lower-case(inputString) Arguments: inputString .The regular expression pattern. Example: xpath20:matches('abracadabra'. regexPattern) Arguments: inputString .14/05/2010 namespace-prefix: oraext XPath Extension Functions B.services.The input string to be right-trimmed.12 lower-case T his function returns the value of inputString after translating every character to its lower-case correspondent.functions.oracle.The string of data that must be matched.1.pc.com/XSL/Transform/java/oracle.com/docs/…/bp_appx_functs. …oracle. '^a. regexPattern . Example: oraext:right-trim(' account ') returns ' account' Signature: oraext:right-trim(inputString as string) Arguments: inputString .services. Property IDs: namespace-uri: http://www. pc.1.com/XSL/Transform/java/oracle.services. T his function appends to a node list.2 BPEL XPath Extension Functions T his section describes the following BPEL XPath extension functions: B.com/docs/…/bp_appx_functs.2 appendToList Note: The appendToList function is deprecated.Xpath20 namespace-prefix: xpath20 B.T he string to which this function adds quotes. Oracle recommends that you use the bpelx:copyList extension of an assign activity to append data to a node list.14/05/2010 XPath Extension Functions Property IDs: namespace-uri: http://www.oracle.tip.oracle.15 upper-case T his function returns the value of inputString after translating every character to its uppercase correspondent. Property IDs: namespace-uri: http://www.functions. Signature: ora:addQuotes(string) Arguments: string .oracle.pc.1 addQuotes T his function returns the content of a string with single quotes added.4.tip.ExtFunc namespace-prefix: oraext B.com/XSL/Transform/java/oracle. Property IDs: namespace-uri: http://schemas.2. T he node list with which to append should not be null or empty.htm 14/69 .services.functions. …oracle.com/xpath/extension namespace-prefix: ora B.The string of data that is in uppercase.2. Example: xpath20:upper-case('abCd0') returns 'ABCD0' Signature: xpath20:upper-case(inputString as string) Arguments: inputString . Oracle recommends that you use the bpelx:copyList extension to copy a node list or a node.htm 15/69 .T he object can be either a list or a single item. Each appended item is either an element. Object) Arguments: variableName .3 copyList Note: While the copyList function is still available for use.com/xpath/extension namespace-prefix: ora B.The source variable for the data. or an element with the string value of the node created. partName .Provides an absolute location path (with / meaning the root of the document fragment representing the entire part) to identify the root of a subtree within the document fragment representing the part (optional). namespace-uri: http://schemas.The part to select from the variable (optional). this function appends each item in the list. locationPath . Object . 'partName'?.2. Signature: ora:copyList('variableName'.com/docs/…/bp_appx_functs. T his function copies a node list or a node. If the object is a list. Property IDs: deprecated Use the bpelx:copyList extension activity to append to a list. Object) Arguments: variableName . If the object is a list. Property IDs: deprecated Use the bpelx:copyList or bpelx:append extension activity to append to a list. 'partName'?. each item in the list is copied. partName .T he object can be either a list or a single item. 'locationPath'?.Provides an absolute location path (with / meaning the root of the document fragment representing the entire part) to identify the root of a subtree within the document fragment representing the part (optional). or an element with the string value of the node created. Each item to be copied is either an element. …oracle. Object .The source variable for the data. The node list to be copied to should not be null or empty.oracle.The part to select from the variable (optional). 'locationPath'?. locationPath .14/05/2010 XPath Extension Functions Signature: ora:appendToList('variableName'. 0 of the XPath count() function to return the size of the elements as an integer. Signature: ora:doc('fileName'.6 doStreamingTranslate T his function translates using the streaming XPath APIs. …oracle.oracle.com/xpath/extension namespace-prefix: ora B. it can handle arbitrarily large payloads of the order of gigabytes.4 countNodes Note: While the countNodes function is still available for use. Signature: ora:countNodes('variableName'.The path to the file.14/05/2010 XPath Extension Functions namespace-uri: http://schemas.The part to select from the variable (optional).Provides an absolute location path (with / meaning the root of the document fragment representing the entire part) to identify the root of a subtree within the document fragment representing the part (optional).htm 16/69 . 'locationPath'?) Arguments: variableName .5 doc T his function returns the content of an XML file.'xpath'?) Arguments: fileName .oracle. The targetType can be SDOM or ATTACHMENT. It uses a unique concept called batching so that the transformation engine does not materialize the result of transformation into memory.The name of the XML file.2.The source variable for the data.2.oracle.com/xpath/extension namespace-prefix: ora B. Property IDs: namespace-uri: http://schemas.com/docs/…/bp_appx_functs. Oracle recommends that you use version 1. locationPath . T herefore. T his function returns the size of the elements as an integer. it can handle only forward-only XSL constructs such as for-each. partName .2. xpath . However.com/xpath/extension namespace-prefix: ora B. 'partName'?. Property IDs: namespace-uri: http://schemas. 2.'nxsdTemplate'. 'streaming xpath context'.oracle. ATTACHMENT or SDOM. attachment element .com/xpath/extension namespace-prefix: ora B.The input data of the XPath function.'nxsdTemplate'.'nxsdRoot'. nxsdRoot . targetType . …oracle.This is the attachment for the returned XML. nxsdTemplate .'attachment element?') Arguments: input .'attachment element?') Arguments: input . Signature: ora:doTranslateFromNative('input'.14/05/2010 XPath Extension Functions Signature: ora:doStreamingTranslate('input SDOM or attachment element'.'targetType'.The input data of the XPath function.htm 17/69 . 'SDOM or ATTACHMENT'. attachment. where the input can be a string.com/docs/…/bp_appx_functs.7 doTranslateFromNative T his function translates the input data to XML.Decides how the XPath function translates the native data into XML.2.com/xpath/extension namespace-prefix: ora B. The targetType can be STRING or ATTACHMENT Signature: ora:doTranslateToNative('input'.'targetType'.oracle. or element that contains Base64-encoded data.The root element in the NXSD schema. 'attachment element?') Arguments: input SDOM or attachment element streaming xpath context SDOM or ATTACHMENT attachment element Property IDs: namespace-uri: http://schemas.8 doTranslateToNative T his function translates the input DOM to a string or attachment. Property IDs: namespace-uri: http://schemas.'nxsdRoot'. The targetType can be DOM.The NXSD schema to use to translate the input data to XML format. T his parameter is optional. It must be the root element. paramValue .com/xpath/extension …oracle. When using this function.The root element in the NXSD schema.2. Property IDs: namespace-uri: http://schemas.Specifies the value of the parameter.Specifies the value of the parameter.14/05/2010 XPath Extension Functions nxsdTemplate . It aims to perform the transformation when the XSLT template matches the document.com/xpath/extension namespace-prefix: ora B.The NXSD schema to use to translate the input data to XML format.This is the attachment for the returned XML.Specifies the XSL style sheet URL. Signature: ora:doXSLTransformForDoc('url_to_xslt'.oracle. targetType .Specifies the input variable name.com/xpath/extension namespace-prefix: ora B.0's doXSLTransform function that supports multiple parameters of XSLT.paramValue]*) Arguments: url_to_xslt . paramQname .9 doXSLTransform T his function implements WS-BPEL 2.Specifies the input variable name. input .Specifies the parameter QName.10 doXSLTransformForDoc T his function is a complement XPath function to doXSLTransform(). attachment element . nxsdRoot .paramValue]*) Arguments: url_to_xslt . Property IDs: namespace-uri: http://schemas.2. Signature: ora:doXSLTransform('url_to_xslt'.input. paramQname . T his parameter is optional. paramValue .oracle.oracle.Specifies the parameter QName.['paramQname'. input . Property IDs: namespace-uri: http://schemas.['paramQname'.htm 18/69 .Decides how the XPath function translates the native data into XML. the XSL template match must not be set to root (which is /).Specifies the XSL style sheet URL.input.com/docs/…/bp_appx_functs. 13 getApplicationName T his function returns the application name.Contains a string formatted according to java.Contains a date-related value in XSD format. the output is an empty string.14 getAttachmentContent T his function gets the attachment content from an href function. For nonstring arguments.com/xpath/extension namespace-prefix: ora B. Signature: ora:formatDate('dateTime'. For example. format . 2003-06-10T15:56:00.text. Signature: …oracle.com/docs/…/bp_appx_functs.11 formatDate T his function converts standard XSD date formats to characters suitable for output.SimpleDateFormat format Property IDs: namespace-uri: http://schemas. If the argument is not a date.14/05/2010 namespace-prefix: ora XPath Extension Functions B.com/xpath/extension namespace-prefix: ora B.htm 19/69 . Signature: ora:generateGUID() Arguments: T here are no arguments for this function.'format') Arguments: dateTime .oracle. Property IDs: namespace-uri: http://schemas.2.oracle. Signature: ora:getApplicationName() Arguments: T here are no arguments for this function.2. this function attempts to fill unspecified fields. this function behaves as if a string() function were applied.12 generateGUID Generates a unique GUID. If it is a valid XSD date and some fields are empty. Property IDs: namespace-uri: http://schemas.com/xpath/extension namespace-prefix: ora B.oracle.2.2. query]]) Arguments: varName .17 getCompositeName T his function returns the composite name. Property IDs: namespace-uri: http://schemas. partName .oracle. Property IDs: namespace-uri: http://schemas. Signature: ora:getCompositeName() Arguments: T here are no arguments for this function. Property IDs: namespace-uri: http://schemas. partName[.com/xpath/extension namespace-prefix: ora B.2.15 getComponentName T his function returns the component name.com/docs/…/bp_appx_functs.com/xpath/extension …oracle. query .14/05/2010 XPath Extension Functions ora:getAttachmentContent(varName[. Property IDs: namespace-uri: http://schemas.2.htm 20/69 .com/xpath/extension namespace-prefix: ora B.oracle.2.com/xpath/extension namespace-prefix: ora B.oracle.oracle.Specifies the source variable for the data. Signature: ora:getComponentInstanceID() Arguments: T here are no arguments for this function.(Optional) Specifies an absolute location path (with / meaning the root of the document fragment representing the entire part) to identify the root of a subtree within the document fragment representing the part. Signature: ora:getComponentName() Arguments: T here are no arguments for this function.16 getComponentInstanceID T his function returns the component instance ID.(Optional) Specifies the part to select from the variable. 20 getContentAsString T his function returns the content of an element as an XML string. Signature: ora:getCompositeInstanceID() Arguments: T here are no arguments for this function.com/xpath/extension namespace-prefix: ora B.19 getCompositeURL T his function returns the composite URL.21 getConversationId T his function returns the conversation ID.T he element as the node list. Signature: ora:getCompositeURL() Arguments: T here are no arguments for this function.2.oracle.com/xpath/extension namespace-prefix: ora B.The element (source of the data). Property IDs: namespace-uri: http://schemas.14/05/2010 namespace-prefix: ora XPath Extension Functions B.18 getCompositeInstanceID T his function returns the BPEL process composite instance ID. Property IDs: namespace-uri: http://schemas.2.2. Signature: ora:getConversationId() …oracle.com/docs/…/bp_appx_functs.oracle. Signature: ora:getContentAsString(element elementAsNodeList) Arguments: element .htm 21/69 .oracle.2. elementAsNodeList .com/xpath/extension namespace-prefix: ora B. Property IDs: namespace-uri: http://schemas. oracle.2. Signature: ora:getCurrentDateTime('format'?) Argument: format .oracle.com/xpath/extension namespace-prefix: ora B.2. Signature: ora:getCreator() Arguments: T here are no arguments for this function. Property IDs: namespace-uri: http://schemas.oracle.com/xpath/extension namespace-prefix: ora B.oracle.htm 22/69 .com/xpath/extension namespace-prefix: ora B.SimpleDateFormat format (optional).25 getCurrentTime …oracle.text. Property IDs: namespace-uri: http://schemas. Property IDs: namespace-uri: http://schemas.23 getCurrentDate T his function returns the current date as a string.2.22 getCreator T his function returns the instance creator.14/05/2010 XPath Extension Functions Arguments: T here are no arguments for this function.24 getCurrentDateTime T his function returns the current date time as a string.text.(Optional) Specifies a string formatted according to java. Signature: ora:getCurrentDate('format'?) Argument: format .SimpleDateFormat format (optional).com/docs/…/bp_appx_functs.com/xpath/extension namespace-prefix: ora B. Property IDs: namespace-uri: http://schemas.2.(Optional) Specifies a string formatted according to java. Signature: ora:getElement('variableName'.14/05/2010 XPath Extension Functions T his function returns the current time as a string.com/xpath/extension namespace-prefix: ora B. index) Arguments: variableName .28 getElement T his function returns an element using index from the array of elements.SimpleDateFormat format (optional).oracle. Signature: ora:getECID() Arguments: T here are no arguments for this function.oracle. 'locationPath'. Property IDs: namespace-uri: http://schemas. partName .26 getDomainId T his function returns the current domain ID. Signature: ora:getCurrentTime('format'?) Argument: format .27 getECID T his function returns ECID.The source variable for the data. Signature: ora:getDomainId() Arguments: T here are no arguments for this function.com/xpath/extension namespace-prefix: ora B.com/xpath/extension namespace-prefix: ora B.2.(Optional) Specifies a string formatted according to java.2. Property IDs: namespace-uri: http://schemas.text. 'partName'.com/docs/…/bp_appx_functs.The part to select from the variable (required).2.htm 23/69 . Property IDs: namespace-uri: http://schemas. …oracle.oracle. Property IDs: namespace-uri: http://schemas.T he alias for a list of users or groups. Property IDs: namespace-uri: http://schemas.2. Signature: ora:getGroupIdsFromGroupAlias(String aliasName) Arguments: aliasName .com/xpath/extension namespace-prefix: ora …oracle.31 getGroupIdsFromGroupAlias T his function returns a List of user Ids for a group alias specified in the TaskServiceAliases section of the BPEL suitcase descriptor.Dynamic index value.htm 24/69 . Property IDs: namespace-uri: http://schemas.Provides an absolute location path (with / meaning the root of the document fragment representing the entire part) to identify the root of a subtree within the document fragment representing the part (required). index .29 getFaultAsString T his function returns the fault as a string value.2. Signature: ora:getFaultAsString() Arguments: T here are no arguments for this function.oracle. Signature: ora:getFaultName() Arguments: T here are no arguments for this function.oracle.2.oracle.30 getFaultName T his function returns the fault name. Property IDs: namespace-uri: http://schemas.com/xpath/extension namespace-prefix: ora B.com/xpath/extension namespace-prefix: ora B.com/docs/…/bp_appx_functs. The index of the first node is 1.com/xpath/extension namespace-prefix: ora B.oracle.14/05/2010 XPath Extension Functions locationPath . Signature: ora:getNodes('variableName'.Provides an absolute location path (with / meaning the root of the document fragment representing the entire part) to identify the root of a subtree within the document fragment representing the part (optional).2.2.htm 25/69 .com/xpath/extension namespace-prefix: ora B. partName .14/05/2010 XPath Extension Functions B. Property IDs: namespace-uri: http://schemas.The DOM node.32 getInstanceId T his function returns the instance ID.oracle. …oracle.com/xpath/extension namespace-prefix: ora B.34 getNodes T his function gets a node list. 'locationPath'?) Arguments: variableName .oracle.33 getNodeValue T his function returns the value of a DOM node as a string.2. Signature: ora:getInstanceId() Arguments: T here are no arguments for this function. 'partName'?.The source variable for the data.2. which does not return a node list. locationPath .35 getOwnerDocument T his function returns the document object associated with the node. This is implemented as an alternate to bpws:getVariableData.com/docs/…/bp_appx_functs.The part to select from the variable (optional). Property IDs: namespace-uri: http://schemas. Signature: ora:getNodeValue(node) Arguments: node . Property IDs: namespace-uri: http://schemas.com/xpath/extension namespace-prefix: ora B.oracle. com/xpath/extension …oracle. Signature: ora:getParentComponentInstanceID() Arguments: T here are no arguments for this function.com/docs/…/bp_appx_functs.14/05/2010 XPath Extension Functions Signature: ora:getOwnerDocument(node) Arguments: node .com/xpath/extension namespace-prefix: ora B.2.36 getParentComponentInstanceID T his function returns the BPEL process instance parent component instance ID. Property IDs: namespace-uri: http://schemas.com/xpath/extension namespace-prefix: ora B.oracle.38 getProcessId T his function returns the ID of the current BPEL process. Property IDs: namespace-uri: http://schemas. Signature: ora:getPreference(preferenceName) Arguments: preferenceName .htm 26/69 .Specifies the XML node. Signature: ora:getProcessId() Arguments: T here are no arguments for this function.oracle.oracle. Property IDs: namespace-uri: http://schemas.oracle.37 getPreference T his function returns the value of a property specified in the preferences section of the BPEL suitcase descriptor. Property IDs: namespace-uri: http://schemas.2.com/xpath/extension namespace-prefix: ora B.2.T he name of the preference as specified in the BPEL suitcase descriptor. 42 getUserAliasId T his function returns the user ID for an alias specified in the TaskServiceAliases section of the BPEL suitcase descriptor.oracle.oracle.2.39 getProcessOwnerId T his function returns the ID of the user who owns the process.2. Signature: ora:getProcessVersion() Arguments: T here are no arguments for this function.T he alias for a list of users or groups.14/05/2010 namespace-prefix: ora XPath Extension Functions B. Signature: ora:getProcessURL() Arguments: T here are no arguments for this function. Property IDs: namespace-uri: http://schemas. Property IDs: namespace-uri: http://schemas. …oracle.com/docs/…/bp_appx_functs.2.2. Signature: ora:getUserAliasId (String aliasName) Arguments: aliasName .40 getProcessURL T his function returns the root URL of the current BPEL process.com/xpath/extension namespace-prefix: ora B.com/xpath/extension namespace-prefix: ora B. Property IDs: namespace-uri: http://schemas.oracle. if specified in the TaskServiceAliases section of the BPEL suitcase descriptor. Signature: ora:getProcessOwnerId() Arguments: T here are no arguments for this function.41 getProcessVersion T his function returns the current process version.htm 27/69 .com/xpath/extension namespace-prefix: ora B. Specifies the composite instance title. Signature: ora:getUserIdsFromGroupAlias( String aliasName ) Arguments: aliasName . Signature: ora:instanceOf(an_xpath_expression.com/xpath/extension …oracle.An XPath expression that returns an element typeQName .14/05/2010 XPath Extension Functions Property IDs: namespace-uri: http://schemas. Property IDs: namespace-uri: http://schemas. Signature: med:setCompositeInstanceTitle(title) Arguments: title .The QName of a global declared XSD type Property IDs: namespace-uri: http://schemas.com/docs/…/bp_appx_functs.44 setCompositeInstanceTitle T his function sets a title to the composite instance which can later be used as one of the criteria in searching the instances.oracle.oracle.43 getUserIdsFromGroupAlias T his function returns a List of user IDs for a group alias specified in the TaskServiceAliases section of the BPEL suitcase descriptor. This function returns the same string that is passed as the argument.2. This can be specified as an XPath expression on the message payload.oracle.com/xpath/extension namespace-prefix: ora B.Alias name of the group. Property IDs: namespace-uri: http://schemas.com/xpath/extension namespace-prefix: ora B.com/xpath/extension namespace-prefix: ora B.2.oracle.45 instanceOf T his function extracts arbitrary values from BPEL variables. 'typeQName') Arguments: an_xpath_expression .htm 28/69 .2. oracle.14/05/2010 namespace-prefix: ora XPath Extension Functions B.2. Property IDs: namespace-uri: http://schemas.48 parseXML T his function parses a string to a DOM element.2.49 processXQuery T his function returns the result of an XQuery transformation. Signature: …oracle. Signature: ora:parseEscapedXML(contentString) Arguments: contentString .2.47 parseEscapedXML T his function parses a string to DOM.The string that this function parses to a DOM element.com/xpath/extension namespace-prefix: ora B.com/xpath/extension namespace-prefix: ora B.com/xpath/extension namespace-prefix: ora B.The input node.46 integer T his function returns the content of the node as an integer. Property IDs: namespace-uri: http://schemas.oracle. Signature: ora:integer(node) Arguments: node .htm 29/69 .com/docs/…/bp_appx_functs.The string that this function parses to a DOM.oracle.2. Signature: ora:parseXML(contentString) Arguments: contentString . Property IDs: namespace-uri: http://schemas. input . properties .The input data to be transformed. Property IDs: namespace-uri: http://schemas.com/xpath/extension namespace-prefix: xdk B.The input data to be transformed.com/docs/…/bp_appx_functs.oracle. Both HTTP and file URLs are supported.'input'. Property IDs: namespace-uri: http://schemas.The XSLT template.51 processXSLTAttachment T his function returns the results of XSLT transformation by using the Oracle XDK XSLT processor.com/xpath/extension namespace-prefix: ora B. input .oracle.The location of the actual data.The XSLT template. This function also supports transformations from and to XML attachments. href .14/05/2010 ora: ry('template'.'href'?. properties .xml file.The XSLT template. Signature: ora:processXSLTAttachment('template'.The properties as defined in the bpel.2.xml file.The properties as defined in the bpel.htm 30/69 .'properties'?) Arguments: template . Signature: xdk:processXSLT('template'.2.'properties'?) Arguments: template .'context'?) XPath Extension Functions Arguments: template . input .xml file. Property IDs: namespace-uri: http://schemas.50 processXSLT T his function returns the result of XSLT transformation using the Oracle XDK XSLT processor. properties .com/xpath/extension namespace-prefix: ora …oracle.'input'.The properties as defined in the bpel.The input data to be transformed.oracle. 2.htm 31/69 . Property IDs: namespace-uri:http://schemas. Signature: ora:readBinaryFromFile(fileName) Arguments: fileName . Property IDs: namespace-uri: http://schemas.'input'. This function by default reads files relative to the suitcase JAR file for the process.com/docs/…/bp_appx_functs. This argument can also be an HT TP URL. If the file to read is located in a different directory path.xml file.The properties as defined in the bpel.53 readBinaryFromFile T his function reads data from a file.doc")".com/xpath/extension namespace-prefix: ora B. you must specify an extra directory slash ( /) to indicate that this is an absolute path.'nxsdTemplate'?.oracle.com/xpath/extension namespace-prefix: ora B. …oracle.The XSLT template.14/05/2010 XPath Extension Functions B. Signature: ora:readFile('fileName'.52 processXSQL T his function returns the result of the XSQL request.'nxsdRoot'?) Arguments: fileName . properties .The file name from which to read data.doc') If you specify only two directory slashes (//). Error while processing xpath expression.54 readFile T his function returns the content of the file.oracle. input . the expression is "ora:readFile("file://c:/temp/test.'properties'?) Arguments: template .2.The input data to be transformed.The name of the file. you receive an error similar to the following: XPath expression failed to execute. Signature: ora:processXSQL('template'. For example: ora:readFile('file:///c:/temp/test.2. htm 32/69 .oracle.com/docs/…/bp_appx_functs. Signature: ora:writeBinaryToFile(varName[.The NXSD template for the output nxsdRoot -T he NXSD root Property IDs: namespace-uri: http://schemas.56.The name of the variable. If the status of the link is positive the value is true.2.io.2. partName[.The name of the part in the messageType variable. query .56 BPEL Extension Functions T his section describes BPEL extension functions.14/05/2010 XPath Extension Functions the reason is c.IOException: Server returned HTTP response code: 401 for URL B. If you tried to access such a file. nxsdTemplate .com/xpath/extension namespace-prefix: ora B.2. then you get the following error: java. Verify the xpath query. This function can only be used in a join condition.com/xpath/extension namespace-prefix: ora Note: Currently. partName . Signature: bpws:getLinkStatus ('linkName') …oracle.1 getLinkStatus T his function returns a boolean value indicating the status of the link.oracle. otherwise the value is false.55 writeBinaryToFile T his function writes the binary bytes of a variable (or part of the variable) to a file of the given file name. query]]) Arguments: varName .The query string to a child of the root element. Property IDs: namespace-uri:http://schemas. T he linkName argument refers to the name of an incoming link for the activity associated with the join condition. the readFile function does not support the functionality to access files on a web server that requires authorization. B. The part to select from the variable (optional).The source variable for the data. 'propertyname') Arguments: variableName . the standard fault bpws:selectionFailure is thrown.The source variable for the data. Property IDs: namespace-uri: http://schemas. Signature: bpws:getVariableProperty ('variableName'.The QName of the property.com/docs/…/bp_appx_functs. Signature: bpws:getVariableData ('variableName'.The QName of the property.2 getVariableData T his function extracts arbitrary values from BPEL variables.56. When only the first argument is present.htm 33/69 .The source variable for the data.3 getVariableProperty T his function extracts arbitrary values from BPEL variables. locationPath . which in this case must be defined using an XML schema simple type or element. locationPath . 'locationPath'?) Arguments: variableName .org/ws/2003/03/business-process/ namespace-prefix: bpws B.Provides an absolute location path (with / meaning the root of the document …oracle. the function extracts the value of the variable. propertyName .2. the standard fault bpws:selectionFailure is thrown.14/05/2010 XPath Extension Functions Arguments: variableName .xmlsoap.2.xmlsoap. the return value of this function is a node set containing the single node representing either an entire part of a message type (if the second argument is present and the third argument is absent) or the result of the selection based on the locationPath (if both optional arguments are present). 'partName'?. Property IDs: namespace-uri: http://schemas.Provides an absolute location path (with / meaning the root of the document fragment representing the entire part) to identify the root of a subtree within the document fragment representing the part (optional). If the given property selects a node set of a size other than one during execution. partName . propertyName . If the given locationPath selects a node set of a size other than one during execution. Otherwise.56.org/ws/2003/03/business-process/ namespace-prefix: bpws B. com/docs/…/bp_appx_functs. Signature: ora:batchProcessCompleted(String batchId.T he ID of the process.2.com/xpath/extension namespace-prefix: ora B.htm 34/69 . Signature: ora:format(formatStrings.57 Utility Functions T his section describes the utility functions. String processId) Arguments: batchId .14/05/2010 XPath Extension Functions fragment representing the entire part) to identify the root of a subtree within the document fragment representing the part (optional).xmlsoap.org/ws/2003/03/business-process/ namespace-prefix: bpws B.T he ID of the process.oracle.oracle.57.3 format T his function formats a message using Java's message format. B. String processId) Arguments: batchId .57. Signature: ora:batchProcessActive(String batchId. processId .2.com/xpath/extension namespace-prefix: ora B. Property IDs: namespace-uri:http://schemas. Property IDs: namespace-uri: http://schemas. processId .2.2.The ID of the batch.57.1 batchProcessActive T his function returns the number of active processes in the batch.The ID of the batch. args+) Arguments: …oracle. Property IDs: namespace-uri:http://schemas.2 batchProcessCompleted T his function returns the number of completed processes in the batch. the xsi:type attribute is not generated.The second optional integer argument for the number of empty elements. Property IDs: namespace-uri: http://schemas. index .size?.57. Signature: ora:genEmptyElem('ElemQName'.htm 35/69 .T he third optional argument is the QName. size . the extra arguments are ignored.The integer value of the child element index.nil.oracle. The default is false. xsi:nil is not generated.2.The string of data to be formatted.T he first argument is the QName of the empty elements. If missing or an empty string. which is the xsi:type of the generated empty name. If there are more arguments than format specifiers. xsiNil?) Arguments: ElemQName .oracle. Property IDs: namespace-uri: http://schemas. Signature: ora:getChildElement(element.com/docs/…/bp_appx_functs.The source for the data.com/xpath/extension namespace-prefix: ora …oracle. the default size is 1.The arguments referenced by the format specifiers in the format string. This xsi:type pattern matches SOAPENC:Array. TypeQName . 'TypeQName'?. xsiNil .14/05/2010 XPath Extension Functions formatStrings . The number of arguments is variable and may be zero.oracle.T he fourth optional boolean argument is to specify whether the generated empty elements are XSI .2.5 getChildElement T his function gets a child element for the given element. args+ .57. If missing. index) Arguments: element .com/xpath/extension namespace-prefix: ora B. provided the element is XSD-nillable.4 genEmptyElem T his function generates a list of empty elements for the given QName. If missing or false.com/xpath/extension namespace-prefix: ora B. Property IDs: namespace-uri: http://schemas. In the case of elements.57.8 min-value-among-nodeset T his function returns the minimum value from a list of input numbers.oracle.In the case of elements.57. Signature: oraext:max-value-among-nodeset(inputNumber as node-set) Arguments: inputNumber .57. the node-set inputNumbers.The subdirectory or message.services.The name of the message resource.tip. resourceKey.ExtFunc namespace-prefix: oraext B. Signature: oraext:min-value-among-nodeset(inputNumbers as node-set) Arguments: …oracle.oracle.The node-set of input numbers. Property IDs: namespace-uri: http://schemas. T he node-set inputNumber can be a collection of text nodes or elements containing text nodes. Property IDs: namespace-uri: http://www. relativeLocation .The key of the resource.The node-set can be a collection of text nodes or elements containing text nodes. the first text node's value is considered.The location of the resource. the node-set inputNumber.2. resourceLocation?) Arguments: locale .pc.14/05/2010 XPath Extension Functions B. resourceLocation .7 max-value-among-nodeset T his function returns the maximum value from a list of input numbers.htm 36/69 . the first text node's value is considered.2.com/XSL/Transform/java/oracle. resourceName.com/xpath/extension namespace-prefix: ora B.functions. resourceKey .6 getMessage T his function gets a message based on the arguments.com/docs/…/bp_appx_functs. resourceName .2. relativeLocation. Signature: ora:getMessage(locale.T he locale of the message. 10 translateFromNative T his function translates the input stream to an XML file.oracle.'nxsdRoot'?) Arguments: …oracle.tip. nxsdRoot .functions.com/XSL/Transform/java/oracle.2.The input number for which the function calculates the square root.htm 37/69 .The node-set of input numbers.11 translateToNative T ranslates the XML to the native data. Signature: ora:translateFromNative('string'.'nxsdTemplate'?.com/XSL/Transform/java/oracle. nxsdTemplate . Property IDs: namespace-uri: http://www.2. Property IDs: namespace-uri: http://schemas.'nxsdTemplate'?.57.57.oracle.services.The XSD file used to define how the translation is performed.pc.pc.tip.The root element defined in the XSD file.57.2.services.functions.14/05/2010 XPath Extension Functions inputNumber .com/xpath/extension namespace-prefix: ora B.T he data to be converted into an XML file.ExtFunc namespace-prefix: oraext B. Property IDs: namespace-uri: http://www. Example: oraext:square-root(25) returns 5 Signature: oraext:square-root(inputNumber as number) Arguments: inputNumber .'nxsdRoot'?) Arguments: string .oracle. Signature: ora:translateFromNative('string'.ExtFunc namespace-prefix: oraext B.com/docs/…/bp_appx_functs.9 square-root T his function returns the square root of inputNumber. The XSD file used to define how the translation is performed. nxsdRoot . nxsdRoot .2.'nxsdTemplate'?.57.The XSD file used to define how the translation is performed.htm 38/69 . Property IDs: namespace-uri: http://schemas.com/xpath/extension namespace-prefix: ora B. Signature: ora:translateFromNativeAttachment('string'. nxsdTemplate .The root element defined in the XSD file.12 translateFromNativeAttachment T his function translates the input stream to XML.com/xpath/extension namespace-prefix: ora B.13 translateToNativeAttachment T his function translates XML to the native data.14/05/2010 XPath Extension Functions string .'nxsRoot'?) Arguments: string .T he data to be converted into an XML file.oracle.2.T he data to be converted into an XML file.T he XML file to be converted into a string. nxsdTemplate .'nxsRoot'?) Arguments: string .3 Mediator XPath Extension Functions T his section describes the following functions: B. nxsdRoot -T he root element defined in the XSD file. Signature: ora:translateFromNativeAttachment('string'.com/docs/…/bp_appx_functs. nxsdTemplate .oracle.'nxsdTemplate'?. Property IDs: namespace-uri: http://schemas.1 getComponentInstanceID …oracle.The XSD file used to define how the translation is performed. Property IDs: namespace-uri: http://schemas.com/xpath/extension namespace-prefix: ora B.57.oracle.3.The root element defined in the XSD file. htm 39/69 . Property IDs: namespace-uri: http://schemas. Signature: mdhr:getComponentInstanceId() Arguments: T here are no arguments for this function. Signature: mdhr:getComponentName() Arguments: T here are no arguments for this function.5 getHeader …oracle.4 getCompositeName T his function returns the composite name.oracle.3 getCompositeInstanceID T his function returns the composite instance id.com/xpath/extension namespace-prefix: mdhr B.3.com/xpath/extension namespace-prefix: mdhr B.3. Property IDs: namespace-uri: http://schemas.oracle.2 getComponentName T his function returns the component name. Signature: mdhr:getComponentInstanceId() Arguments: T here are no arguments for this function. Property IDs: namespace-uri: http://schemas.com/xpath/extension namespace-prefix: mdhr B.14/05/2010 XPath Extension Functions T his function returns the component instance id.oracle.com/xpath/extension namespace-prefix: mdhr B.3.com/docs/…/bp_appx_functs.oracle. Signature: mdhr:getCompositeName() Arguments: T here are no arguments for this function. Property IDs: namespace-uri: http://schemas.3. Namespace declarations are in the following form: 'prefix=namespace. Property IDs: namespace-uri: http://schemas. Signature: mdhr:getHeader(xpath as string.ns9_name/ns9:name/ns9:first".com.oracle.com/xpath/extension namespace-prefix:mdhr B. Note the semicolon after the namespace declaration.com/docs/…/bp_appx_functs. This argument is not optional. For example: getHeader("in. Note: The getHeader function works only when both parameters are specified.header.7 getParentComponentInstanceID T his function returns the mediator instance parent component instance id. Property IDs: namespace-uri: http://schemas.14/05/2010 XPath Extension Functions T his function returns the value of an XPath expression from the mediator message header.6 getECID T his function returns the ECID."ns9=http//exmaple.3. Signature: mdhr:getECID() Arguments: T here are no arguments for this function. click Add. namespaces as string) Arguments: xpath: Refers to the path you traverse from the schema.htm 40/69 .com/xpath/extension namespace-prefix: mdhr B. Signature: mdhr:getParentComponentInstanceId() Arguments: T here are no arguments for this function. drag the getHeader function into the mapper.") In the XSLT Mapper in Oracle JDeveloper. Property IDs: …oracle. In the Edit Function .getHeader dialog.oracle. The namespaces argument is added for you to enter the required information.3. namespaces: Refers to the abstract container that contains the context of the XPath expression. com/xpath/extension namespace-prefix: mdhr B.4 Advanced Functions T his section describes the advanced functions. for example.Specifies the composite instance title.htm 41/69 .oracle.com/xpath/extension namespace-prefix: mdhr B. Signature: …oracle.14/05/2010 XPath Extension Functions namespace-uri: http://schemas.2 generate-guid T he function generates a unique GUID.4.1 create-nodeset-from-delimited-string T he function takes a delimited string and returns a nodeSet. This function returns the same string that is passed as the argument.4. Signature: mdhr:setCompositeInstanceTitle(title) Arguments: title .T he character that separates the items in the input string.oracle.services.oracle.ExtFunc namespace-prefix: oraext B.functions. Property IDs: namespace-uri: http://schemas.8 setCompositeInstanceTitle T his function sets a title to the composite instance that can be later used as one of the criteria in searching the instances.3.com/XSL/Transform/java/oracle. delimited-string. Property IDs: namespace-uri: http://www.The qualified name in which each node in the node set must be created.The sting of elements separated by the delimiter. B.tip. a comma or a semicolon.com/docs/…/bp_appx_functs. Signature: oraext:create-nodeset-from-delimited-string(qname. delimiter . delimiter) Arguments: qname . This can be specified as an XPath expression on the message payload.pc. The QName can be represented in two forms: task:assignee {http://mytask/task}assignee delimited-string . defaultValue) Arguments: dvmLocation: The domain value map URI.4. an empty node-set is returned.functions.xpath. where the source column contains the given source value. xrefColumnName : The name of the reference column.4. Otherwise.sourceValue. sourceColumnName: T he source column name.oracle.com/docs/…/bp_appx_functs.ExtFunc namespace-prefix: oraext B. sourceValue: The source value (an XPath expression bound to the source document of the XSLT transformation).targetColumnName.sourceColumnName. then the default value is returned.value.4 lookupValue T he function returns a string by looking up the value for the target column in a domain value map. xrefValue : The value corresponding to reference column name.pc.tip.htm 42/69 . Signature: dvm:lookupValue(dvmLocation.needAnException) Arguments: xrefTableName: T he name of the reference table.com/XSL/Transform/java/oracle. Property IDs: namespace-uri: http://www.tip.services.oracle.xref.14/05/2010 oraext:generate-guid() XPath Extension Functions Arguments: T here are no arguments for this function. defaultValue : If the value is not found. Signature: xref:lookupPopulatedColumns(tableName.3 lookupPopulatedColumns T his function is used to look up a cross-reference column for a single value or multiple values corresponding to a value in a reference column.XRefXPathFunctions namespace-prefix: xref B. targetColumnName: T he target column name. needAnException: If this value is set to true. …oracle. then an exception is thrown when no value is found in the referenced column.com/XSL/Transform/java/oracle. Property IDs: namespaceuri:http://www. QualifierSourceColumn: T he name of the qualifier column.columnName. The source column name. xrefReferenceValue: The value corresponding to reference column name. At least one column name should be specified.targetColumnName2. needAnException: : When value is set to true.sourceValue. SourceValue .oracle.needAnException) Arguments: xrefLocation : The cross-reference URI. Property IDs: namespace-uri: http://www.. Property IDs: namespace-uri: http://www. where the value for source column equals the source value.The source value (an XPath expression bound to the source document of the XSLT transformation). The question mark symbol (?) indicates that you can specify multiple target column names.tip.targetColumnName1.) Arguments: dvmMetadataURI .dvm.referenceColumnName.4.sourceColumnName. Signature: dvm:lookupValue1M(dvmLocation. Signature: xref:lookupXRef(tableName. TargetColumnName ..T he domain value map URI. Property IDs: …oracle.4.columnName.com/XSL/Transform/java/oracle.6 lookupXRef T his function is used to look up a cross-reference column for a value that corresponds to a value in a reference column.5 lookupValue1M T he function returns an XML document fragment containing values for multiple target columns of a domain value map. an exception is thrown if the value is not found.14/05/2010 XPath Extension Functions QualifierSourceValue : The value of the qualifier. xrefReferenceColumnName: The name of the reference column. SourceColumnName .oracle.The name of the target columns.com/XSL/Transform/java/oracle.referenceValue. xrefColumnName : The name of the column to be looked up for the value.com/docs/…/bp_appx_functs.tip.LookupValue namespace-prefix:dvm B.htm 43/69 . else an empty value is returned.dvm.LookupValue namespace-prefix: dvm B. The key value Property IDs: namespace-uri: …oracle. the key XPath (keyXPath). Example: oraext:lookup-xml('file:/d:/country_data.XRefXPathFunctions namespace-prefix: xref B.oracle.tip.XRefXPathFunctions namespace-prefix: xref B.4.xml'.htm 44/69 . xrefReferenceColumnName: The name of the reference column. '/Countries/Country'.tip.columnName. 'FullName'.8 lookup-xml T his function returns the string value of an element defined by lookupXPath in an XML file (docURL) given its parent XPath (parentXPath).needAnException) Arguments: xrefLocation : The cross-reference URI.com/docs/…/bp_appx_functs. Signature: oraext:lookup-xml(docURL. keyXPath. and the value of the key (key).T he XML file parentXPath .referenceValue.The parent XPath keyXPath .referenceColumnName. 'Abbreviation'.4.xpath. Property IDs: namespaceuri:http://www.com/XSL/Transform/java/oracle. needAnException: If this value is set to true. Else.xpath. parentXPath. 'UK') returns the value of the element FullName child of /Countries/Country where Abbreviation = 'UK' is in the file D:\country_data.xml.7 lookupXRef1M T his function is used to look up a cross-reference column for multiple values corresponding to a value in a reference column.14/05/2010 XPath Extension Functions namespaceuri:http://www. then an exception is thrown when the referenced value is not found.com/XSL/Transform/java/oracle. an empty node-set is returned. xrefReferenceValue: The value corresponding to reference column name.xref.oracle.The key XPath lookupXPath . key) Arguments: docURL .xref. xrefColumnName : The name of the column to be looked up for the value. lookupXPath. Signature: xref:lookupXRef1M(tableName.The lookup XPath key . xpath.pc.value.referenceColumnName.services. xrefColumnName : The name of the column to be looked up for the value. xrefColumnName : The name of the column from which you want to delete a value.com/XSL/Transform/java/oracle.tip. …oracle.oracle.xref. This function returns true if deletion is successful else returns false.value) Arguments: xrefTableName: T he cross-reference table name.4.mode) Arguments: xrefLocation : The cross-reference URI.XRefXPathFunctions namespace-prefix: xref B.11 populateXRefRow1M T he function populates the column multiple values in the cross-reference table (XREF) where the reference column has the reference value.htm 45/69 .4. Signature: xref:markForDelete(tableName.com/XSL/Transform/java/oracle.xpath.9 markForDelete T he function is used to delete a value in a cross-reference table.XRefXPathFunctions namespace-prefix: xref B. Property IDs: namespaceuri:http://www.tip.oracle. xrefvalue : The value corresponding to reference column name. xrefmode: T he name of the XREF population mode. xrefValueToDelete : The value to be deleted.referenceValue.10 populateXRefRow T he function populates the column name in the cross-reference table (XREF) where the reference column has the reference value.com/docs/…/bp_appx_functs.oracle.columnName. Property IDs: namespaceuri:http://www.functions.14/05/2010 XPath Extension Functions http://www.columnName. xrefReferenceValue: The value corresponding to reference column name. Signature: xref:populateXRefRow(tableName.tip.4. xrefReferenceColumnName: The name of the reference column.com/XSL/Transform/java/oracle. The value in the column is marked as deleted.xref.ExtFunc namespace-prefix: oraext B. 5.1 clearTaskAssignees T his function clears the current task assignees. xrefColumnName : The name of the column to be looked up for the value.mode) Arguments: xrefLocation : The cross-reference URI.xref. xsltURI .14/05/2010 XPath Extension Functions Signature: xref:populateXRefRow1M(tableName. Property IDs: …oracle.com/docs/…/bp_appx_functs.2 createWordMLDocument T his function creates a Microsoft Word ML document as a base 64-encoded string.value.The node is an XML Node that is an input to the transformation.xpath.com/bpel/workflow/xpath namespace-prefix: hwf B.The task ID of the task. Property IDs: namespaceuri:http://www.XRefXPathFunctions namespace-prefix: xref B.The XSLT used to transform the node (the first argument) to Microsoft Word ML.columnName.tip.referenceValue. Property IDs: namespace-uri: http://xmlns.5. xrefvalue : The value corresponding to reference column name. B. xrefReferenceColumnName: The name of the reference column.com/XSL/Transform/java/oracle.5 Workflow Service Functions T his section describes the workflow service functions. xrefmode: T he name of the XREF population mode.oracle. Signature: hwf:createWordMLDocument(node.referenceColumnName. Signature: hwf:clearTaskAssignees(taskID) Arguments: task . xsltURI) Arguments: node .htm 46/69 . xrefReferenceValue: The value corresponding to reference column name.oracle. com/bpel/workflow/xpath namespace-prefix: hwf B.oracle. appLink .The task ID of the task for which the notification is meant.The locale of the recipient.The HT ML link to the Oracle BPM Worklist task details page. taskAssignees .com/bpel/workflow/xpath namespace-prefix: hwf B. taskNumber .T he recipient of the notification. Signature: hwf:getNumberOfTaskApprovals(taskId) Arguments: taskId .htm 47/69 .4 getNumberOfTaskApprovals T his function computes the number of times the task was approved. Property IDs: namespace-uri: http://xmlns.5. Only use this function in the notification content XPath expression.The task assignees. It can be one of the following values: recipient .com/docs/…/bp_appx_functs.T he ID of the task Property IDs: namespace-uri: http://xmlns.5 getPreviousTaskApprover T his function retrieves the previous task approver.5. Signature: …oracle. locale .The name of the notification property. taskId .com/bpel/workflow/xpath namespace-prefix: hwf B. Signature: hwf:getNotificationProperty(propertyName) Arguments: propertyName .3 getNotificationProperty T his function retrieves a notification property. it returns null. recipientDisplay . The function evaluates to corresponding values for each notification. taskAssigneesDisplay .T he display names of the task assignees.oracle.The task number of the task for which the notification is meant.oracle.The display name of the recipient. If used elsewhere.14/05/2010 XPath Extension Functions namespace-uri: http://xmlns.5. com/bpel/workflow/xpath namespace-prefix: hwf B.T he task ID of the task. attachmentName) Arguments: taskId .com/bpel/workflow/xpath namespace-prefix: hwf B.com/docs/…/bp_appx_functs.oracle. The index begins from 1 . Signature: hwf:getTaskAttachmentByName(taskId. attachmentName) …oracle.14/05/2010 hwf:getPreviousTaskApprover(taskId) XPath Extension Functions Arguments: taskId .5. Property IDs: namespace-uri: http://xmlns.7 getTaskAttachmentByName T his function retrieves the task attachment by the attachment name.T he task ID of the task. attachmentIndex) Arguments: taskId .T he ID of the task Property IDs: namespace-uri: http://xmlns. If specified statically. attachmentIndex .8 getTaskAttachmentContents T his function retrieves the task attachment contents by the attachment name.5.6 getTaskAttachmentByIndex T his function retrieves the task attachment at the specified index.htm 48/69 .The index of the attachment. it can be specified as '1'.T he name of the attachment. attachmentName .oracle.5. The attachmentIndex argument can be a node whose value evaluates to the index number as a string (all node values are strings). Property IDs: namespace-uri: http://xmlns. Signature: hwf:getTaskAttachmentContents(taskId.oracle. Signature: hwf:getTaskAttachmentByIndex(taskId.com/bpel/workflow/xpath namespace-prefix: hwf B. 5.oracle.oracle. Property IDs: namespace-uri:http://xmlns.14/05/2010 XPath Extension Functions Arguments: taskId .T he task ID of the task. Property IDs: namespace-uri: http://xmlns.5. Property IDs: namespace-uri: http://xmlns.com/bpel/workflow/xpath namespace-prefix: hwf B.T he task ID of the task.9 getTaskAttachmentsCount T his function retrieves the number of task attachments. This returns a resourceString XML element in the namespace http://xmlns. The group is selected from either the subordinate groups of the specified group (if a single group name is supplied).(Optional) The locale.oracle. locale?) Arguments: taskId .com/docs/…/bp_appx_functs.The key to the resource.11 wfDynamicGroupAssign T his function gets the name of an identity service group. selected according to the specified assignment pattern.com/bpel/workflow/xpath namespace-prefix: hwf B. or from the list of groups (if a list of user names is supplied). Signature: hwf:getTaskResourceBundleString(taskId.10 getTaskResourceBundleString T his function returns the internationalized resource value from the resource bundle associated with a task definition. Signature: hwf:getTaskAttachmentsCount(taskId) Arguments: taskId .com/bpel/workflow/xpath namespace-prefix: hwf B. If the identity service is configured with multiple realms. locale . attachmentName .T he task ID of the task.T he name of the attachment.htm 49/69 . This value defaults to system locale.5.oracle. which contains the string from the resource bundle. key . the realm name for the group and groups must also be …oracle.com/bpel/services/taskService . key. depending on pattern).Any additional parameters required by the assignment pattern implementation (may be optional.. Signature 1: hwf:wfDynamicUserAssign('patternName'. T hese additional parameters are optional.The name of the assignment pattern (for example. selected according to the specified assignment pattern... Signature 1: hwf:wfDynamicGroupAssign('patternName'.'patternParamN'?) Argument 1: patternName . Additional assignment pattern specific parameters can be supplied.T he name of the identity service realm to which the groups belong.Any additional parameters required by the assignment pattern implementation (may be optional... T hese additional parameters are optional. Property IDs: namespace-uri: http://xmlns.'patternParamN'?) Arguments 1: patternName ......5. depending on the details of the specific assignment pattern used.patternParamN .'groupName'. ROUND_ROBIN ). realmName .'patternParam2'?.htm 50/69 .12 wfDynamicUserAssign T his function returns the name of an identity service user. or from the list of users (if a list of user names is supplied).'groupList'. …oracle. If the identity service is configured with multiple realms. T here are two signatures for this function.com/bpel/workflow/xpath namespace-prefix: hwf B.'realmName'?.com/docs/…/bp_appx_functs. Additional assignment pattern specific parameters can be supplied.'realmName'?. ROUND_ROBIN ). patternParam1. Signature 2: hwf:wfDynamicGroupAssign('patternName'.'patternParam2'?.'realmName'?. ROUND_ROBIN ).. the realm name for the group and users must also be supplied.oracle.The name of the assignment pattern (for example... realmName ..'groupName'. T here are two signatures of this function.patternParamN . The user is selected from either the subordinate users of the specified group (if a single group name is supplied).'patternParam2'?.... depending on the details of the specific assignment pattern used. groupName .T he list of groups from which to select a group. groupList .T he name of the identity service realm to which the group belongs..'patternParamN'?) Argument 2: patternName . depending on the pattern).'patternParam1'? .14/05/2010 XPath Extension Functions supplied. patternParam1.T he name of the group from which to select a subordinate group.The name of the assignment pattern (for example.'patternParam1'? .'patternParam1'? .... htm 51/69 . depending on the pattern).oracle. patternParam1 ..patternParam1? . ROUND_ROBIN ). patternParam1.2 getGroupProperty T his function returns the property value for the given group.Any additional parameters required by the assignment pattern implementation (may be optional.com/docs/…/bp_appx_functs.oracle...5.. attributeName.13. Signature: ids:getDefaultRealmName() Arguments: T here are no arguments for this function.com/bpel/workflow/xpath namespace-prefix: hwf B. realmName . Signature: ids:getGroupProperty(groupName. patternParamN .patternParam2?.The list of users from which to select a user..T he name of the identity service realm to which the group belongs. Property IDs: namespace-uri: http://xmlns.5.T he name of the group from which to select a subordinate user. Signature 2: hwf:wfDynamicUserAssign(patternName.Any additional parameters required by the assignment pattern implementation (may be optional. realmName) Arguments: groupName . If the group or attribute does not exist. Property IDs: namespace-uri: http://xmlns.T he name of the identity service realm to which the users belong. userList .13 Identity Service Functions T his section describes the identity service functions.5.com/bpel/services/IdentityService/xpath namespace-prefix: ids B.patternParamN . realmName .1 getDefaultRealmName T his function returns the default realm name.patternParamN?) Arguments 2: patternName . depending on the pattern).String or element containing the group whose attribute must be retrieved.. B.The name of the assignment pattern (for example.14/05/2010 XPath Extension Functions groupName .realmName?..13. …oracle. it returns null.userList.. Property IDs: namespace-uri:http://xmlns.T he realm name.T he realm name. displayName 2. This is optional. Property IDs: namespace-uri:http://xmlns. realmName . upToLevel.com/bpel/services/IdentityService/xpath namespace-prefix: ids B. for example '1'. If the value is -1.13.T he realm name.String or element containing the name of the group attribute. This is optional and if not specified. Signature: ids:getReportees(userName. This is optional. If the user does not exist or there is no manager for this user. it returns only direct reportees.5. realmName) Arguments: userName . it returns all levels of reportees. Signature: ids:getManager(userName. realmName .oracle. It can be either an element with value xsd:number or a string. If the value is 1 . upToLevel . realmName . The function returns a list of nodes.3 getManager T his function gets the manager of a given user. T he name is one of the following values: 1. Each node in the list is called user. it returns null.oracle. realmName) Arguments: userName . If not specified.Defines the levels of indirect reportees to be included into the result.com/docs/…/bp_appx_functs. email If the identity service uses the LDAP providerType or JAZN LDAP-based providers.5. the default realm is assumed. If the user does not exist.The user name.com/bpel/services/IdentityService/xpath …oracle.4 getReportees T his function gets the reportees of the user.14/05/2010 XPath Extension Functions attributeName .13.The user name. it returns null.oracle.htm 52/69 . configure the LDAP server to enable searching by those attributes.com/bpel/services/IdentityService/xpath namespace-prefix: ids B. the default realm is assumed. the default realm is assumed. If not specified. Property IDs: namespace-uri: http://xmlns. 5 getSupportedRealmNames T his function returns the supported realm names. facsimile 10. The attribute name is one of the following values: 1.htm 53/69 .5.The name of the user attribute. mail 6.String or element containing the user whose attribute must be retrieved.6 getUserProperty T his function returns the property of the user. If the user or attribute does not exist. sn 4.13. displayName 5. telephoneNumber 7. realmName) Arguments: userName . Signature: ids:getUserProperty(userName. realmName . attributeName . middleName 3. title 13. If not specified. attributeName.oracle.com/bpel/services/IdentityService/xpath namespace-prefix: ids B. manager If the identity service uses the LDAP providerType or JAZN LDAP-based providers.T he realm name. homephone 8.13.5.14/05/2010 namespace-prefix: ids XPath Extension Functions B. …oracle. pager 11. givenName 2. mobile 9. the default realm name is assumed. Signature: ids:getSupportedRealms() Property IDs: namespace-uri: http://xmlns. This is optional.com/docs/…/bp_appx_functs. configure the LDAP server to enable searching by those attributes. preferredlanguage 12. it returns null. the default realm name is assumed.9 isUserInRole T his function verifies if a user has a given role. the function returns direct user grantees. If not specified.T he realm name. realmName) Arguments: groupName . If the user or role does not exist. The function returns a list of nodes.A boolean flag. Each node in the list is called user.13. Signature: ids:getUserRoles(userName.8 getUsersInGroup T his function gets the users in a group.String or element containing the user whose roles are to be retrieved. depending on the roleType. realmName .5. roleType.com/bpel/services/IdentityService namespace-prefix: ids B. either application roles or groups. Property IDs: namespace-uri:http://xmlns.13. it returns null. This is optional. or AnyRole.oracle. roleType .A string or element indicating if direct or indirect roles must be fetched. Signature: ids:getUsersInGroup(groupName.T he group name.com/bpel/services/IdentityService/xpath namespace-prefix: ids B. direct.7 getUserRoles T his function gets the user roles. This is optional.The role type that takes one of three values: ApplicationRole. If not specified. This is either xsd:boolean or string true/false. it returns null.13. If the group does not exist. otherwise. EnterpriseRole .5. …oracle.com/docs/…/bp_appx_functs.com/bpel/services/IdentityService/xpath namespace-prefix: ids B.htm 54/69 . direct) Arguments: userName . only direct roles are fetched.14/05/2010 XPath Extension Functions Property IDs: namespace-uri: http://xmlns. direct . all user grantees are returned. direct . If true .oracle. Property IDs: namespace-uri: http://xmlns. It can be either an element with value xsd:boolean or string 'true'/'false'. This function returns a list of objects.oracle.5. 13. If not specified. roleName.T he realm name.oracle. realmName) Arguments: groupName .com/bpel/services/IdentityService/xpath namespace-prefix: ids B.5.The role name.11 lookupUser T his function gets the user object. the default realm name is assumed. realmName .10 lookupGroup T his function gets the group. This is optional.6 Using the XPath Building Assistant …oracle. it returns null.htm 55/69 . the default realm name is assumed.oracle. realmName . This is optional.The user name. If not specified. Signature: ids:lookupUser(userName.T he group name. Property IDs: namespace-uri:http://xmlns. roleName .com/bpel/services/IdentityService/xpath namespace-prefix: ids B.13.com/docs/…/bp_appx_functs. If the user does not exist. If not specified. If the group does not exist. realmName) Arguments: userName .14/05/2010 XPath Extension Functions Signature: ids:isUserInRole(userID. realmName) Arguments: userID . Signature: ids:lookupGroup(groupName.T he realm name.A string or element containing the user whose participation in the role must be verified.com/bpel/services/IdentityService/xpath namespace-prefix: ids B. Property IDs: namespace-uri:http://xmlns. This is optional.5.T he realm name. the default realm name is assumed.oracle. it returns null. Property IDs: namespace-uri: http://xmlns. realmName . including: Expression field of the XPath Expression Builder Expression field of an operation created under the Copy Operation tab of assign activities Expression field of the while.2 Starting the XPath Building Assistant Start the XPath Building Assistant by clicking inside the Expression field and pressing Ctrl and then the space bar. wait.1 XPath Building Assistant Description Several dialogs enable you to specify XPath expressions at several places.gif B.htm 56/69 .3 Using the XPath Building Assistant in Oracle JDeveloper: Step-By-Step Example T his section provides an example of using the XPath Building Assistant to build an expression in the From section of the Expression field of the Create Copy Operation dialog. 1. T he XPath Building Assistant provides the following set of features that simplify this process: Automatic completion of the following: Elements and attributes Functions BPEL variables and parts Function parameter tool tips Syntactic and semantic validation of XPaths B.6.14/05/2010 XPath Extension Functions Y ou can use the XPath Building Assistant to create XPath expressions. and pick (onAlarm branch) activities Edit XPath Expression and Edit Function dialogs of the XSLT Mapper Manually specifying long and complex expressions is supported.6. The XPath Building Assistant is available within all fields of the Oracle JDeveloper and XSLT Mapper function dialogs that require XPath expressions. switch. Description of the illustration xbuild2.com/docs/…/bp_appx_functs. T his example models an XPath Expression that appends a string value to OrderComments within a purchase order. …oracle. The purchase order element is part of one of the available BPEL variables. Place the cursor inside the Expression field.6. but can be a cumbersome and errorprone process. B. htm 57/69 .gif 3. the second entry for bpws): Description of the illustration xba3. Select and double-click the next portion (for this example. 4.gif This value is added to the Expression field. Make a selection from the list (for this example.14/05/2010 XPath Extension Functions Description of the illustration xba1. concat(String) as String) in either of the following ways: Scroll down the list and double-click concat(String) as String. The list automatically displays again and prompts you to enter the next portion of the XPath expression. This value is added to the Expression field.com/docs/…/bp_appx_functs. Press Ctrl and then the space bar to display a list of values for building an expression.gif 2. Description of the illustration xba2. The list automatically displays again with different options and prompts you to enter the next portion of the XPath expression. …oracle. Enter the letter c to display only items starting with that letter and double-click concat(String) as String. 14/05/2010 XPath Extension Functions 5. Select and double-click inputVariable. Description of the illustration xba4.gif 6. Continue this process to build the remaining parts of the XPath expression (for this example, double-click payload > ns1:/PurchaseOrder > ns1:/OrderInfo > ns1:OrderComments as they appear). Description of the illustration xba5.gif 7. Manually add text as appropriate (for this example, ,',Selected: Select Manufacturing'). If needed, you can also manually enter logical operators (such as >, <, and so on). Description of the illustration xba6.gif Note: Instead of using double-clicks on the XPath Building Assistant popups, you can also use the Enter key to make the selection. If your expression is complete, but you are still being prompted to enter information, press Esc. This closes the list. B.6.4 Using the XPath Building Assistant in the XSLT Mapper T his section provides an example of using the XPath Building Assistant to build an expression in the Edit XPath Expression dialog of the XSLT Mapper. 1. Go to the transformation dialog. 2. Select Advanced Functions from the Component Palette list. 3. Scroll down the list to the xpath-expression. 4. Drag and drop the xpath-expression into the transformation dialog. …oracle.com/docs/…/bp_appx_functs.htm 58/69 14/05/2010 XPath Extension Functions Description of the illustration xbuild20.gif 5. Double-click the function to display the Edit XPath Expression dialog. 6. Click the cursor inside the XPath Expression field. 7. Press Ctrl and then the space bar to display a list of values for building an expression. Description of the illustration xbuild21.gif 8. Make a selection from the list (for this example, concat(String) as String) in either of the following ways: Scroll down the list and double-click concat(String) as String. Enter the letter c to display only items starting with that letter and double-click concat(String) as String. …oracle.com/docs/…/bp_appx_functs.htm 59/69 14/05/2010 XPath Extension Functions Description of the illustration xbuild21b.gif This selection is added to the XPath Expression field. The list automatically displays again with different options and prompts you to enter the next portion of the XPath expression. 9. Continue this process to build the remaining parts of the XPath expression (for this example, double-click po:PurchaseOrder > po:ShipTo > po:Name > po:First as they appear). 10. Continue this process to build the remaining parts of the expression. 11. Click OK to close the Edit XPath Expression dialog when complete. B.6.5 Function Parameter Tool Tips Function parameter tool tips display the expected arguments of a chosen XPath function. For example, if you manually enter the function concat, and then enter (, the parameter tool tip appears and displays the expected arguments of the concat function. The current argument name of the function is highlighted in bold. Description of the illustration xbuild23.gif Once you finish specifying one argument, and enter a comma to move to the next argument, the tool tip updates itself to highlight the second argument name in bold, and so on. While editing existing XPaths that contain functions, you can re-invoke parameter tool tips by positioning the cursor within the function and then pressing a combination of the Ctrl, Shift, and space bar keys. B.6.6 Syntactic and Semantic Validation Within Oracle JDeveloper, an XPath expression is considered syntactically valid if it conforms to the XPath 1.0 specification. The XPath Building Assistant warns you about syntactically incorrect XPaths (for example, a missing parenthesis or apostrophe) by underlining the erroneous area in red. Drag the mouse pointer over this area. The error message displays as a tool tip. The red underlining error disappears after you make corrections. Description of the illustration xbuild12.gif …oracle.com/docs/…/bp_appx_functs.htm 60/69 Enter <% when you are ready to invoke the XPath Building Assistant. 4. you can misspell the name of an element. Description of the illustration xbuild16. your telephone number'). Drag the mouse pointer over this area. Press Ctrl and then the space bar to invoke the XPath Building Assistant. The XPath Building Assistant warns you about semantic errors by underlining the erroneous area in blue. or part. Description of the illustration xbuild26. T he blue underlining error disappears after you make corrections. Description of the illustration xbuild25.7 Creating Expressions with Free Form Text and XPath Expressions Y ou can mix free form text with XPath expressions in some dialogs. …oracle. function. The error message displays as a tool tip.gif 2.gif B. which indicates that you are being prompted to add information. For example.htm 61/69 . This can cause unexpected errors at runtime. Place your cursor over the field to display a popup message that describes this functionality. Description of the illustration xbuild24. variable.gif 3.gif A red underline appears. Enter free form text (in this example. 1.com/docs/…/bp_appx_functs. 'Hello.6.14/05/2010 XPath Extension Functions Syntactically valid XPaths may be semantically invalid. 14/05/2010 XPath Extension Functions Description of the illustration xbuild27. Note that you must implement XSLT Mapper functions differently than functions for Oracle BPEL Process Manager. B. A repository hosts both system function configuration files and user-defined function configuration files.7. and human workflow. Oracle Mediator. human workflow.gif 5.7 Creating User-Defined XPath Extension Functions Y ou can create user-defined (custom) XPath extension functions for use in Oracle SOA Suite. XSLT Mapper. and those commonly used by all). If you create a function for one component that cannot be used by others (for example. Functions shared by all components can be created in a configuration file named ext-soa-xpath-functionsconfig.htm 62/69 . Continue this process to build the remaining parts of the expression.com/docs/…/bp_appx_functs. follow these conventions for creating functions: If possible. see Section B. Scroll down the list and double-click the value you want. For more information about description of these implementation differences. System functions are separated from user-defined functions. "How to Implement User-Defined XPath Extension Functions". a …oracle. Oracle Mediator. As a best practice. 6.xml.1. A repository hosts user-defined function implementation JAR files and automatically makes them available for the Java Virtual Machine (JVM) (class loaders). XPath functions are categorized based on usage (Oracle BPEL Process Manager. write functions that can be shared across all components. T hese functions can be created for the following components: Oracle BPEL Process Manager Oracle Mediator XSLT Mapper Human workflow Shared by all of these components XPath extension functions in Oracle SOA Suite adhere to the following standards: A single schema defines the configuration syntax for both system functions and user-defined functions. xml.oracle.oracle.w3.com/docs/…/bp_appx_functs.htm 63/69 .org/2001/XMLSchema" xmlns:tns="http://xmlns. Example B-1 shows the function schema used by system and user-defined functions.0" encoding="UTF-8"?> <schema xmlns="http://www.14/05/2010 XPath Extension Functions function for Oracle BPEL Process Manager that cannot be used by Oracle Mediator or human workflow). the Oracle BPEL Process Manager function must be created in a configuration file named ext-bpel-xpath-functions-config. then create that function in the configuration file specific to that component.com/soa/config/xpath" elementFormDefault="qualified"> <element name="soa-xpath-functions" type="tns:XpathFunctionsConfig"/> <element name="function" type="tns:XpathFunction"/> <complexType name="XpathFunctionsConfig"> <sequence> <element ref="tns:function" minOccurs="1" maxOccurs="unbounded"/> </sequence> <attribute name="resourceBundle" type="string"/> <attribute name="version" type="string"/> </complexType> <complexType name="XpathFunction"> <sequence> <element name="className" type="string"/> <element name="return"> <complexType> <attribute name="type" type="tns:XpathType" use="required"/> </complexType> </element> <element name="params" type="tns:Params" minOccurs="0" maxOccurs="1"/> <element name="desc"> <complexType> <simpleContent> <extension base="string"> <attribute name="resourceKey" type="string"/> </extension> </simpleContent> </complexType> </element> <element name="detail" minOccurs="0"> <complexType> <simpleContent> <extension base="string"> <attribute name="resourceKey" type="string"/> </extension> </simpleContent> </complexType> </element> <element name="icon" minOccurs="0"> <complexType> <simpleContent> <extension base="string"> <attribute name="resourceKey" type="string"/> </extension> </simpleContent> </complexType> </element> …oracle.com/soa/config/xpath" targetNamespace="http://xmlns. Example B-1 Function Schema <?xml version="1. For this example. B.1.htm 64/69 .1 How to Implement User-Defined XPath Extension Functions T his section describes how to implement user-defined XPath extension functions for Oracle SOA Suite components.1 How to Implement Functions for the XSLT Mapper Implementation of user-defined XPath extension functions for the XSLT Mapper is different than for other components: Each XSLT Mapper function requires a corresponding public static method from a public static …oracle.14/05/2010 XPath Extension Functions <element name="helpURL" minOccurs="0"> <complexType> <simpleContent> <extension base="string"> <attribute name="resourceKey" type="string"/> </extension> </simpleContent> </complexType> </element> <element name="group" minOccurs="0"> <complexType> <simpleContent> <extension base="string"> <attribute name="resourceKey" type="string"/> </extension> </simpleContent> </complexType> </element> <element name="wizardClass" type="string" minOccurs="0"/> </sequence> <attribute name="name" type="string" use="required"/> <attribute name="deprecated" type="boolean" use="optional"/> </complexType> <complexType name="Params"> <sequence> <element name="param" minOccurs="1" maxOccurs="unbounded"> <complexType> <attribute name="name" type="string" use="required"/> <attribute name="type" type="tns:XpathType" use="required"/> <attribute name="minOccurs" type="string" default="1"/> <attribute name="maxOccurs" type="string" default="1"/> <attribute name="wizardEnabled" type="boolean" default="false"/> </complexType> </element> </sequence> </complexType> <simpleType name="XpathType"> <restriction base="string"> <enumeration value="string"/> <enumeration value="boolean"/> <enumeration value="number"/> <enumeration value="node-set"/> <enumeration value="tree"/> </restriction> </simpleType> </schema> B.7.com/docs/…/bp_appx_functs.7. fabric.2 How to Implement Functions for All Other Components For Oracle BPEL Process Manager.xpath.7.fabric.xpath.com/docs/…/bp_appx_functs.common.xpath.fabric.xml. B.xpath. Oracle Mediator. and human workflow functions.1. To implement functions for all other components: 1.getNodeValue() } } B. return node. XSLT Mapper function namespaces must take the form http://www.fabric.IXPathFunction interface for your XPath function. you must implement either the oracle. * * @param context The context at the point in the * expression when the function is called. The IXPathFunction interface has one method named call(context.common.jar file) or javax.dom.4.xpath.cube.Node node = (org. args).functions.The context at the point in the expression when the function is called args .7.w3c. where mypackage.xml. */ public Object call(IXPathContext context.2 How to Configure User-Defined XPath Extension Functions T his section describes how to configure user-defined XPath extension functions.14/05/2010 XPath Extension Functions class.dom.IXPathFunction.collaxa. public class GetNodeValue implements IXPathFunction { Object call(IXPathContext context.IXPathFunction . "Importing User-Defined Functions". .xml. Implement the oracle.common. …oracle.xml.dom.xml.oracle. For additional details about creating a user-defined XPath extension function for the XSLT Mapper.Node) args.MyFunctionClass is the fully qualified class name of the public static class containing the public static methods for the functions.3.XPathFunction.w3c. public interface IXPathFunction { /** Call this function.com/XSL/Transform/java/mypackage. List args) throws XPathFunctionException { org. see Section 35. The signature of this method is as follows: package oracle.common.xpath.common.xml.htm 65/69 .T he list of arguments provided during the call of the function For the following example.xpath.4. } where: context . a function named getNodeValue(arg1) is implemented that gets a value of w3c node: package com.get(0).IXPathFunction interface (defined in the fabric-runtime.MyFunctionClass.fabric.xml. . The function name and method name must match. import oracle. * @param args List of arguments provided during * the call of the function. List args) throws XPathFunctionException. import oracle. Create an XPath extension configuration file in which to define the function. Example B-2 shows a sample configuration file that follows the function schema shown in Example B-1.myResourceBundle" xmlns="http://xmlns.0" encoding="UTF-8"?> <soa-xpath-functions resourceBundle="myPackage. and tree.com"> <function name="mf:myFunction1"> <className>myPackage. The root element has an optional resourceBundle attribute.. two functions are created: mf:myFunction1 and mf:myFunction2.com/soa/config/xpath" xmlns:mf="http://www.myWizardClass1</wizardClass> </function> <function name="mf:myFunction2"> <className>myPackage. …oracle. Example B-2 Sample XML Extension Configuration File <?xml version="1.htm 66/69 .myWizardClass2</wizardClass> </function> </soa-xpath-functions> Table B-1 describes the elements of the configuration file. A function can have no parameters.myFunctionClass2</className> <return type="string"/> <params> <param name="p1" type="node-set" wizardEnabled="true"/> <param name="p2" type="string"/> <param name="p3" type="number" minOccurs="0"/> <param name="p4" type="boolean" minOccurs="0" maxOccurs="unbounded"/> </params> <desc resourceKey="func2-desc-key">this is my second function</desc> <detail resourceKey="func2-long-desc-key">my second function does . A parameter has the following attributes: name: The name of the parameter. In this example. params The parameters of the function.14/05/2010 XPath Extension Functions To configure user-defined xpath extension functions: 1.oracle. The resourceBundle value is the fully qualified class name of the resource bundle class providing NLS support for all function configurations.</detail> <icon>myPackage/resource/image/myFunction2.my-functions. Table B-1 Function Schema Elements Element className Description The fully qualified class name of the function implementation class.png</icon> <group resourceKey="func-group-key">My Function Group</group> <wizardClass>myPackage.. This can be one of the following types supported by XPath and XSLT: string. node-set. Each function configuration file uses soa-xpath-functions as its root element.png</icon> <group resourceKey="func-group-key">My Function Group</group> <wizardClass>myPackage.myFunctionClass1</className> <return type="node-set"/> <params> <param name="p1" type="node-set" wizardEnabled="true"/> <param name="p2" type="string"/> <param name="p3" type="number" minOccurs="0"/> <param name="p4" type="boolean" minOccurs="0" maxOccurs="3"/> </params> <desc resourceKey="func1-desc-key">this is my first function</desc> <detail resourceKey="func2-long-desc-key">my first function does ..com/docs/…/bp_appx_functs. boolean. number. return The return type of the function. </detail> <icon>myPackage/resource/image/myFunction1.. the parameter can repeat anytime. boolean. icon An optional icon URL of the function. the icon URL is retrieved from the resource bundle specified earlier on the root element. The default value is 1 if this attribute is absent. group An optional group name of the function. This can be one of the following types supported by XPath and XSLT: string. detail An optional longer (detailed) description of the function. If there is no wizard-enabled parameter. the description is retrieved from the resource bundle specified earlier on the root element. when pressed. This supports a user interface where the parameter value must be entered. This is to support a user interface in which the function help link must be displayed. the function falls into a built-in advanced functions group when being grouped in a user interface. minOccurs : The minimum occurrences of the parameter. node-set. This is to support a user interface where functions must be grouped. The default value is 1 if this attribute is absent. meaning there is no wizard support for the parameter by default. If the resourceKey is present. wizardClass The fully qualified class name of the wizard class for all parameters that are wizard-enabled. the group name is retrieved from the resource bundle specified earlier on the root element. a wizard launch button is rendered next to the parameter value field. Note: This element is not supported for user-defined functions. Table B-2 describes the naming conventions to use for user-defined configuration files. If the resourceKey is present. the help URL is retrieved from the resource bundle specified earlier on the root element. this element must be absent. Name your user-defined XPath extension configuration file based on the component type with which to use the function. The wizard launch button. the description is retrieved from the resource bundle specified earlier on the root element. the parameter is optional. The default value is false if this attribute is absent. which can take unlimited parameters. The current restriction is that no parameters except the last parameter of the function can have maxOccurs greater than 1 or unbounded. If no group name is specified. If set to 1. launches a popup wizard to help the user enter the parameter value.com/docs/…/bp_appx_functs. 2.0 function concat(). number. This is to support a user interface in which parameter values must be entered. This can support functions such as XPath 1. maxOccurs : The maximum occurrences of the parameter. This is to support a user interface in which the function must be displayed. This wizard class is invoked by wizard launch buttons to help you enter parameter values. The wizard class must be specified later. and tree. If set to 0. the parameter is required. wizardEnabled: Indicates whether to enable a wizard to enter the parameter value.htm 67/69 .14/05/2010 XPath Extension Functions type: The type of the parameter. If set to unbounded. If the resourceKey is present. helpURL An optional help HTML URL of the function. The current restriction is that this attribute must only take a value of either 0 or 1 and that optional parameters must be defined after the required parameters. desc An optional description of the function. If the resourceKey is present. If set to true. Table B-2 User-Defined Configuration Files …oracle. Only system functions currently support this feature. If the resourceKey is present. . Restart Oracle JDeveloper for the changes to take effect.xml XSLT Mapper ext-mapper-xpath-functions-config. Place the configuration file inside a JAR file along with the compiled classes. Copy the user-defined function JAR files to BEA_Home/user_projects/domains/domain_name/lib or a subdirectory of lib . the configuration file must be located in the META-INF directory.14/05/2010 To Use with This Component..7. Click the Add button and select your JAR file. 2. To deploy user-defined functions to runtime: 1. ext-bpel-xpath-functions-config. T he JAR file does not need to reside in a specific directory.3 How to Deploy User-Defined Functions to Runtime Y ou can deploy user-defined functions to the runtime environment. 5.xml Human workflow ext-wf-xpath-functions-config. T his prevents you from having to restart the Oracle WebLogic Server.xml Oracle Mediator ext-mediator-xpath-functions-config. Within the JAR file. Oracle BPEL Process Manager XPath Extension Functions Use This Configuration File Name. B.. The JAR file is automatically added to the JVM's class path to make it available for use. 4. where domain_name is the name of the Oracle WebLogic Server domain (for example. Home Book Contents Index Contact 68/69 .htm Copyright © 2005. In Oracle JDeveloper. Note: As an alternative.com/docs/…/bp_appx_functs. go to Tools > Preferences > SOA. soainfra). you can add the BEA_Home/user_projects/domains/domain_name/lib directory into the class loader.xml 3.. Note: The customXpathFunction jar must be added explicitly as it is not part of the SOA composite.xml All components ext-soa-xpath-functions-config. Previous Next …oracle. Restart the Oracle WebLogic Server. 6. Home Legal Notices XPath Extension Functions Book Contents Index Contact List Us …oracle.htm 69/69 .com/docs/…/bp_appx_functs. Oracle and/or its affiliates.14/05/2010 Previous Next 2009. All rights reserved.
Copyright © 2024 DOKUMEN.SITE Inc.