Avaya DevConnect Center
Home IP Communications Contact Centers Unified Communications Communications Enabled Business Processes Avaya DevConnect Portal RSS Feed
Register to join the Avaya DevConnect Program to gain access to Avaya APIs & SDKs, purchase Avaya products for development at discounted prices, and receive a discount on training and certification. More information
Sign up for your free email newsletter today!
Avaya Developer News

More Newsletters
How to Begin Developing with Avaya's Event Processing Language (cont'd)

Building Your First Stream and Event Definitions
This sample shows how to create two streams and an event definition. The first stream contains the data flow of player information (i.e. name, position, salary, last action, etc). The second stream contains the data flow of any news worthy events we want to monitor. The event definition, Chavez_Alert, monitors the Player stream for any news concerning my favorite player, Eric Chavez. Figure 2 illustrates how these objects work together within the EPL server.
Figure 2. The Event Definition Scans the Player Stream and Inserts Chavez-Related News into the News Ticker Stream

To build these objects, open the ELP Studio by clicking Start > Programs > Event_Processor > EPL Studio. The EPL Studio will open a new server engine by default. What we want is to open the default server instance created when you installed the EPL environment (see the What You Need to Begin Developing with EPL sidebar). Open the default engine by clicking File > Open System and specify " C:\Program Files\Avaya\Event_Processor\eplserver\default\engine" as the Directory path. Click Open to open the default engine.

Author's Note: This sample is not intended to mimic a real-world scenario. For example, after completing the sample, you will have a good idea how to use EPL Studio to build streams and event definitions. You will also know how to test these objects using the EPL Console.

A real-world scenario would include feeding data into the event processor from external data sources; something that requires the use of Event Processor I/O adapters. Although I/O adapters are not covered here, they will be in a future article

Using EPL Studio to Build Streams and Event Definitions
EPL Studio lists all the objects already residing in the EPL engine grouped by type. EPL Studio provides a rich developer environment that allows you to build EPL objects visually. Using EPL Studio you can create Streams, Event Definitions, Views, Data Providers, and more.

Building the Player Stream
To add the Player Stream, right-click the Stream object in the System pane (located in the upper left-hand corner of EPL Studio) and click 'New Stream ' to display the New Stream dialog box. You can click the New Stream button in the toolbar (the green arrow icon) as well. Complete the following steps to build the Player stream:
Figure 3. Create the Player Stream

  1. In the New Stream dialog box (see Figure 3), enter 'MLB_News' as the Namespace property, Player as the Name property and leave the Type property set to Map Schema. The map schema specifies this stream as a name/value pair stream. Click OK.
  2. Select the Map Schema tab to add the fields listed in Table 1. Once you have added all fields click the Add button to add the Player stream to the EPL engine.

Table 1. The Player Stream Schema

Field Name

Type

Nullable

FirstName

String

False

LastName

String

False

Team

String

True

Position

String

True

YearsInMajors

Integer

True

Salary

Double

True

LastAction

String

False

The Player stream contains basic information for a major league baseball player. Only the FirstName, LastName, and LastAction fields are required. The name fields are self-explanatory; the LastAction field is a string data type that contains information about the last play involving that player. For example, it could contain information about his last at-bat, last play in the fields, if he received a contract extension, or if he tested positive for a banned substance...whatever you want.


Previous Page: Getting Started Next Page: Building the NewsTicker Stream
Page 1: Getting StartedPage 3: Building the NewsTicker Stream
Page 2: Building Your First Stream and Event Definitions 



JupiterOnlineMedia

internet.com earthweb.com Devx.com mediabistro.com Graphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Copyright 2008 Jupitermedia Corporation All Rights Reserved.
Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers