JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS Intelligent Event Processor (IEP) User's Guide     Java CAPS Documentation
search filter icon
search icon

Document Information

Designing Intelligent Event Processor (IEP) Projects

Intelligent Event Processor Overview

Complex Event Processing and Event Stream Processing

Typical IEP Scenarios

IEP Architecture

IEP Design-Time and Runtime Components

Basic Workflow

Creating an Intelligent Event Processing Module Project

To Create an Intelligent Event Processing Module Project

To Add an Event Processor to the Project

Adding and Configuring IEP Operators

To Add IEP Operators to an Event Processor

To Configure IEP Operators in an Event Processor

Disabling the Generation of Bindings and Services

To Disable the Generation of Bindings and Services

Validating Event Processors

To Validate Event Processors

Creating and Deploying the Composite Application Project

To Create a Composite Application Project

To Add the IEP Module Project to the Composite Application Project

To Define the Binding Components and Connections

To Deploy the Composite Application Project

Introduction to IEP Operators

Understanding Schemas

Understanding Streams

Understanding Relations

Supported Data Types

IEP Operator Inputs and Outputs

Aggregator Operators

Relation Aggregator

To Create a Relation Aggregator Operator

Time Based Aggregator

To Create a Time Based Aggregator Operator

Tuple Based Aggregator

To Create a Tuple Based Aggregator Operator

Correlation and Filter Operators

Relation Map

To Create a Relation Map Operator

Stream Projection and Filter

To Create a Stream Projection and Filter Operator

Tuple Serial Correlation

To Create a Tuple Serial Correlation Operator

Input Operators

External Table Polling Stream

To Create an External Table Polling Stream Operator

Replay Stream

To Create a Replay Stream Operator

Stream Input

To Create a Stream Input Operator

Table Input

To Create a Table Input Operator

Output Operators

Batched Stream Output

To Create a Batched Stream Output Operator

Invoke Stream

To Create an Invoke Stream Operator

Relation Output

To Create a Relation Output Operator

Save Stream

To Enable the Save Stream Operator Dynamically at Runtime

To Disable the Save Stream Operator Dynamically at Runtime

Stream Output

To Create a Stream Output Operator

Table Output

To Create a Table Output Operator

Relation Converter Operators

Delete Stream

To Create a Delete Stream Operator

Insert Stream

To Create an Insert Stream Operator

Notification Stream

To Create a Notification Stream Operator

Relation Stream

To Create a Relation Stream Operator

Relation Operators

Distinct

To Create a Distinct Operator

Intersect

To Create an Intersect Operator

Minus

To Create a Minus Operator

Union

To Create a Union Operator

Union All

To Create a Union All Operator

Sequence Operators

Contiguous Order

To Create a Contiguous Order Operator:

Gap Window

To Create a Gap Window Operator:

Stream Converter Operators

Attribute Based Window

To Create an Attribute Based Window Operator

Partitioned Window

To Create a Partitioned Window Operator

Time Based Window

To Create a Time Based Window Operator

Tuple Based Window

To Create a Tuple Based Window Operator

WSDL Documents in IEP Module Projects

Data Types in the WSDL Document

Message Objects in the WSDL Document

Bindings and Services in the WSDL Document

Generating Concrete WSDL Documents

Generating Abstract WSDL Documents

Understanding the IEP Database

Configuring the IEP Database to Use Oracle

To Create the IEP User in the Oracle Database

To Install the Oracle Database Driver in the Application Server

To Create the Non-XA Connection Pool

To Create the Non-XA JDBC Resource

To Create the XA Connection Pool

To Create the XA JDBC Resource

To Enable Automatic Recovery of XA Transactions

To Configure the IEP Service Engine to Use the JDBC Resources

To Restart the IEP Service Engine and Create the Database Tables

Configuring the IEP Database to Use MySQL

To Create the IEP User in the MySQL Database

