Skip Headers

Oracle9iAS InterConnect User's Guide
Release 2 (9.0.2)

Part Number A92174-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

4
Using Events in iStudio

This chapter describes using iStudio to create, publish, and subscribe to events. This chapter discusses the following topics:

Events: An Overview

An event is an integration point used to model the Publish/Subscribe paradigm. An event has associated data that is the common view of all the data to be exchanged through this event. In other words, the data associated with an event in the common view must be a superset of the data of participating applications.

For example, App1 and App2 publish customer names and App3 subscribes to it. If App1 publishes First Name, Last Name, and Middle Initial, and App2 publishes First Name, Last Name, Prefix, and Suffix, the event could be defined as follows:

New Customer Event
Prefix
First Name
Last Name
Middle Initial
Suffix


Note:

Standard application-independent definitions can be used for event-associated data in the common view such as Open Applications Group XML business object definitions. 


See Also:

"How the Hub-and-Spoke Methodology Works" 

Event Maps

Event maps allow application data to be mapped to an Oracle9iAS InterConnect event without the application having to know about the Oracle9iAS InterConnect event itself. For example, if an application is publishing a Create_Customer event, it doesn't have to explicitly say that the message it is publishing corresponds to an Oracle9iAS InterConnect Create_Customer event. Instead, using iStudio, certain fields in the application view can be associated to help Oracle9iAS InterConnect determine which event the message maps.

In addition, if an application publishes exactly the same structure of data for two or more events, event maps help Oracle9iAS InterConnect distinguish which message corresponds to which event. For example, an application publishes the same Customer Application Data Type regardless of whether it is a Create_Customer or an Update_Customer event. Through event map, Oracle9iAS InterConnect can determine which messages correspond to Create_Customer and Update_Customer.

Creating Events

To create an event:

  1. From the File menu, click New, then select Event. The Create Event dialog displays:


    Text description of createevent.gif follows.
    Text description of the illustration createevent.gif

    Enter the information in the following fields:

    • Business Object--The name of the category to which the event belongs. Select a category from the drop down list.

    • Event Name--The name of the event. Only alphanumeric characters can be used.

    • OAI/V1--The owner and version number of the Business Object. This field cannot be edited.

  2. Add or import attributes to this event.

    See Also:

     
  3. Click Save.

Publishing and Subscribing to an Event

The publish/subscribe paradigm is an existing technology for exchanging information between a provider (publisher) and a set of users (subscriber). This paradigm is one of the most common ways for adapters to communicate with each other through the hub.

Publishing an Event

