Creating Mediator that subscribes to EDL in MDS

In this recipe, we will show how we can create Mediator that subscribes to an EDN event whose EDL is defined in MDS. This approach enables us to separate the definition of an event from the implementation of a composite that either subscribes to, or publishes, the event.

Getting ready

Make sure you have created a file-based MDS repository for JDeveloper, as described in the initial recipe.

Create an SOA application with a project containing an empty composite.

How to do it...

  1. Drag Mediator from SOA Component Palette onto your composite. This will launch the Create Mediator wizard; specify an appropriate name for it (UserRegistration in the following example), and for the Template select Subscribe to Events.
    How to do it...
  2. Click on the Subscribe to new event icon (circled in the previous screenshot); this will launch the Event Chooser window.
    How to do it...
  3. Click on the Browse for Event Definition (edl) files icon (circled in the previous screenshot); this will launch SOA Resource Browser. Select Resource Palette from the drop-down list.
  4. Select the EDL that you wish to import and click on OK. This will return you to the Event Chooser window; ensure that the required event is selected and click on OK.

    This will return you to the Create Mediator window; ensure that the required event is configured as needed, and click on OK.

    This will create an event subscription based on the EDL specified within our composite.

How it works...

When we reference an EDL in MDS, JDeveloper doesn't actually make a copy of the EDL; rather within the composite.xml file, it creates an import statement to reference the location of the EDL in MDS.

There's more...

This approach can be used equally well to subscribe to an event within a BPEL process or publish an event using either Mediator or BPEL.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.151.45