To Install the MySQL Database Driver in the Application Server

To Create the Non-XA Connection Pool

To Create the Non-XA JDBC Resource

To Create the XA Connection Pool

To Create the XA JDBC Resource

To Enable Automatic Recovery of XA Transactions

To Configure the IEP Service Engine to Use the JDBC Resources

To Restart the IEP Service Engine and Create the Database Tables

IEP Service Engine-Specific Database Tables

EMS_PLAN Table

EMS_OUTPUT Table

EMS_ENGINE Table

EMS_TOKEN Table

Event Process-Specific Database Tables

EMS_PROCESSING_STATE_N Tables

EMS_TABLE_USAGE_N Tables

Operator-Specific Database Tables

Configuring Message Reliability in an IEP Module Project

To Disable Message Reliability for Outbound Messages

Index

Input Operators

Input operators enable you to receive data from external sources.

External Table Polling Stream

The External Table Polling Stream operator enables you to retrieve records from an external database table at a specified interval, and to output the records as a stream. The Properties Editor includes a wizard that you use to specify the various properties, including the table columns, the polling interval, and the number of records to retrieve.

After using the wizard, you can update the values for most of the properties from the property editor. However, if you want to add or remove table columns, then you must go through the wizard again.

In the event process, you can link the output of the External Table Polling Stream operator to more than one operator.

One of the properties is the JNDI name of the database resource. Before you deploy the event process, ensure that the JNDI name is configured in the application server to point to a valid database connection. For detailed instructions on configuring JNDI names, see the application server documentation.

To Create an External Table Polling Stream Operator

  1. Drag an External Table Polling Stream operator from the Palette to the Design view.
  2. Double-click the External Table Polling Stream operator.

    The property editor opens.

  3. Click Select Table.

    The Select External Table To Poll wizard appears.

  4. In step 1 of the wizard, do the following:
    1. Select the data source.

      Note - Data sources are configured in the Databases node of the Services window.


    2. Select the table from which you want to poll.
    3. Click Next.
  5. In step 2 of the wizard, do the following:
    1. Select the column or columns that you want to retrieve from the table.
    2. (Optional) Add a condition to the Where Clause area (for example, amount > 100).
    3. Click Next.
  6. In step 3 of the wizard, do the following:
    1. The wizard displays the column or columns that you specified in step 2. Select the one or more columns that uniquely identify each record.

      Note - The operator uses this information to keep track of the last record that was retrieved. If you do not select any of the columns, then each fetch will start at the beginning of the table.


    2. In the Interval field and drop-down list, specify how often you want to retrieve records from the table.
    3. In the Record Size field, specify the number of records to retrieve each time.
    4. If you want to delete the records from the table after they have been fetched, then select the Delete Records check box.

      Note - If you do not select the one or more columns that uniquely identify each record, then selecting the Delete Records check box will ensure that you do not keep retrieving the same records.


    5. In the JNDI Name field, type the JNDI name of the database resource (for example, jdbc/iepseDerbyNonXA).
    6. Click Finish. The property editor displays the values that you specified.
  7. By default, the Preserve Last Fetched Record check box is selected. This setting indicates that if the event process is redeployed, then the operator starts retrieving records where it left off.

    If you leave the Preserve Last Fetched Record check box selected, then you must specify a table name in the Last Fetched Record Table field. This table will be created in the IEP database, not in the external database table.

    If you want the operator to go back to the beginning of the table instead, then clear the Preserve Last Fetched Record check box.

  8. If you are retrieving records from an Oracle external database, then examine the Data Type column. If a data type is not one of the supported IEP data types, then change the data type to a supported IEP data type. For example, change the DECIMAL data type to the INTEGER data type.
  9. (Optional) In the SELECT area, modify any of the default expressions by adding a SQL function.
  10. (Optional) Click the Documentation tab and supply notes on this component.
  11. Click OK.

Replay Stream

