Oracle Event Processing application development tasks can be performed in a number of ways in Oracle JDeveloper with SOA Product Components for the 12c release. If you are new to Oracle JDeveloper, you will discover other ways to locate the same tasks as you become more familiar with it.
For more information, see http://www.oracle.com/technetwork/middleware/complex-event-processing/downloads/index.html.
The following section describes one way to locate each task. This chapter covers the following topics:
JDeveloper provides accessibility options, such as support for screen readers, screen magnifiers, and standard shortcut keys for keyboard navigation. You can also customize JDeveloper for better readability, including the size and color of fonts and the color and shape of objects.
For information and instructions on configuring accessibility in JDeveloper, see Oracle JDeveloper Accessibility Information in Oracle Fusion Middleware Using Visualizer for Oracle Stream Analytics.
When you launch Oracle JDeveloper in the Studio Developer (All Features) role, it provides a full feature set for creating Oracle Event Processing applications. Figure 2-1 shows an Oracle Event Processing application open in Oracle JDeveloper.
Figure 2-1 An Oracle Event Processing Application in Oracle JDeveloper
Use the Window menu to display the Oracle JDeveloper windows you need, such as the Components window.
See Components Window.
Use the File menu to create the following project files.
Select File > New > Application > OEP Application.
An application is a container for projects.
Select File > New > Project > OEP Project.
You add projects to applications.
Select File > Import > OEP Bundle into New Project.
You can add an existing project to the application. Use this option to import an Eclipse project as described in Import an Eclipse Project into Oracle JDeveloper.
Select File > New > Project > OEP Library Project.
Add libraries to your projects to provide additional functionality such as utilities and common Java classes that can be shared across projects.
When you create a project, you can choose from a selection of Oracle Stream Analytics application templates on which to base the project.
The templates provide basic functionality including an EPN and the assembly and configuration files for the following types of projects:
Empty OEP Project template that provides the basic structure for an empty Oracle Event Processing application. Use this application template when none of the other templates meet your needs.
FX template that simulates a foreign currency exchange application.
Hello World template that provides a simple application that sends the Hello World message to the server console.
Signal Generation template that simulates receiving stock market events and generating signals for changes in the price or volume.
The assembly file is a context file that describes the EPN diagram stages and structure. The component configuration file describes component configuration and the dynamic parameters of the EPN stages. An application can have one or more assembly files and one or more configuration files.
Oracle JDeveloper provides default assembly and configuration files that it creates when you add components to the EPN and make connections. By default, the assembly file name is
<Project_Name>.context.xml, and the configuration file name is
When you add components to the EPN, you can change the default configuration file name to another file. If the alternate file already exists, Oracle JDeveloper saves the configuration in that file. If the file does not already exist, Oracle JDeveloper creates the file. For example, you might want to store all adapter configuration information in the
adapter.xml configuration file.
You can also explicitly create assembly and configuration files. See Assembly and Configuration Files.
Set the Path to Project Source Files.
To set the path to the Oracle Stream Analytics source files, select the project and select Edit > Properties > Project Source Paths.
In the Applications window, select and right-click an Oracle Stream Analytics project to display a context menu.
Open EPN Diagram: Displays the Oracle Event Processing EPN diagram. See EPN Diagram Features.
Configure JDBC Context: Use this option to configure a JDBC context. A JDBC context defines an application context for an instance of an Oracle JDBC data cartridge. Use this option only when you use a non-Oracle JDBC driver.
Configure Spatial Context: Use this option to configure a spatial context to manage a large number of moving objects such as complex polygons and circles, 3D positioning, and spatial clustering.
Deploy > oep-profile: Use this option to select an Oracle Event Processing deployment bundle or to assemble a new deployment bundle.
Deploy > New Deployment Profile: Create a deployment profile for your application. An application can have any number of deployment profiles.
Encryption Manager: Use this option to encrypt the application.
You cannot import a zip or JAR file from the command line
Use Import > OEP Bundle into New Project to import a zip or JAR file into Oracle JDeveloper.
The EPN diagram has a number of features that you can use when you create and edit an EPN. The EPN diagram uses an optimized layout by default. After you add, move, or delete components from the EPN diagram, the diagram updates and adjusts the layout.
Open the EPN Diagram
Expand [ProjectName] > OEP Content.
Double-click EPN Diagram.
The EPN diagram opens in the EPN Types tab in the middle pane. Next to the EPN tab is the Event Types tab. The Event Types tab enables you to create an event type. EPN tabs also display at the bottom of the left pane: EPN Diagram - Structure and Thumbnail. The structure view shows the EPN diagram component tree.
Create an Event Type
Open the EPN Diagram.
The EPN diagram opens in the EPN tab in the middle pane.
Select the Event Types tab next to the EPN tab.
Provide the event type information.
See Create an Event Type to Carry Event Data for information on how to create an event.
Drag a component from the Components window onto an empty area in the EPN to build the EPN diagram. See Components Window.
Right-click the component and select Delete from the context menu or select the component and press the Delete key.
Select the component on the EPN diagram.
Oracle JDeveloper highlights the component.
Click the component name.
The in-line name editor displays.
Change the name.
Click an empty area on the EPN diagram.
The in-line name editor closes.
You can edit an EPN through different Oracle JDeveloper editors: XML Source code, property sheets, EPN Diagram, Manifest Editor, and so on. Validation annotations to indicate errors show in all editors. The editors provide the following features when you create Oracle CQL statements:
<query id="helloworldRule"> <![CDATA[ select :1 from helloworldInputChannel ]]> <bindings> <binding id="helloworldRule"> <params id="param1">'My message is here: ' || message as message</params> </binding> </bindings>
A badge is a small icon that displays on a stage. The badge displays additional information about the component. For example, if there is a validation error or warning related to the component, the EPN editor displays the error or warning badge on that component. When the situation causing the badge to appear resolves, the badge disappears.
Mouse over the badge to display the associated messages. Mouse click on the annotation badge to display the associated messages and a link to detailed information.
Zoom In or Out
You can zoom in or out on the EPN diagram in the following ways:
Press the Ctrl key and mouse scroll.
On the editor tool bar, choose a zooming value from the list of predefined zooming values.
Select or open the thumbnail panel and use the mouse scroll.
Print the EPN Diagram
With the EPN editor open, select File > Print Preview.
In the Print Preview dialog, review the settings and click Print.
Export the EPN Diagram to an Image
Select Diagram > Publish Diagram.
Enter a file name and choose the appropriate file type.
When you define a child stage inside a parent stage, the child stage is nested. The nested stage is visible in the EPN diagram in an indented box. You cannot edit nested stages, but you can delete them.
Only the parent stage can specify the child stage as a listener. You can drag references from a nested element, but you cannot drag references to a nested element.
A foreign component (foreign stage) is a component that is defined in a different application. On an EPN diagram, a foreign stage is visible as a ghost component. To reference a foreign stage, use the following syntax in the assembly file:
When you reference foreign stages, you must consider foreign stage dependencies when assembling, deploying, and redeploying an application.
The Components window provides the Oracle Stream Analytics components for building an EPN. You drag the component you want to add to your EPN to a blank area on the EPN canvas and use the component wizard to configure it. You add the component to the EPN by dragging a component already in the diagram to the new component. The new component is placed to the right of the component that you dragged.
See Create a Basic Application for step-by-step instructions.
The following list describes the components available on the Components window.
Base EPN Components:
Adapter: Use an adapter to connect the EPN to external input or output data sources. The Adapter component represents a generic adapter that you can customize for your application requirements.
Bean: Use a bean to define application event logic written in the Java programming language that conforms to standard Spring-based beans. See http://www.springsource.org/spring-framework.
Cache: Use a cache to set up an area of random access memory (RAM) that holds copies of recently accessed data for ready access by an application. You must have a Cache System component in the EPN to add a Cache component.
Channel: Use a channel to transfer events from stage to stage in the EPN.
Event Bean: Use an event bean to define application event logic written in the Java programming language that conforms to the JavaBeans specification. The event bean is an Oracle extension to the regular Spring-based bean.
Processor: Use a processor when you want to add Oracle CQL query code to your application. Oracle CQL can read from the big data Hadoop and NoSQLDB components.
Table: Use a table as an external relation source. You can also use a table to store events in the database by configuring the table as a listener of an upstream component.
CSVInbound: Use a CSVInbound adapter to accept data in the form of comma-separated values entering the EPN.
CSVOutbound: Use a CSVOutbound adapter to send data in comma-separated values out of the EPN.
JMS Inbound: Use a JMS Inbound adapter to accept Java Message Service (JMS) topics entering the EPN.
JMS Outbound: Use a JMS Outbound adapter to send JMS topics out of the EPN.
REST Inbound: Use a REST Inbound adapter to consume events from
HTTP Post requests.
REST Outbound: Use a REST Outbound adapter to receive events processed by the EPN.
Big Data Extensions
Hadoop: A data cartridge extension for an Oracle CQL processor to access large quantities of data in a Hadoop distributed file system (HDFS). HDFS is a non-relational data store.
NoSQLDB: A data cartridge extension for an Oracle CQL processor to access large quantities of data in an Oracle NoSQL Database. The Oracle NoSQLDB Database stores data in key-value pairs.
HBase: A data cartridge extension for an Oracle CQL processor to access large quantities of data in an HBase Database.
Coherence Cache System: Use a Coherence Cache System component to set up a system to maintain consistent data that is stored in local caches on a shared resource.
Local Cache System: Use a Local Cache System to speed up network access to data files.
See Use Oracle CQL Patterns for information about how to use the patterns.
Averaging Rule: Use an Averaging Rule component to compute an average over a specified number of events (table rows).
Detect Missing Event Rule: Use a Detect Missing Event Rule component to detect when an expected event does not occur.
Partitioning Rule: Use a Partitioning Rule component to partition the event panel by an event property and display the specified number of events in the partition.
Select With Subsequent Filtering Query: Use a Select with Subsequent Filtering Query component to filter events to populate the view with events that pass the filter criteria.
Select From Multiple Streams: Use a Select From Multiple Streams component to join two streams to select from correlated events.
Select With From: Use a Select With From component to select events from a channel according to the specified properties.
Select With Pattern Matching: Use a Select With Pattern Matching component to select events from a channel according to specified property values.
Oracle JDeveloper does not have an Oracle CQL visual editor.
RMIInbound: Use an RMIInbound adapter to receive incoming data sent from Oracle WebLogic Server over the remote method invocation (RMI) protocol.
RMIOutbound: Use an RMIOutbound adapter to send data to Oracle WebLogic Server over the RMI protocol.
EDNInbound: Use an EDNInbound adapter to receive incoming data from the Oracle SOA Suite event network.
EDNOutbound: Use an EDNOutbound adapter to send outbound data to the Oracle SOA Suite event network.
Each stage on the EPN editor has a group of context menu items that provide convenient access to various stage-specific functions. Right-click the stage to display its context menu. Using the context menu, you can edit the stage configuration.
For different stages, though the stage wizard is the same, the parameter values and some of the options are greyed out that are read-only.
Add Configuration Source: Adds a configuration file to the project.
Define Java Class: Opens a wizard to that you can create a Java class.
Delete Configuration Source. Deletes a configuration file from the project.
Go to Configuration Source: Opens the corresponding component configuration file and positions the cursor in the appropriate element.
Go to Assembly Source: Opens the corresponding EPN assembly file and positions the cursor in the appropriate element.
Go to Java Source: Opens the corresponding Java source file for this component.
Encryption Manager: Allows to edit all encrypted passwords in one place. This option is enabled on whole EPN diagram and project.
Delete: Deletes the component from both the EPN assembly file and component configuration file (if applicable).
Note:These navigation options become disabled when a corresponding source artifact cannot be found. For example, if an adapter does not have a corresponding entry in a configuration XML file, its Go to Configuration Source menu item is greyed out.