A Delivered Oracle AIA XPath Functions

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.

A.1 aia:getSystemProperty()

namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.
  xpath.AIAFunctions"
string aia:getSystemProperty (string propertyName, boolean needAnException)

A.1.1 Parameters

  • 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.

A.1.2 Returns

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.

A.1.3 Usage

  • XSLT example:

    <xsl:variable name="activeRuleset" select="aia:getSystemProperty('Routing.
      ActiveRuleset',true())"/>
    
  • BPEL example:

    <assign name="AssignVar">
       <copy>
          <from expression="aia:getSystemProperty('Routing.    ActiveRuleset',
           true())"/>
          <to variable="ActiveRuleset"/>
       </copy>
    </assign>
    

A.2 aia:getSystemModuleProperty()

namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.
  xpath.AIAFunctions"
string aia:getSystemModuleProperty (string moduleName, string propertyName, 
 boolean needAnException)

A.2.1 Parameters

  • 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.

A.2.2 Returns

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.

A.2.3 Usage

  • 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>
    

A.3 aia:getServiceProperty()

namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.
  xpath.AIAFunctions"
string aia:getServiceProperty (string serviceName, string propertyName, 
 boolean needAnException)

A.3.1 Parameters

  • 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.

A.3.2 Returns

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.

A.3.3 Usage

  • 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>
    

A.4 aia:getEBMHeaderSenderSystemNode()

namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.
  xpath.AIAFunctions"
node-set aia:getEBMHeaderSenderSystemNode (string senderSystemCode, string 
  senderSystemID)

A.4.1 Parameters

  • 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."

A.4.2 Returns

Returns a node set of system information, entered in the Oracle AIA system registry for the given System Code or Internal ID.

A.4.3 Usage

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.

Figure A-1 Systems Page Entry and aia:getEBMHeaderSenderSystemNode()

This image is described in surrouding text

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>

A.5 aia:getSystemType()

namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.
  core.xpath.AIAFunctions"
string aia:getSystemType (string systemCode)

A.5.1 Parameters

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."

A.5.2 Returns

Returns the System Type associated with a System Code as entered in the Oracle AIA system registry.

A.5.3 Usage

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.

Figure A-2 Systems Page Entry and aia:getSystemType()

This image is described in surrouding text
  • 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>
    

A.6 aia:getErrorMessage()

namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.
  xpath.AIAFunctions"
string aia:getErrorMessage (string errorCode, string localeString, string 
 delimiter)

A.6.1 Parameters

  • errorCode

    Error code.

  • localeString

    Delimited locale string.

  • Delimiter

    Delimiter used in the localeString.

A.6.2 Returns

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.

A.6.3 Usage

  • 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>
    

A.7 aia:getCorrectiveAction()

namespace aia="g aia:getCorrectiveAction (string correctiveActionCode, 
  string localeString, string delimiter)

A.7.1 Parameters

  • correctiveActionCode

    Corrective action code.

  • localeString

    Delimited locale string.

  • Delimiter

    Delimiter used in the localeString.

A.7.2 Returns

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.

A.7.3 Usage

  • 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>
    

A.8 aia:isTraceLoggingEnabled()

namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.
  core.xpath.AIAFunctions"
string aia:isTraceLoggingEnabled (string logLevel, string processName)

A.8.1 Parameters

  • logLevel

    Log level that you wish to log.

  • processName

    Name of the process.

A.8.2 Returns

Boolean indicating whether or not the specified logLevel is enabled for the specified process.

This function will do two things:

  1. Check whether logging is enabled or disabled for the input process name from the AIAConfigurationProperties.xml file.

  2. 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.

A.8.3 Usage

  • 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>
    

A.9 aia:logErrorMessage()

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.

A.9.1 Parameters

  • ebmHeader

    The Enterprise Business Message (EBM) header providing context for the error message.

  • Message

    Message to log.

A.9.2 Returns

Returns an empty string.

A.9.3 Usage

  • 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>
    

A.10 aia:logTraceMessage()

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)

A.10.1 Parameters

  • Level

    Level of the trace message.

  • ebmHeader

    The EBM Header providing context for the trace message.

  • Message

    Message to log.

A.10.2 Returns

Returns an empty string.

A.10.3 Usage

  • 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>
    

A.11 aia:getNotificationRoles()

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)

A.11.1 Parameters

  • systemId

    System ID.

  • errorCode

    Error code.

  • serviceName

    Name of the errored service.

  • processName

    Name of end-to-end process.

A.11.2 Returns

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."

A.11.3 Usage

  • 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>
    

A.12 aia:getAIALocalizedString()

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)

A.12.1 Parameters

  • 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>

A.12.2 Returns

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.

A.12.3 Usage

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(&quot;localizedStringParams&quot;))
       "/>
      <to variable="internationalizedstring"/>
   </copy>
</assign>

A.13 aia:getConvertedDate()

namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.
  core.xpath.AIAFunctions"
string getConvertedDate(String dateTimeTz, String timeZone, boolean 
 needAnException)

A.13.1 Parameters

  • 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.

A.13.2 Returns

This function will return the converted date as string without time zone in yyyy-MM-dd'T'HH:mm:ss.SSS format.

A.13.3 Usage

  • 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>
    

A.14 aia:getConvertedDateWithTZ()

namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.
  core.xpath.AIAFunctions"
string getConvertedDateWithTZ(String dateTimeTz, String timeZone, 
 boolean needAnException)

A.14.1 Parameters

  • 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.

A.14.2 Returns

This function will return the converted date as string without time zone in the input date format.

A.14.3 Usage

  • 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>