この付録では、自社の統合フローで使用するためにOracle SOAコア拡張機能とともに提供されるXPath関数の詳細を示します。
この付録の内容は次のとおりです。
注意:
これらの関数はBPEL、XSLT、およびメディエータ・ルーティング・ルールのフィルタからコールできます。
namespace aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.
xpath.AIAFunctions"
string aia:getSystemProperty (string propertyName, boolean needAnException)
propertyName
値を取得するシステム・プロパティの名前。
needAnException
プロパティが見つからない場合に例外をスローするか、または空の文字列を返すかを指定するために使用します。
propertyNameによって識別されるシステム・プロパティの文字列値を返します。プロパティが見つからない場合は、needAnExceptionパラメータの値に従って、例外がスローされるか、空の文字列が返されます。
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
プロパティを取得するモジュール。
propertyName
値を取得するプロパティの名前。
needAnException
プロパティが見つからない場合に例外をスローするか、または空の文字列を返すかを指定するために使用します。
moduleNameとpropertyNameによって識別されるモジュール・プロパティの文字列値を返します。モジュール・プロパティが見つからない場合は、同じ名前のシステム・プロパティが返されます。同じ名前のシステム・プロパティが見つからない場合は、needAnExceptionパラメータの値に従って、例外がスローされるか、空の文字列が返されます。
XSLTの例:
<xsl:variable name="errHdlrImpl" select="aia:getSystemModuleProperty
('ErrorHandler','COMMON.ERRORHANDLER.IMPL',true())"/>
BPELの例:
<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
プロパティを取得するサービス。
propertyName
値を取得するプロパティの名前。
needAnException
プロパティが見つからない場合に例外をスローするか、または空の文字列を返すかを指定するために使用します。
serviceNameとpropertyNameによって識別されるサービス・プロパティの文字列値を返します。サービス・プロパティが見つからない場合は、同じ名前のシステム・プロパティが返されます。同じ名前のシステム・プロパティが見つからない場合は、needAnExceptionパラメータの値に従って、例外がスローされるか、空の文字列が返されます。
XSLTの例:
<xsl:variable name="defaultSystemID" select="aia:getServiceProperty
('{http://xmlns.oracle.com/ABCSImpl/Siebel/Core/UpdateCustomerParty
SiebelReqABCSImpl/V2}UpdateCustomerPartySiebelReqABCSImplV2','Default.
SystemID',true())"/>
BPELの例:
<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
Oracle AIAシステム・レジストリに定義されたシステム・コード。
senderSystemID
Oracle AIAシステム・レジストリに定義されたシステム内部ID。
Oracle AIAシステム・レジストリの保守方法については、「Oracle AIAシステム・レジストリの管理」を参照してください。
図A-1に示すような「システム」ページの設定がある場合、aia:getEBMHeaderSenderSystemNode('SEBL_01', '')とaia:getEBMHeaderSenderSystemNode('', 'siebel')の両方が、例A-1に示すノード・セットを返します。
図A-1 「システム」ページのエントリとaia:getEBMHeaderSenderSystemNode()

例A-1 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>
aia:getEBMHeaderSenderSystemNode()に対応するXSLTの例を例A-2に示します。
ヒント:
この例では<xsl:stylesheet version="2.0" ...>が必要です。
例A-2 aia:getEBMHeaderSenderSystemNode()に対応するXSLTの例
<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: Oracle AIAシステム・レジストリに入力されたシステム・コード。
Oracle AIAシステム・レジストリの保守方法については、「Oracle AIAシステム・レジストリの管理」を参照してください。
図A-2に示すような「システム」ページの設定がある場合、aia:getSystemType('SEBL_01')の結果は文字列SIEBELになります。
図A-2 「システム」ページのエントリとaia:getSystemType()

