ビジネス・イベントの作成およびサブスクライブ時の処理内容
次の例のソース・コードに、Oracle Mediatorサービス・コンポーネントのサブスクライブするイベントに関する詳細を示します。
<component name="OrderPendingEvent"> <implementation.mediator src="OrderPendingEvent.mplan"/> <business-events> <subscribe xmlns:sub1="/oracle/fodemo/storefront/entities/events/edl/OrderEO" name="sub1:NewOrderSubmitted" consistency="oneAndOnlyOne" durable="true" runAsRoles="$publisher"/> </business-events> </component>
この例では明示的に示されていませんが、イベントにおいてXPathフィルタを定義できます。次の例では、初期デポジットが50000
を超える場合にのみ、イベントの配信が可能になります。
<business-events>
. . .
. . .
<filter>
<xpath xmlns:be="http://oracle.com/fabric/businessEvent"
xmlns:ns1="http://xmlns.oracle.com/singleString"
<xpath expression= "/be:business-event/be:content/
sub1:AccountInfo/Details[@initialDeposit > 50000]" />
</filter>
. . .
. . .
</business-events>