The Save Stream and Replay Stream operators are intended to help you perform diagnostics. For example, you can use these operators when the output from an IEP Module project is not the expected output.

You first enable the Save Stream operator to begin saving an input stream to a database table. You then use the Replay Stream operator to replay the events that the Save Stream operator saved to the database table.

To Create a Replay Stream Operator

  1. Drag a Replay Stream operator from the Palette to the Design view.
  2. Connect the output of the Replay Stream operator to any operator that accepts stream input (for example, the Stream Output operator).
  3. Double-click the Replay Stream operator.

    The property editor opens.

  4. Click Select Table.

    The Select Table which has Stream Events wizard appears.

  5. In step 1 of the wizard, do the following:
    1. Select the data source.

      Note - Data sources are configured in the Databases node of the Services window.


    2. Select the table where the events are being saved.
    3. Click Next.
  6. In step 2 of the wizard, do the following:
    1. Select the column or columns that you want to replay.
    2. (Optional) Add a condition to the Where Clause area (for example, amount > 100).
    3. Click Next.
  7. In step 3 of the wizard, do the following:
    1. Select the EMS_TIMESTAMP column.
    2. In the JNDI Name field, type the JNDI name of the database resource (for example, jdbc/iepseDerbyNonXA).
    3. Click Finish. The property editor displays the values that you specified.
  8. By default, the Preserve Last Fetched Record check box is selected. This setting indicates that if the event process is redeployed, then the operator starts retrieving records where it left off.

    If you leave the Preserve Last Fetched Record check box selected, then you must specify a table name in the Last Fetched Record Table field. This table will be created in the IEP database, not in the external database table.

    If you want the operator to go back to the beginning of the table instead, then clear the Preserve Last Fetched Record check box.

  9. (Optional) Click the Documentation tab and supply notes on this component.
  10. Click OK.

    The Replay Stream operator reads events from the database table and sends the events to the next operator.

Stream Input

The Stream Input operator enables you to convert incoming messages to a format that can be used in the event process.

In the property editor, you define a schema that consists of one or more attributes. For example, the schema could consist of two attributes: stock symbol and stock price. Each attribute has a data type, such as INTEGER or VARCHAR.

At runtime, the event process reads the incoming messages from the Normalized Message Router and creates a stream based on the schema that you defined.

You can connect the Stream Input operator to any operator that accepts stream input (for example, the Time Based Window operator).

To Create a Stream Input Operator

  1. Drag a Stream Input operator from the Palette to the Design view.
  2. Double-click the Stream Input operator.

    The property editor opens.

  3. If you want to change the default name, then change the value in the Name field.
  4. If you want to define the schema by adding attributes, then do the following:
    1. For each attribute in the schema, click Add Attribute and specify the name, data type, size (if applicable), and scale (if applicable). You can optionally enter a comment.
    2. To remove an attribute from the schema, select the attribute and click Delete.
    3. To move an attribute up or down in the schema, select the attribute and click Move Up or Move Down.
  5. If you want to define the schema by selecting an XML schema definition, then do the following:
    1. Click Select Schema.
    2. Select the element or type.
    3. Click OK.
  6. (Optional) Click the Documentation tab and supply notes on this component.
  7. Click OK.

Table Input

The Table Input operator enables you to use a relational database table as input to the event process.

You can connect the Table Input operator to any operator that accepts stream input (for example, the Time Based Window operator).

To Create a Table Input Operator

  1. Drag a Table Input operator from the Palette to the Design view.
  2. Double-click the Table Input operator.

    The property editor opens.

    The Details section of the property editor displays the name of the operator and the output schema.

  3. In the Attributes section, you can add or delete attributes for this table input, or move the attributes up or down in order.
  4. In the Data Type column in the Attributes section, select the appropriate data type from the list of data types.
  5. In the Size column, you can specify the size of the data type if, for example, you specify the VARCHAR data type.
  6. Click OK.