SOA 11g Tutorial: Event Delivery Network (EDN)

 

This is part of the Oracle SOA11g hands on tutorials.

Overview

* Provides a declarative way to use a publish/subscribe model to generate and consume business events without worrying about the underlying message infrastructure.

Event Definition Language (EDL)

* EDL defines events.
* EDL is an XML schema used to define events.

EDL Content

* Global name
* Custom headers
* Payload definition

Create an Event: NewPO Event

* Open POProcessing composite.xml file form JDev.
* Click the Event Definition Creation icon (lighting bolt next to the green check mark) to open the Create Event Definition File dialog.
– EDL File Name: POEvents
– Directory: file:/C:/po/POProcessing1/POProcessing/
– Namespace: http://schemas.oracle.com/events/edl/POEvents
* Click the green plus sign to bring up the Add an Event dialog.
– Click the magnifying glass to bring up the Type Chooser dialog.
– Select po.xsd -> PurchaseOrder and click OK button.
– Name: NewPO
– Click OK.
* Save all.

Subscribe to NewPO Event

* Drag and drop a Mediator component onto Components lane.
– Name: receiveNewPO
– Template: Subscribe to Events
* Click the green plus sign to bring up the Event Chooser dialog
– Select NewPO event
* Click OK.
* Drag a wire from lower right of receiveNewPO mediator component to upper left of routePO mediator component.
* Double click receiveNewPO mediator component to open receiveNewPO.mplan file.
* Click the transformation icon to bring up the Event Transformation Map.
* Select Create New Mapper File and accept default file name of NewPO_To_PurchaseOrder.xsl.
* Click OK to open the NewPO_To_PurchaseOrder.xsl file.
* Automap PurchaseOrder to PurchaseOrder.
* Save all.

Test

* Redeploy POProcessing application.
* Log into EM.

Publish Event

* Right click soa-infra (soa_server1) and select Business Events.
* On Events tab, click NewPO event.
* Click Test button to bring up Test Event: NewPO dialog.
* Enter input message:

<PurchaseOrder xmlns="http://xmlns.oracle.com/ns/order">
         <CustID>1111</CustID>
         <ID>33412</ID>
         <productName>Sony Bluray DVD Player</productName>
         <itemType>Electronics</itemType>
         <price>350</price>
         <quantity>5</quantity>
         <status>Initial</status>
         <ccType>Mastercard</ccType>
         <ccNumber>1234-1234-1234-1234</ccNumber>
</PurchaseOrder>

* Click Publish button on the lower right corner.
* Click OK on “The Event published successfully” message.

Check Event

* Click POProcessing service.
* Click the latest Instance ID to open the flow trace window.
* Check that the order from event has been processed.

References

* here

This entry was posted in soa11g. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.