Publishing an event in an application in iStudio involves using the Publish Wizard. To start the Publish Wizard:

  1. In the Design Navigation tree, expand the Application node. Select and expand the Application node to display the Published Events leaf. Right-click Published Events and select Publish. The Publish Wizard displays:


    Text description of is01.gif follows.
    Text description of the illustration is01.gif

    1. Enter information in the following fields:

      • Application--The name of the application that is publishing the event.

      • Message Type--This field specifies the mode of communication between Oracle9iAS InterConnect and the application. Select from the following message types:

        • Database--Oracle9iAS InterConnect communicates with the application using the database.

        • Generic--Oracle9iAS InterConnect communicates with application using a user-defined bridge.

        • XML--Oracle9iAS InterConnect communicates with the application using XML data described through a DTD using the FTP, SMTP, HTTP, MQ Series, or user-defined adapters.

        • AQ--Oracle9iAS InterConnect communicates with the application through Oracle Advanced Queues using the Advanced Queue adapter. The payload can be Oracle Objects where fields may be XML or RAW XML.

        • D3L--The adapter communicates with the application using D3L.

      Select the event name.

    2. Click Next.

  2. Define Application View Page

    After clicking Next on the Select Event page, the Define Application View page displays:


    Text description of is02.gif follows.
    Text description of the illustration is02.gif

    Once an event is selected to publish, the application view is defined. The application view page is initially an empty table. Define the attributes using Add, or import the definitions from a database or an API Repository using Import.

    1. Add or import attributes by clicking Add or Import.

    2. To import an XML DTD, a file dialog is displayed when the Import button is pressed and XML is selected:


      Text description of is41.gif follows.
      Text description of the illustration is41.gif

    3. Select a DTD file and click Open. The Choose Root Element dialog displays:


      Text description of is42.gif follows.
      Text description of the illustration is42.gif

    4. Select a root DTD element and click OK.

    5. If this is a XML type message, the Event Map button is enabled. To define the event map, click Event Map.

      The Event Map dialog displays:


      Text description of is40.gif follows.
      Text description of the illustration is40.gif

    6. Click Add to add an event map attribute. The New Event Map dialog displays:


      Text description of is39.gif follows.
      Text description of the illustration is39.gif

    7. Expand the tree and select an attribute and enter a value in the Value field.

    8. Click OK on the Add Event Map dialog to return to the Event Map dialog.

    9. Click OK to return to the Publish Event Wizard.

    10. Click Next.

  3. Define Mapping Page

    Mapping involves copying the individual fields or simple shape-change transformations. After clicking Next on the Define Application View page, the Define Mapping page displays:


    Text description of is03.gif follows.
    Text description of the illustration is03.gif

    Click New to define new mappings. The Mapping Parameters dialog displays:


    Text description of is34.gif follows.
    Text description of the illustration is34.gif

    To map fields in the application view to fields in the common view, use a transform. For example, to map fields in the FirstName and LastName in the common view to Name in the application view, use the ExpandFields transform.

    See Also:

     
  4. Click OK to return to the Publish Event Wizard.

  5. Click Finish.

Subscribing to an Event

Subscribing to an event in an application in iStudio involves using the Subscribe Wizard. To subscribe to an event in an application:

  1. In the Design Navigation tree, expand the Application node. Select and expand the Application node to display the Subscribed Events leaf. Right-click Subscribed Events and select Subscribe. The Subscribe Wizard displays:


    Text description of is05.gif follows.
    Text description of the illustration is05.gif

    1. Use this page to enter information in the following fields:

      • Application--The name of the application subscribing to the event.

      • Message Type--This field specifies the mode of communication between Oracle9iAS InterConnect and the application. Select from the following message types:

        • Database--Oracle9iAS InterConnect communicates with the application using the database.

        • Generic--Oracle9iAS InterConnect communicates with application using a user-defined bridge.

        • XML--Oracle9iAS InterConnect communicates with the application using XML data described through a DTD using the FTP, SMTP, HTTP, MQ Series, or user-defined adapters.

        • AQ--Oracle9iAS InterConnect communicates with the application through Oracle Advanced Queues using the Advanced Queue adapter. The payload can be Oracle Objects where fields may be XML or RAW XML.

        • D3L--The adapter communicates with the application using D3L.

    2. Select the event to subscribe to and click Next.

  2. Define Application View Page

    After selecting the event to subscribe to, the Define Application View page displays:


    Text description of is06.gif follows.
    Text description of the illustration is06.gif

    Once an event is selected to subscribe to, the application view is defined. The application view page is initially an empty table. Define the attributes using Add or import the definitions from a database or an API Repository using Import.

    1. Add or import attributes by clicking Add or Import.

    2. To populate and look up cross reference tables, click Cross Reference... The Cross Reference dialog displays. When finished, click OK to return to the Subscribe Wizard.

    3. Click Next.

  3. Define Mapping Page

    Mapping can either involve copying the individual fields or simple shape change transformations. After clicking Next on the Define Application View page, the Define Mappings page displays:


    Text description of is07.gif follows.
    Text description of the illustration is07.gif

    1. Click New to define mappings.

      To map fields in the application view to fields in the common view, use a transform. For example, to map fields in the FirstName and LastName in the application view to Name in the common view, use the ExpandFields transform.

      See Also:

      "Invoking a Procedure"  

    2. Click Finish.


Go to previous page Go to next page
Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index