XSLTの例:
<xsl:variable name="systemType" select="aia:getSystemType('SEBL_01')"/>
BPELの例:
<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に対応するローカライズ文字列を返します。localeStringは、LanguageCode、CountryCodeおよびバリアントを指定のデリミタで連結した文字列です。入力パラメータでロケールが見つからない場合は、システムのデフォルト・ロケールが使用されます。
詳細は、java.util.Localeドキュメント(http://download.oracle.com/javase/1.5.0/docs/api/java/util/class-use/Locale.html)を参照してください。
XSLTの例:
<xsl:variable name="errMsg" select="aia:getErrorMessage('AIA_ERR_AIAO2C2_
1007','','')"/>
BPELの例:
<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
修正処理コード。
localeString
デリミタで区切られたロケール文字列。
Delimiter
localeStringで使用されるデリミタ。
この関数は修正処理コード・リソース・バンドルを参照し、入力correctiveActionCodeに対応するローカライズ文字列を返します。
localeStringは、LanguageCode、CountryCodeおよびバリアントを指定のデリミタで連結した文字列です。入力パラメータでロケールが見つからない場合は、システムのデフォルト・ロケールが使用されます。
詳細は、java.util.Localeドキュメント(http://download.oracle.com/javase/1.5.0/docs/api/java/util/class-use/Locale.html)を参照してください。
XSLTの例:
<xsl:variable name="corrAction" select="aia:getCorrectiveAction('SAMPLECODE'
,'','')"/>
BPELの例:
<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)
指定したプロセスに対して指定のlogLevelが有効かどうかを示すブール値。
この関数は2つの処理を実行します。
AIAConfigurationProperties.xmlファイルの入力プロセス名に対してロギングが有効か無効かをチェックします。
トレース・ロガーのログ・レベルが入力ログ・レベルを記録するように設定されているかどうかをチェックします。
この関数は、前述の両方の条件がtrueを返す場合はtrueを、それ以外の場合はfalseを返します。logLevelパラメータがnullの場合または正しく指定されていない場合、この関数はfalseを返します。processNameがnullまたは空の文字列の場合、この関数はnullを返します。
XSLTの例:
<xsl:variable name="testVal" select="aia:isTraceLoggingEnabled('INFO',
'SamplesCreateCustomerSiebelReqABCSImpl')" />
BPELの例:
<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)
この関数はエラー・メッセージをログに記録します。ebmHeaderパラメータがnullまたは渡されない場合、メッセージは追加属性なしでログに記録されます。エラー・メッセージは常にレベルSEVEREでログに記録されます。
XSLTの例:
<xsl:variable name="testVal" select="aia:logErrorMessage
(oraext:parseEscapedXML('<test></test>'),'LogError:: Your Error message
goes here................................')"/>
BPELの例:
<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)
この関数はトレース・メッセージをログに記録します。
ebmHeaderパラメータがnullまたは渡されない場合、メッセージは追加属性なしでログに記録されます。
レベル・パラメータがnullの場合または正しく指定されていない場合、メッセージはレベルINFOでログに記録されます。レベルはjava.util.logging.Levelである必要があります。
次に、レベルを降順で示します。
SEVERE (最高値)
WARNING
INFO
CONFIG
FINE
FINER
FINEST(最低値)
XSLTの例:
<xsl:variable name="testVal" select="aia:logTraceMessage('ERROR',
oraext:parseEscapedXML('<test></test>'),'LogTrace :: Your Trace message
goes her................')" />
BPELの例:
<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
システムID。
errorCode
エラー・コード。
serviceName
エラーが発生したサービスの名前。
processName
エンドツーエンド・プロセスの名前。
この関数は、入力値を使用してOracle AIAシステム・レジストリに対する問合せを実行し、入力errorCodeに対応するアクター・ロールとFYIロールを含むノードセットを返します。
次に例を示します。
<actor>seblAdmin</actor> <fyi>seblCSR</fyi>
serviceNameがnullまたは空の文字列の場合、またはOracle AIAシステム・レジストリに値が見つからない場合、この関数はAIAConfigurationProperties.xmlファイルに指定されたデフォルトのロールを返します。
Oracle AIAシステム・レジストリの保守方法については、「Oracle AIAシステム・レジストリの管理」を参照してください。
XSLTの例:
<xsl:variable name="testVal" select="aia:getNotificationRoles
('AIADEMO','AIADEMO_ORDER_FALLOUT','AIADemoProcessSalesOrderCBP',
'AIADemoProcessSalesOrderCBP')" />
BPELの例:
<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
ローカライズ文字列を取得するAIAリソース・バンドルを識別します。
key
リソース・バンドルから値を選択する必要があるキー。
language
ローカライズ文字列を取得するjava.util.Localeに従った言語。
Country
ローカライズ文字列を取得するjava.util.Localeに従った国。
Params
ローカライズ文字列内のバインド変数に対して値を提供するノード。
例A-3に示すように、AIAConfigurationProperties.xmlファイルにはresourceBundleId値からリソース・バンドル・クラス名へのマッピングを提供する一連のモジュール構成プロパティが格納されています。
このマッピングは、ローカライズ文字列の参照に使用するリソース・バンドル・クラスを判別するために実行時に使用されます。
例A-3 モジュール構成プロパティ
<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>
この関数は、resourceBundleIdによって識別されたAIAリソース・バンドルから渡されたキーに対するローカライズ文字列を返します。言語または国を省略すると、デフォルトのロケールが想定されます。
例A-4に、aia:getAIALocalizedString()に対応するBPELの使用例を示します。
例A-4 aia:getAIALocalizedString()に対応するBPELの使用例
<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
標準W3CおよびRFC日付書式の日時(文字列)。例: yyyy-MM-dd'T'HH:mm:ss.SSSZ。
timeZone
ターゲット・タイムゾーン(3文字のコード)。例: IST、GMTオフセット+05:30。
needAnException
ブール・フラグ: trueは解析エラーの場合に例外をスローし、falseは入力日を返します。
XSLTの例:
<xsl:value-of select="aia:getConvertedDate(ns0: CreateEngineeringChangeOrderList/ns0:ImplementationDate,$ebizTimeZone,false ())"/>
BPELの例:
<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
標準W3CおよびRFC日付書式の日時(文字列)。例: yyyy-MM-dd'T'HH:mm:ss.SSSZ。
timeZone
ターゲット・タイムゾーン(3文字のコード)。例: IST、GMTオフセット+05:30。
needAnException
ブール・フラグ: trueは解析エラーの場合に例外をスローし、falseは入力日を返します。
XSLTの例:
<xsl:value-of select="aia:getConvertedDateWithTZ(ns0: CreateEngineeringChangeOrderList/ns0:ImplementationDate,$ebizTimeZone, false())"/>
BPELの例:
<copy>
<from expression="aia:getConvertedDateWithTZ('2010-04-26T14:30:00
+00:00','+05:30', false())"/>
<to variable="getConvertedDateWithTZVal"/>
</copy>