Oracle® Fusion Middleware Developer's Guide for Oracle Application Integration Architecture Foundation Pack 11g Release 1 (11.1.1.5.0) Part Number E17364-03 |
|
|
View PDF |
This appendix provides details about the XPath functions that are delivered with the Oracle Application Integration Architecture (AIA) Foundation Pack for use in your integration flows.
This appendix includes the following sections:
Note:
These functions can be called from BPEL and XSLT, as well as Mediator routing rule filters.namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.
xpath.AIAFunctions"
string aia:getSystemProperty (string propertyName, boolean needAnException)
propertyName
Name of the system property for which to retrieve the value.
needAnException
Used to specify whether to throw an exception if the property is not found, otherwise return empty string.
Returns the string value of the system property identified by propertyName. If the property is not found, either an exception will be thrown or an empty string is returned, depending on the value of the needAnException parameter.
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.
xpath.AIAFunctions"
string aia:getSystemModuleProperty (string moduleName, string propertyName,
boolean needAnException)
moduleName
Module for which to retrieve the property.
propertyName
Name of the property for which to retrieve the value.
needAnException
Used to specify whether to throw an exception if the property is not found, otherwise return empty string.
Returns the string value of the module property identified by moduleName and propertyName. If the module property is not found, then the system property of the same name will be returned. If the system property with the same name is not found, then either an exception will be thrown or an empty string is returned, depending on the value of the needAnException parameter.
XSLT example:
<xsl:variable name="errHdlrImpl" select="aia:getSystemModuleProperty ('ErrorHandler','COMMON.ERRORHANDLER.IMPL',true())"/>
BPEL example:
<assign name="AssignVar"> <copy> <from expression="aia:getSystemModuleProperty('ErrorHandler', 'COMMON.ERRORHANDLER.IMPL',true())"/> <to variable="ErrorHandler"/> </copy> </assign>
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.
xpath.AIAFunctions"
string aia:getServiceProperty (string serviceName, string propertyName,
boolean needAnException)
serviceName
Service for which to retrieve the property.
propertyName
Name of the property for which to retrieve the value.
needAnException
Used to specify whether to throw an exception if the property is not found, otherwise return empty string.
Returns the string value of the service property identified by serviceName and propertyName. If the service property is not found, then the system property of the same name will be returned. If the system property with the same name is not found, then either an exception will be thrown or an empty string is returned, depending on the value of the needAnException parameter.
XSLT example:
<xsl:variable name="defaultSystemID" select="aia:getServiceProperty ('{http://xmlns.oracle.com/ABCSImpl/Siebel/Core/UpdateCustomerParty SiebelReqABCSImpl/V2}UpdateCustomerPartySiebelReqABCSImplV2','Default. SystemID',true())"/>
BPEL example:
<assign name="AssignVar"> <copy> <from expression= "aia:getServiceProperty('{http://xmlns.oracle.com /ABCSImpl/Siebel/Core/UpdateCustomerPartySiebelReqABCSImpl/V2} UpdateCustomerPartySiebelReqABCSImplV2','Default.SystemID',true())"/> <to variable="DefaultSystemID"/> </copy> </assign>
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.
xpath.AIAFunctions"
node-set aia:getEBMHeaderSenderSystemNode (string senderSystemCode, string
senderSystemID)
senderSystemCode
System Code as defined in the Oracle AIA system registry.
senderSystemID
System Internal Id as defined in the Oracle AIA system registry.
For information about maintaining the Oracle AIA system registry, see Section 20.4.5.2, "Managing the Oracle AIA System Registry."
Returns a node set of system information, entered in the Oracle AIA system registry for the given System Code or Internal ID.
Given the set up on the Systems page shown in Figure A-1, both aia:getEBMHeaderSenderSystemNode('SEBL_01', '') and aia:getEBMHeaderSenderSystemNode('', 'siebel') would return the node set provided in Example A-1.
Example A-1 Node Set Returned for aia:getEBMHeaderSenderSystemNode()
<ID xmlns="">SEBL_01</ID> <Description xmlns="">Siebel Instance 01</Description> <IPAddress xmlns="">xxxxx.siebel.com</IPAddress> <ContactName xmlns="">Siebel contact</ContactName> <ContactPhone xmlns="">1234567891</ContactPhone> <ContactEmail xmlns="">Siebelcontact@Siebel.com</ContactEmail> <Url xmlns="">http://xxxxx.siebel.com:80/ecommunications_enu</Url> <Application xmlns=""> <ID>CRM</ID> <Version>8.0</Version> </Application>
An XSLT example for aia:getEBMHeaderSenderSystemNode() is provided in Example A-2.
Tip:
This example requires<xsl:stylesheet version="2.0" ...>
Example A-2 XSLT Example for aia:getEBMHeaderSenderSystemNode()
<xsl:variable name="senderNodeVariable"> </xsl:variable> <corecom:Sender> <corecom:ID> <xsl:value-of select="$RequestTargetSystemID"/> </corecom:ID> <corecom:Description> <xsl:value-of select="$senderNodeVariable/Description"/> </corecom:Description> <corecom:IPAddress> <xsl:value-of select="$senderNodeVariable/IPAddress"/> </corecom:IPAddress> <corecom:CallingServiceName> ... </corecom:CallingServiceName> <corecom:Application> <corecom:ID> <xsl:value-of select="$senderNodeVariable/Application/ID"/> </corecom:ID> <corecom:Version> <xsl:value-of select="$senderNodeVariable/Application/Version"/> </corecom:Version> </corecom:Application> <corecom:ContactName> <xsl:value-of select="$senderNodeVariable/ContactName"/> </corecom:ContactName> <corecom:ContactEmail> <xsl:value-of select="$senderNodeVariable/ContactEmail"/> </corecom:ContactEmail> <corecom:ContactPhoneNumber> <xsl:value-of select="$senderNodeVariable/ContactPhone"/> </corecom:ContactPhoneNumber> ... </corecom:Sender>
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.
core.xpath.AIAFunctions"
string aia:getSystemType (string systemCode)
systemCode
: System code as entered in the Oracle AIA system registry.
For information about maintaining the Oracle AIA system registry, see Section 20.4.5.2, "Managing the Oracle AIA System Registry."
Returns the System Type associated with a System Code as entered in the Oracle AIA system registry.
Given the set up on the Systems page shown in Figure A-2, the result of aia:getSystemType('SEBL_01') would be the string SIEBEL
.
XSLT example:
<xsl:variable name="systemType" select="aia:getSystemType('SEBL_01')"/>
BPEL example:
<assign name="AssignVar"> <copy> <from expression= "aia:getSystemType('SEBL_01')"/> <to variable="SystemType"/> </copy> </assign>
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.
xpath.AIAFunctions"
string aia:getErrorMessage (string errorCode, string localeString, string
delimiter)
errorCode
Error code.
localeString
Delimited locale string.
Delimiter
Delimiter used in the localeString.
This function will look up the error message resource bundle and return a localized string for the input errorCode. The localeString is a concatenated string of LanguageCode, CountryCode, and Variant delimited by the delimiter specified. If no locale is found with the input parameters, the system default locale is used.
For more information, see java.util.Locale documentation: http://download.oracle.com/javase/1.5.0/docs/api/java/util/class-use/Locale.html
.
XSLT example:
<xsl:variable name="errMsg" select="aia:getErrorMessage('AIA_ERR_AIAO2C2_ 1007','','')"/>
BPEL example:
<assign name="Assign_Fault"> <copy> <from expression="'AIA_ERR_AIAO2C2_1007'"/> <to variable="AIAFaultMsg" part="AIAFault"query="/corecom: Fault/corecom:FaultNotification/corecom:FaultMessage/corecom:Code"/> </copy> <copy> <from expression="aia:getErrorMessage('AIA_ERR_AIAO2C2_1007','','')"/> <to variable="AIAFaultMsg" part="AIAFault"query="/corecom: Fault/corecom:FaultNotification/corecom:FaultMessage/corecom:Text"/> </copy> </assign>
namespace aia="g aia:getCorrectiveAction (string correctiveActionCode,
string localeString, string delimiter)
correctiveActionCode
Corrective action code.
localeString
Delimited locale string.
Delimiter
Delimiter used in the localeString.
This function will look up the Corrective Action Code resource bundle and return a localized string for the input correctiveActionCode.
The localeString is a concatenated string of LanguageCode, CountryCode, and Variant delimited by the delimiter specified. If no locale is found with the input parameters, the system default locale is used.
For more information, see java.util.Locale documentation: http://download.oracle.com/javase/1.5.0/docs/api/java/util/class-use/Locale.html
.
XSLT example:
<xsl:variable name="corrAction" select="aia:getCorrectiveAction('SAMPLECODE' ,'','')"/>
BPEL example:
<assign name="Assign_Fault"> <copy> <from expression="aia:getCorrectiveAction('SAMPLECODE','','')"/> <to variable="AIAFaultMsg" part="AIAFault" query="/corecom:Fault/ corecom:FaultNotification/corecom:CorrectiveAction"/> </copy> </assign>
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.
core.xpath.AIAFunctions"
string aia:isTraceLoggingEnabled (string logLevel, string processName)
Boolean indicating whether or not the specified logLevel is enabled for the specified process.
This function will do two things:
Check whether logging is enabled or disabled for the input process name from the AIAConfigurationProperties.xml file.
Check if the trace logger log level is set to log the input log level.
This function will return a true only when both the above conditions return true, otherwise it will return false. If the logLevel parameter is null or if it is incorrectly specified, this function returns false. If processName is null or empty strings, this function returns null.
XSLT example:
<xsl:variable name="testVal" select="aia:isTraceLoggingEnabled('INFO', 'SamplesCreateCustomerSiebelReqABCSImpl')" />
BPEL example:
<assign name="Assign_Fault"> <copy> <from expression="aia:isTraceLoggingEnabled('INFO', 'SamplesCreateCustomerSiebelReqABCSImpl')"/> <to variable="isTraceLoggingEnabledVal"/> </copy> </assign>
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.
core.xpath.AIAFunctions"
string aia:logErrorMessage (node-set ebmHeader, string message)
This function logs an error message. If the ebmHeader parameter is null or not passed, the message is logged without any supplemental attributes. An error message is always logged with the level SEVERE.
ebmHeader
The Enterprise Business Message (EBM) header providing context for the error message.
Message
Message to log.
XSLT example:
<xsl:variable name="testVal" select="aia:logErrorMessage (oraext:parseEscapedXML('<test></test>'),'LogError:: Your Error message goes here................................')"/>
BPEL example:
<assign name="Assign_Fault"> <copy> <from expression="aia:logErrorMessage(oraext:parseEscapedXML ('<test></test>'),'LogError from XSL::Your Error Message goes here...........')"/> <to variable="testXpathVal"/> </copy> </assign>
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.
core.xpath.AIAFunctions"
string aia:logTraceMessage (string level, node-set ebmHeader, string message)
This function logs a trace message.
If the ebmHeader parameter is null or not passed, the message is logged without any supplemental attributes.
If the level parameter is null or if it is incorrectly specified, a message is logged with level INFO
. The level should be java.util.logging.Level
.
The levels in descending order are:
SEVERE (highest value)
WARNING
INFO
CONFIG
FINE
FINER
FINEST (lowest value)
Level
Level of the trace message.
ebmHeader
The EBM Header providing context for the trace message.
Message
Message to log.
XSLT example:
<xsl:variable name="testVal" select="aia:logTraceMessage('ERROR', oraext:parseEscapedXML('<test></test>'),'LogTrace :: Your Trace message goes her................')" />
BPEL example:
<assign name="Assign_Fault"> <copy> <from expression="aia:logTraceMessage ('ERROR',ora:parseEscapedXML('<test></test>'),'LogTraceError:: Your trace message goes here..........')"/> <to variable="testXpathVal"/> </copy> </assign>
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.
core.xpath.AIAFunctions"
node-set aia:getNotificationRoles (string systemId, string errorCode,
string serviceName, string processName)
systemId
System ID.
errorCode
Error code.
serviceName
Name of the errored service.
processName
Name of end-to-end process.
This function will query the Oracle AIA system registry with input values and return a node-set containing the actor role and the FYI role corresponding to the input errorCode.
For example:
<actor>seblAdmin</actor> <fyi>seblCSR</fyi>
If serviceName is null or empty strings or if no value is found from in Oracle AIA system registry, this function returns the default roles specified in the AIAConfigurationProperties.xml file.
For information about maintaining the Oracle AIA system registry, see Section 20.4.5.2, "Managing the Oracle AIA System Registry."
XSLT example:
<xsl:variable name="testVal" select="aia:getNotificationRoles ('AIADEMO','AIADEMO_ORDER_FALLOUT','AIADemoProcessSalesOrderCBP', 'AIADemoProcessSalesOrderCBP')" />
BPEL example:
<assign name="Assign_Fault"> <copy> <from expression="aia:getNotificationRoles('AIADEMO','AIADEMO_ORDER_ FALLOUT','AIADemoProcessSalesOrderCBP','AIADemoProcessSalesOrderCBP') "/> <to variable="testXpathVal"/><to variable="NotificationRole"/> </copy> </assign>
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia. core.xpath.AIAFunctions" string aia:getAIALocalizedString (string resourceBundleId, string key, node params) string aia:getAIALocalizedString (string resourceBundleId, string key, string language, string country, node params)
resourceBundleId
Identifies the AIA resource bundle from which to retrieve the localized string.
key
The key whose value has to be picked up from the resource bundle.
language
Language, according to java.util.Locale, for which to retrieve the localized string.
Country
Country, according to java.util.Locale, for which to retrieve the localized string.
Params
Node supplying the values for any bind variables within the localized string.
The AIAConfigurationProperties.xml file contains a set of module configuration properties that provide the mapping of resourceBundleId values to resource bundle class names, as shown in Example A-3.
This mapping is used at run time to determine which resource bundle class to use for looking up the localized string.
Example A-3 Module Configuration Properties
<ModuleConfiguration moduleName="ResourceBundle"> <property name="Telco/BillingManagement">oracle.apps.aia.core. i18n.AIAListResourceBundle</property> <property name="Telco/ProductLifeCycle">oracle.apps.aia.core. i18n.AIAListResourceBundle</property> <property name="Telco/SalesOrder">oracle.apps.aia.core.i18n. AIAListResourceBundle</property> <property name="Telco/CustomerParty">oracle.apps.aia.core.i18n. AIAListResourceBundle</property> </ModuleConfiguration>
This function returns the localized string for the passed key from an AIA resource bundle, identified by resourceBundleId. If language and country are omitted, the default locale is assumed.
Example A-4 provides a BPEL usage example for aia:getAIALocalizedString().
Example A-4 BPEL Usage Example for aia:getAIALocalizedString()
<assign name="Assign_1"> <copy> <from variable="inputVariable" part="payload" query="/sordabo: ListOfSWIOrderIO/sordabo:SWIOrder/sordabo:OrderNumber"/> <to variable="localizedStringParams" query="/bpelcom:parameters/ bpelcom:item/bpelcom:value"/> </copy> <copy> <from expression="aia:getAIALocalizedString ('Telco/SalesOrder','ORDER_ NUMBER_MESSAGE',bpws:getVariableData("localizedStringParams")) "/> <to variable="internationalizedstring"/> </copy> </assign>
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia. core.xpath.AIAFunctions" string getConvertedDate(String dateTimeTz, String timeZone, boolean needAnException)
dateTimeTz
DateTime as String, in standard W3C and RFC date format. For example: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
timeZone
Target time zone, as 3 characters code e.g. IST or as GMT offset e.g. +05:30.
needAnException
Boolean flag: true
throws exception for any Parse error and false
returns the input date.
This function will return the converted date as string without time zone in yyyy-MM-dd'T'HH:mm:ss.SSS format.
XSLT example:
<xsl:value-of select="aia:getConvertedDate(ns0: CreateEngineeringChangeOrderList/ns0:ImplementationDate,$ebizTimeZone,false ())"/>
BPEL example:
<copy> <from expression="aia:getConvertedDate("2010-04-26T16:25:00+05:30", "-08:00", false()) "/> <to variable="getConvertedDateVal"/> </copy>
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia. core.xpath.AIAFunctions" string getConvertedDateWithTZ(String dateTimeTz, String timeZone, boolean needAnException)
dateTimeTz
DateTime as String, in standard W3C and RFC date format. For example: yyyy-MM-dd'T'HH:mm:ss.SSSZ
timeZone
Target time zone, as 3 characters code e.g. IST or as GMT offset e.g. +05:30.
needAnException
Boolean flag: true
throws exception for any Parse error and false
returns the input date.
This function will return the converted date as string without time zone in the input date format.
XSLT example:
<xsl:value-of select="aia:getConvertedDateWithTZ(ns0: CreateEngineeringChangeOrderList/ns0:ImplementationDate,$ebizTimeZone, false())"/>
BPEL example:
<copy> <from expression="aia:getConvertedDateWithTZ('2010-04-26T14:30:00 +00:00','+05:30', false())"/> <to variable="getConvertedDateWithTZVal"/> </copy>