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

Output Operators

Output operators enable you to send data from an event process to an external source.

Batched Stream Output

The Batched Stream Output operator enables you to output events in batches, rather than one event at a time.

Depending on the downstream JBI component, this approach can improve performance. For example, if you are using IEP with the File Binding Component, sending 10 events at a time might be faster than sending one event at a time.

To Create a Batched Stream Output Operator

  1. Drag a Batched Stream Output operator from the Palette to the Design view.
  2. Connect the input of the new Batched Stream Output component to an operator that has stream output.
  3. Double-click the Batched Stream Output operator.

    The property editor opens. Notice that the component has inherited the schema of its input stream.

  4. If you want to include a timestamp on the output, then select the Include Timestamp check box.
  5. In the Batch Size field, specify the number of events in a batch.
  6. In the Maximum Delay field and drop-down list, specify the maximum amount of time that the operator will wait before sending a batch.

    For example, assume that the batch size is 10 and the maximum delay is 30 seconds. If 30 seconds have passed since the previous batch was sent, and only eight events have arrived, then the operator sends the eight events.

  7. (Optional) Click the Documentation tab and supply notes on this component.
  8. Click OK.

Invoke Stream

The Invoke Stream operator enables you to send a stream of data from one event process directly to another event process. The stream does not go through the Normalized Message Router.

For example, you could create two event processes:

You could then configure the Invoke Stream operator in the second event process to send data to the first event process.

To Create an Invoke Stream Operator

  1. Create an event process that will receive a stream of data from another event process. This event process must contain a Stream Input operator.
  2. Create an event process that will send a stream of data to the first event process. This event process must contain an Invoke Stream operator.
  3. Double-click the Invoke Stream operator in the second event process.

    The property editor opens.

  4. Click the ellipsis.

    The Select Stream Input dialog box appears.

  5. Expand the node that represents the first event process and select the Stream Input operator.
  6. Click OK to close the Select Stream Input dialog box.
  7. The Inputs area contains the attributes of the second event process. Drag and drop attributes from the Inputs area to the Expression column in the SELECT area.
  8. (Optional) Click the Documentation tab and supply notes on this component.
  9. Click OK to close the property editor.

    Now you can deploy both event processes. When an event is sent to the stream input of the second event process, the Invoke Stream operator sends the event to the stream input of the first event process.

Relation Output

The Relation Output operator sends out groups of tuples that reflect its input. When an event triggers a change in a relation result, the operator sends out changes rather than an entire result each time a triggering event is received.

The Relation Output operator sends out groups of tuples that reflect changes in the relation result. Whenever an event triggers a change in the relation result, the operator sends out records with a tag on the end. If the tag is a plus sign (+), then the record has been added. If the tag is a minus sign (-), then the record has been deleted.

If a change occurs as a result of the triggering event such that a record changes, IEP sends a delete record matching the changed record. IEP sends an add record when there is an updated or new version of that record. The operator only sends out change events rather than repeatedly sending the entire result.

If a triggering event enters into the event process, but the result of the final relation from that event does not change, then the relation output is not triggered and data is not sent.

Use the Relation Output operator to provide a summary of data that has been added or deleted.

To Create a Relation Output Operator

  1. Drag a Relation Output operator from the Palette to the Design view.
  2. Double-click the Relation Output operator.

    The property editor opens.

  3. If you want to include a timestamp on the output, then select the Include Timestamp check box.
  4. Click OK.

Save 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.

Before you begin, you must deploy an event process that contains a Stream Input operator.


Note - If you know up front that you want to save an input stream to a database table, then you can use the Save Stream operator at design time. The property editor enables you to configure the same properties described in the following procedure.


To Enable the Save Stream Operator Dynamically at Runtime

  1. Start the IEP monitoring and debugging tool. For detailed information about this tool, see the Open ESB wiki.
  2. Run the listIEP command. You must specify the IEP service unit name as a parameter. You can find the service unit name by going to the Services window of the IDE and expanding the Servers node, the GlassFish V2 node, the JBI node, the Service Assemblies node, and the individual service assembly node.

    The command returns a list of plan names. For example:

    [IEP] listIEP CompositeApp1-IepModule1
    test_iep
  3. Run the listOperators command. You must specify the plan name as a parameter.

    The command returns a list of the operators in the event process. For example:

    [IEP] listOperators test_iep
    StreamInput0
    StreamOutput0
  4. Run the addSaveStream command. You must specify the following parameters: the plan name, the name of the Stream Input operator, the JNDI name of the database resource, and the name of the database table where the input stream will be saved. You can optionally specify a boolean parameter called Is Global, which indicates whether the table and its data are kept between deployments. By default, the Is Global parameter is set to true.

    The command returns the name of the Save Stream operator that was added. For example:

    [IEP] addSaveStream test_iep StreamInput0 jdbc/iepseDerbyNonXA STOCKTRANSACTIONS false
    The result is StreamInput0SaveStream0
  5. The Save Stream operator begins saving the input stream to the database table. If the table name that you specified does not exist, then the table is created.

To Disable the Save Stream Operator Dynamically at Runtime

  1. Start the IEP monitoring and debugging tool. For detailed information about this tool, see the Open ESB wiki.
  2. Run the removeSaveStream command. You must specify the following parameters: the plan name and the name of the Save Stream operator. For example:
    [IEP] removeSaveStream test_iep StreamInput0SaveStream0
  3. The Save Stream operator stops saving the input stream to the database table.

    If the Is Global parameter of the addSaveStream command was set to true, then the table and its data are not deleted. However, if you subsequently modify the schema of the stream input (for example, by adding a column) and re-enable the Save Stream operator, then the table and its data are deleted at that time.

    If the Is Global parameter of the addSaveStream command was set to false, then the table and its data are deleted.

Stream Output

The Stream Output operator enables you to convert a stream of events into outgoing messages that can be sent to the Normalized Message Router and received by any JBI component.

When the WSDL document for the event processor is automatically generated, IEP uses the Stream Output operator to define various WSDL elements. For example, if the Stream Output operator is called SuspiciousTransactions, then the WSDL document contains an operation called SuspiciousTransactions and a message called SuspiciousTransactions_Msg.

To Create a Stream Output Operator

  1. Drag a Stream Output operator from the Palette to the Design view.
  2. Connect the input of the Stream Output operator to an operator that has stream output.
  3. Double-click the Stream Output operator.

    The property editor opens. Notice that the component has inherited the schema of its input stream.

  4. If you want to change the default name, then change the value in the Name field.
  5. If you want to include a timestamp on the output, then select the Include Timestamp check box.
  6. (Optional) Click the Documentation tab and supply notes on this component.
  7. Click OK.

Table Output

The Table Output operator provides static output in the form of relational tables.

Use the Table Output operator to provide relational table output from an event processor.

To Create a Table Output Operator

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

    The property editor opens.

  3. If you want to share the table related to the Table Output with other IEP processes or other applications, then select the isGlobal parameter.

    The table related to the Table Output is created if it does not exist. The table remains after the undeployment or redeployment of the IEP process that contains it. IEP generates an additional column for every table that is output.