You add a new mediator component called receivePO, which subscribes to an event called NewPO and sends the received PO to the routePO service.

1. Open the POProcessing application in JDeveloper and open composite.xml, and click on the Event Definition Creation icon:


2. In the Event Definition Creation window, enter POEvents as the name of the event definition. Accept the namespace value generated.

3. Add a new event by clicking on the + icon.

4. Select the PuchaseOrder element from the po.xsd file using the chooser.

5. Enter NewPO as the name of the event and click on OK to close the Add an Event window.


6. Click on OK to complete the event definition.

7. Close the POEvents.edl panel.

8. Save all.

Subscribing to the NewPO event


1. Drag-and-drop a Mediator component onto the composite.

2. Name the mediator receiveNewPO.

3. Select Subscribe to Events for the Template.

4. Click on the + to add an event. Select the NewPO event from the Event Chooser window.


5. Click on OK to accept and create the mediator.

6. Save all.

7. Connect the receiveNewPO mediator to the routePO mediator:



8. Double-click on the receiveNewPO mediator and define a new transformation map. In the transformation-map, map the all the fields from the source to the target.

9. Close the mediator and save all.

Deploying and testing


1. Deploy the POProcessing composite to the server.

2. Browse to the EM console at http://localhost:7001/em.

3. Right-click on folder soa-infra (soa_server1) under folder SOA:


4. Click on item Business Events.

5. You should see the Business Events management page with the NewPO event listed in the Events tab.


6. Select the event and click on the Test… button to publish the event.

7. In the pop-up window, enter the following XML and click on Publish:

<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>
8. You should get a "The Event published successfully" message.

9. Click on soa-infra in the navigation panel on the left to get the soa-infra dashboard.

10. Click on the POProcessing composite to view new instances. You should see an instance created for processing the event you just published. Click on the instance ID to view the flow trace.



Leave a Reply

Subscribe to Posts | Subscribe to Comments

About This Site

Howdy! My name is Suersh Rohan and I am the developer and maintainer of this blog. It mainly consists of my thoughts and opinions on the technologies I learn,use and develop with.
Powered by Blogger.

- Copyright © My Code Snapshots -Metrominimalist- Powered by Blogger - Designed by Suresh Rohan -