Oracle® CEP Visualizer User's Guide Release 11gR1 (11.1.1) Part Number E14302-02 |
|
|
View PDF |
This section contains the typical application tasks you can perform with Oracle CEP Visualizer.
Oracle CEP Visualizer is fairly self-explanatory and intuitive, so not all tasks are discussed here, but rather, just those that are most common and typical and from which other similar tasks can be deduced.
This chapter describes:
Using Oracle CEP Visualizer, you can perform a variety of application management tasks, including managing:
The Oracle CEP Event Processing Network (EPN) represents the interconnections between the various Oracle CEP components of an Oracle CEP application. Using Oracle CEP Visualizer, you can manage the EPN, including viewing and changing the configuration of a stage, recording and playing back events, and monitoring the throughput and latency of a stage or path.
For more information, see:
"Components of the Oracle CEP Event Processing Network" in the Oracle CEP IDE Developer's Guide for Eclipse
You can manage the full application lifecycle including uploading an application, deploying it, suspending and resuming the application, and undeploying the application.
For more information, see:
"Oracle CEP Application Lifecycle" in the Oracle CEP IDE Developer's Guide for Eclipse
You can create, replace, and delete the rules in the Oracle CQL and EPL processors of Oracle CEP applications you develop and deploy as well as applications that Oracle CEP server deploys.
It is important to note that Oracle CEP Visualizer will update your configuration file on the server with any queries that you create. However, you will not see this take effect in your application from within the Oracle CEP IDE for Eclipse, in order to make the change there you will need to copy and paste the query from Oracle CEP Visualizer into your application.
For more information, see:
This section describes:
Section 2.2.2, "Viewing and Changing the Configuration of a Stage"
Section 2.2.3, "Recording and Playing Back Events Flowing Through an EPN"
Section 2.2.4, "Monitoring the Throughput and Latency of a Stage or Path in the EPN"
For more information, see Section 2.1.1, "Event Processing Network (EPN)".
Using the Oracle CEP Visualizer, you can view the EPN of a deployed application.
To view the EPN of an application:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Select appname, where appname is the name of the application whose EPN you want to view.
In the right pane, click the Event Processing Network tab.
The Event Processor Network panel is displayed as Figure 2-1 shows.
Figure 2-1 Event Processing Network Panel
The name of a stage appears above the stage in black text. For example, the first Oracle CQL processor is named FindCrossRates
and the name of its inbound channel is FxQuoteStream
.
The name of the event type transmitted on a given channel is shown above the connecting line in blue text. For example, the event type transmitted on the FxQuoteStream
is StockTick
.
To navigate to areas of the EPN that are off the screen, click in the miniature EPN view, and drag.
To change the layout of the EPN, select a layout option from the Layout menu:
organic
tree
hierarchic
(default)
balloon
orthogonal
To change the way the EPN fits in the browser window:
Click on the Zoom slider and drag to the right to increase the zoom level; drag left to decrease the zoom level.
Click the Fit Content button to automatically adjust the zoom level to make all of the EPN visible in the browser window; click the Actual Size button to reset the zoom level to zero.
Click the Zoom Out (+) button or Zoom In (-) button.
Using Oracle CEP Visualizer, you can view the configuration of any stage and change the configuration for some stages.
To view and change the configuration of a stage:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Select appname, where appname is the name of the application you want to record and playback events with.
Select the stage you wish to view and configure:
To use the EPN diagram:
Click the Event Processing Network tab.
Double-click the stage you wish to view.
To use the domain tree:
Expand the appname > Stages node, where appname is the name of the application you want to view.
Click the stage you wish to view.
In the right pane, click the General tab
The stage's configuration appears.
For example, Figure 2-2 shows the General tab for a channel.
Figure 2-2 General Tab for Channel Stage: Before Clicking Edit
Note:
Not all stage's configuration can be updated by Oracle CEP Visualizer. An Edit button will appear if the configuration can be updated.For a description of the configuration properties for each possible stage, see:
Click the Edit button, if present.
Modifiable attributes become editable as Figure 2-3 shows.
Figure 2-3 General Tab for Channel Stage: After Clicking Edit
Enter new values for editable fields.
For example, for the Max Size and Max Threads fields in Figure 2-3.
To commit your changes, click Save.
To leave the configuration unchanged, click Cancel.
Figure 2-4 shows the General tab for a channel stage.
After you click Edit, you can modify the attributes that Table 2-1 describes.
Table 2-1 General Tab Editable Properties: Channel
Attribute | Description |
---|---|
|
Specifies the maximum size of the channel. Zero-size channels synchronously pass-through events. Non-zero size channels process events asynchronously, buffering events by the requested size. The default value is 1024. |
|
Specifies the maximum number of threads that will be used to process events for this channel. You can change If the The default value for this attribute is 1. |
|
The name of the event type that this channel carries. |
|
Use this element to specify whether or not the channel is application timestamped, that is, if the application is responsible for assigning a timestamp to each event, using any time domain. Valid values are:
For more information, see child element |
|
Use this element to specify an expression to be used as an application timestamp for event processing. Valid values are any Oracle CQL arithmetic expression For more information, see "arith_expr" in the Oracle CEP CQL Language Reference. |
|
For system timestamped relations or streams, time is dependent upon the arrival of data on the relation or stream data source. Oracle CEP generates a heartbeat on a system timestamped relation or stream if there is no activity (no data arriving on the stream or relation's source) for more than this number of nanoseconds. Either the relation or stream is populated by its specified source or Oracle CEP generates a heartbeat every Note: This attribute is only applicable when a non-streaming source is connected to the channel. For more information, see "heartbeat" in the Oracle CEP IDE Developer's Guide for Eclipse. |
|
Indicates if application time published is always strictly greater than the last value used. Valid values are For more information, see attribute |
For more information, see "channel" in the Oracle CEP IDE Developer's Guide for Eclipse.
Figure 2-5 shows the General tab for an outbound channel stage (a channel stage with an upstream Oracle CQL processor). The Channel Parameter accordion tab is selected.
Figure 2-5 General Tab Outbound Channel Parameters
After you click Edit, you can modify the attributes that Table 2-2 describes.
Table 2-2 General Tab Editable Properties: Outbound Channel
Figure 2-6 shows the General tab for a channel stage (with an upstream Oracle CQL processor). The Selectors accordion tab is selected.
Figure 2-6 General Tab Selectors for Outbound Channel Stage
The Selector tab is only applicable if the up-stream node is an Oracle CQL processor.
After you click Edit, use the Selector tab, you can specify which up-stream Oracle CQL processor queries are permitted to output their results to the channel:
Select an up-stream Oracle CQL processor from the Processor pull-down menu.
The available Oracle CQL rules associated with the selected processor are listed below the pull-down menu.
Use the left and right-pointing arrow buttons to move one or more rules to the Selected Queries list.
Only rules in the Selected Queries list will output events to the channel.
Note:
For more information on selectors, see "Configuring a Channel" in the Oracle CEP IDE Developer's Guide for Eclipse.For more information, see "channel" in the Oracle CEP IDE Developer's Guide for Eclipse.
Figure 2-7 shows the General tab for a stream stage.
After you click Edit, you can modify the attributes that Table 2-3 describes.
Table 2-3 General Tab Editable Properties: Stream
Table 2-3 shows the General tab for an Oracle CQL processor stage.
Figure 2-8 General Tab for Oracle CQL Processor Stage
There are no editable properties for this type of stage.
For more information, see "processor (Oracle CQL)" in the Oracle CEP IDE Developer's Guide for Eclipse.
Figure 2-9 shows the General tab for an EPL processor stage.
Figure 2-9 General Tab for EPL Processor Stage
There are no editable properties for this type of stage.
For more information, see "processor (EPL)" in the Oracle CEP IDE Developer's Guide for Eclipse.
Figure 2-10 shows the General tab for an adapter stage.
Figure 2-10 General Tab for an Adapter Stage
There are no editable properties for this type of stage.
For more information, see "adapter" in the Oracle CEP IDE Developer's Guide for Eclipse.
Figure 2-12 shows the General tab for a JMS adapter.
Figure 2-11 General Tabl for a JMS Adapter Stage
There are no editable properties for this type of stage.
For more information, see "adapter" in the Oracle CEP IDE Developer's Guide for Eclipse.
Figure 2-12 shows the General tab for an event bean stage.
Figure 2-12 General Tab for Event Bean Stage
There are no editable properties for this type of stage.
For more information, see "event-bean" in the Oracle CEP IDE Developer's Guide for Eclipse.
Figure 2-13 shows the General tab for a Plain Old Java Object (POJO) stage.
There are no editable properties for this type of stage.
Figure 2-14 shows the properties for an Oracle CEP Local Cache stage.
Figure 2-14 Oracle CEP Local Cache Stage Properties
After you click Edit, you can modify the attributes that Table 2-4 describes.
Table 2-4 Editable Properties: Oracle CEP Local Cache
Attribute | Description |
---|---|
|
Specifies the |
|
Specifies the number of milliseconds a cache entry may not be accessed before being actively removed from the cache. By default, there is no |
|
Specifies how Oracle CEP server writes information into the cache. Valid values are:
|
|
Use this element to define the eviction policy the cache uses when Valid values are:
|
|
Specifies the maximum amount of time, in milliseconds, that an entry is cached. Default value is 0 (which means infinite). |
For more information, see "cache" in the Oracle CEP IDE Developer's Guide for Eclipse.
Figure 2-15 shows the properties for an Oracle Coherence Cache stage.
Figure 2-15 Oracle Coherence Cache Stage Properties
There are no editable properties for this type of stage.
For more information, see:
The event repository feature of Oracle CEP allows you to record events flowing through an event processing network (EPN) and store them so you can later play back the events. You configure the recording and playing back of events per stage, such as a processor or stream. Additionally, only events coming out of an event source can be recorded, and playback is possible only on event sinks (events are played back to the inbound side of the event sink stage.)
The only configuration options of record and playback that you can control using Oracle CEP Visualizer are event type, time, and speed.
For detailed information about how event and record playback works and how to configure a component, see "Configuring Event Record and Playback" in the Oracle CEP IDE Developer's Guide for Eclipse.
For an example, see "Event Record and Playback Example" in the Oracle CEP Getting Started.
This section describes:
Using Oracle CEP Visualizer you can record events for a selected stage. Later, you can playback these events (see Section 2.2.3.2, "How to Playback Events").
To record events:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Select appname, where appname is the name of the application you want to record and playback events with.
In the right pane, click the Event Processing Network tab.
The Event Processor Network panel is displayed as Figure 2-16 shows.
Figure 2-16 Event Processing Network Panel
Select the stage for which you wish to record an event:
To use the EPN diagram:
Right-click the stage for which you wish to record an event and select Record Event.
To use the domain tree:
Expand the appname > Stages node, where appname is the name of the application you want to record and playback events with.
Click the stage for which you wish to record an event.
In the right pane, click the Record tab
The Record panel appears as shown in Figure 2-17.
The Record tab in Oracle CEP Visualizer for a particular stage is divided into the following sections:
Recording Current Status: displays the current status of a recording. When the system has begun a recording session, then this field displays a blinking Recording message and it changes back to blank when the recording sessions ends. This section is read-only.
Recording Parameters: specifies the name of the database schema (Dataset name) and the provider information. You must pre-configure the provider for the event repository.
For more information, see:
"Storing Events in the Persistent Event Store" in the Oracle CEP IDE Developer's Guide for Eclipse
Event Type List: contains the Event Type List pane that displays the list of event types that are associated with a selected stage of the Oracle CEP application. Choose one or more events to record.
Record Schedule Entry: entries in this table displays the recording start time and end time for an event type. The fields in this table are disabled by default. Click Update Record to enable the fields in this table. The start and end time entries are optional fields, to start recording immediately, click the Start Recording button at the bottom of the panel.
Change Recording Schedule: allows you to change some of the properties of your existing recording entry. Certain properties, such as the event type, cannot be changed using Oracle CEP Visualizer. Use the calendar and clock controls to specify or change an existing start and end time for recording events.
Decide what you want to do:
To add a new record schedule entry, click Add.
To modify an existing record schedule entry, select the entry in the Record Schedule Entry table and click Edit.
To delete an existing record schedule entry, select the entry in the Record Schedule Entry table and click Delete.
Configure the Recording Parameters:
DataSet Name
: the value of the record-parameters
child element dataset-name
element from the simpleEventSource
adapter application configuration file ORACLE-CEP-HOME
\ocep_11.1\samples\domains\recplay_domain\defaultserver\applications\recplay\config.xml
as Example 2-1 shows.
Example 2-1 recplay Application Configuration File config.xml: adapter Element
<adapter> <name>simpleEventSource</name> <record-parameters> <dataset-name>recplay_sample</dataset-name> <event-type-list> <event-type>SimpleEvent</event-type> </event-type-list> <provider-name>test-rdbms-provider</provider-name> <batch-size>1</batch-size> <batch-time-out>10</batch-time-out> </record-parameters> </adapter>
Provider Name
: the value of the rdbms-event-store-provider
child element name
which corresponds to the data-source
child element name
as Example 2-2 shows.
Example 2-2 recplay Oracle CEP Server Configuration File config.xml: data-source and rdbms-event-store-provider Elements
<data-source> <name>derby1</name> <connection-pool-params> <initial-capacity>15</initial-capacity> <max-capacity>50</max-capacity> </connection-pool-params> <driver-params> <url>jdbc:derby:dbtest1;create=true</url> <driver-name>org.apache.derby.jdbc.EmbeddedDriver</driver-name> </driver-params> </data-source> <rdbms-event-store-provider> <name>test-rdbms-provider</name> <data-source-name>derby1</data-source-name> </rdbms-event-store-provider>
For more information, see Section 3.4, "Managing Data Sources".
Configure the Event type list:
Use the left and right-pointing arrow buttons to move the events you want recorded from the Available event list to the Recorded event list.
For more information, see Section 3.6, "Managing the Event Type Repository".
Decide when you want recording to start and end:
If you want to schedule a record start and end time:
Click the calendar and clock controls to add a start time and end time.
Click Save.
An alert dialog appears as Figure 2-18 shows.
Figure 2-18 Record Schedule Confirmation Dialog
Click OK.
If you want to record events immediately:
Click Save.
An alert dialog appears as Figure 2-18 shows.
Figure 2-19 Record Schedule Confirmation Dialog
Click OK.
Click Start.
Oracle CEP Visualizer keeps track of whether a particular stage is currently recording or playing back events; based on this information, the Start and End buttons may be enabled or disabled as appropriate.
When you start recording using Oracle CEP Visualizer, Oracle CEP uses the event type information from your record entry and begins recording immediately; the pre-scheduled time, if any, remains unchanged. Use the End button to stop recording of your session immediately.
Decide when you want to stop recording:
If you scheduled a stop time, event recording will stop at that time.
If you want to stop event recording immediately, click Stop.
Using Oracle CEP Visualizer you can playback previously recorded events (see Section 2.2.3.2, "How to Playback Events") for a selected stage.
To playback events:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Select appname, where appname is the name of the application you want to record and playback events with.
In the right pane, click the Event Processing Network tab.
The Event Processor Network panel is displayed as Figure 2-20 shows.
Figure 2-20 Event Processing Network Panel
Select the stage for which you wish to playback an event:
To use the EPN diagram:
Right-click the stage for which you wish to record an event and select Playback Event.
To use the domain tree:
Expand the appname > Stages node, where appname is the name of the application you want to record and playback events with.
Click the stage for which you wish to record an event.
In the right pane, click the Playback tab
The Record panel appears as shown in Figure 2-21.
The Playback tab in Oracle CEP Visualizer for a particular stage is divided into the following sections:
Playback Current Status: displays the current status of playback. When the system has begun playing back a session, then this field displays a blinking Playback message and it changes back to blank when the playback session ends. This section is read-only.
Playback Parameters: specifies the name of the database schema (Dataset name) and the provider information. You must pre-configure the provider for the event repository.
For more information, see:
"Storing Events in the Persistent Event Store" in the Oracle CEP IDE Developer's Guide for Eclipse
Event Type List: contains the Event Type List pane that displays the list of event types that are associated with a selected stage of the Oracle CEP application. Choose one or more events to playback.
Playback Filter Entry: specify a set of filters using the clock and time controls, to run a playback for an event type in event type repository. Only events that were recorded during the start and end times you specify here will be played back.
Playback Schedule Entry: entries in this table displays the playback start time and end time for an event type. The fields in this table are disabled by default. Click Update Playback to enable the fields in this table. The start and end time entries are optional fields, to start recording immediately, click the Start Playback button at the bottom of the panel.
Change Playback Filter Parameters: allows you to change some of the properties of the selected playback filter entry.
Change Playback Schedule Parameters: allows you to change some of the properties of the selected playback schedule entry. Use the calendar and clock controls to specify or change an existing start and end time for playing back events.
Configure the Playback Parameters:
DataSet Name
: the value of the record-parameters
child element dataset-name
element from the simpleEventSource
adapter application configuration file ORACLE-CEP-HOME
\ocep_11.1\samples\domains\recplay_domain\defaultserver\applications\recplay\config.xml
as Example 2-3 shows.
Example 2-3 recplay Application Configuration File config.xml: stream Element
<stream> <name>eventStream</name> <playback-parameters> <dataset-name>recplay_sample</dataset-name> <event-type-list> <event-type>SimpleEvent</event-type> </event-type-list> <provider-name>test-rdbms-provider</provider-name> </playback-parameters> <max-size>10000</max-size> <max-threads>2</max-threads> </stream>
Provider Name
: the value of the rdbms-event-store-provider
child element name
which corresponds to the data-source
child element name
as Example 2-4 shows.
Example 2-4 recplay Oracle CEP Server Configuration File config.xml: data-source and rdbms-event-store-provider Elements
<data-source> <name>derby1</name> <connection-pool-params> <initial-capacity>15</initial-capacity> <max-capacity>50</max-capacity> </connection-pool-params> <driver-params> <url>jdbc:derby:dbtest1;create=true</url> <driver-name>org.apache.derby.jdbc.EmbeddedDriver</driver-name> </driver-params> </data-source> <rdbms-event-store-provider> <name>test-rdbms-provider</name> <data-source-name>derby1</data-source-name> </rdbms-event-store-provider>
For more information, see Section 3.4, "Managing Data Sources".
Configure the Event type list:
Use the left and right-pointing arrow buttons to move the events you want played back from the Available event list to the Playback event list.
For more information, see Section 3.6, "Managing the Event Type Repository".
Decide what you want to do:
To add a new playback schedule entry, click Add.
To modify an existing playback filter entry, select the entry in the Playback Filter Entry table and click Edit.
To modify an existing playback schedule entry, select the entry in the Playback Schedule Entry table and click Edit.
To delete an existing playback filter or schedule entry, select the entry in the appropriate table and click Delete.
Decide when you want playback to start and end:
If you want to create a new playback filter entry:
Click the calendar and clock controls in the Change Playback Filter Parameters area to add a start time and end time.
Click Save.
An alert dialog appears as Figure 2-22 shows.
Figure 2-22 Playback Schedule Confirmation Dialog
Click OK.
If you want to create a new playback schedule entry:
Click the calendar and clock controls in the Change Playback Schedule Parameters area to add a start time and end time and to specify a speed and repeat mode.
Speed: the default speed value is 1, which corresponds to normal speed. A value of 2 means that events will be played back 2 times faster than the original record speed. Similarly, a value of 0.5 means that events will be played back at half the speed.
Repeat: set this to true
to repeat playback until the scheduled end time or until you stop playback manually; set this to false
to playback only once.
Click Save.
An alert dialog appears as Figure 2-23 shows.
Figure 2-23 Playback Schedule Confirmation Dialog
Click OK.
If you want to playback events immediately:
Click Save.
An alert dialog appears as Figure 2-18 shows.
Figure 2-24 Playback Schedule Confirmation Dialog
Click OK.
Click Start.
Oracle CEP Visualizer keeps track of whether a particular stage is currently recording or playing back events; based on this information, the Start and End buttons may be enabled or disabled as appropriate.
When you start playback using Oracle CEP Visualizer, Oracle CEP uses the event type information from your playback entry and begins playback immediately; the pre-scheduled time, if any, remains unchanged. Use the End button to stop playback session immediately.
Decide when you want to stop playback:
If you scheduled a stop time, event playback will stop at that time.
If you want to stop event playback immediately, click Stop.
You can use Oracle CEP Visualizer to monitor the entry and exit points of a stage, or a specified path, of the event processing network (EPN) of an application. Oracle CEP defines the following metrics that you can monitor for each stage or path:
Throughput
: The number of events processed by the stage.
Average Latency
: The average amount of time it takes an event to pass through a specified path of the EPN, or latency.
Maximum Latency
: The maximum amount of time it takes an event to pass through a specified path of the EPN.
Average Latency Threshold
: Calculates the average latency values greater than the specified threshold value for specified start and end points.
The Oracle CEP Visualizer monitoring feature is itself implemented as an Oracle CEP application; this means that the diagnostic information can be viewed as an event, and the application uses EPL rules to process these diagnostic events.
To monitor the throughput and latency of a stage or path in the EPN:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Select appname, where appname is the name of the application you want to record and playback events with.
Select the stage you wish to view and configure:
To use the EPN diagram:
Click the Event Processing Network tab.
Double-click the stage you wish to monitor or the first stage in the path that you want to monitor.
To use the domain tree:
Expand the appname > Stages node, where appname is the name of the application you want to monitor.
Click the stage you wish to monitor or the first stage in the path that you want to monitor.
In the right pane, click the General tab
The stage's General tab appears. For example, Figure 2-25 shows the General tab for a channel.
Figure 2-25 General Tab for Channel Stage
Click the Create Diagnostics button.
A New Latency Profile accordion menu appears as shown in Figure 2-26. It contains the following tabs:
Profile Information
Latency
Throughput
Click the Profile Information tab in the accordion menu as shown in Figure 2-26 and enter the information that Table 2-5 lists.
Figure 2-26 New Latency Profile Screen - Profile Information Tab
Click the Latency tab in the accordion menu as shown in Figure 2-27 and enter the information that Table 2-6 lists.
Figure 2-27 New Latency Profile Screen - Latency Tab
Table 2-6 Latency Attributes
Attribute | Description |
---|---|
|
Specifies that you want to monitor the maximum amount of time it takes for events to flow through a stage or a subset of the event processing network (path). |
|
Specifies that you want to monitor the average amount of time it takes for events to flow through a stage or a subset of the event processing network (path) |
|
Specifies the time interval for which you want to gather diagnostic data. In other words, the sliding window across which the Average Latency Metic is computed. This value is enabled only if you specify Max Latency Metric. |
|
Specify a value if you are interested in only receiving latency metrics that exceed a certain value. For example, if you would like to know when the latency exceeds 250 ms, specify a This value is enabled only if you specify Average Latency Metric. |
|
Specifies the name that you have provided for the start stage. If you want to monitor just the current stage, rather than a path in the EPN, then set the Start Stage Name and End Stage Name to the name of the current stage. Select Entry for the Start Stage Name option and Exit for the End Stage Name. |
|
Specifies the name that you have provided for the end stage. If you want to monitor a path in the EPN, Oracle CEP Visualizer assumes that the current stage is the start of the path, and thus automatically selects it for the Start Stage Name field. Specify whether the start of the path should be the Entry or Exit of the current stage. Then, select the End Stage Name, or the end of the path you want to monitor, and specify whether the end of the path should be the Entry or Exit of the stage |
Click the Latency tab in the accordion menu as shown in Figure 2-27 and enter the information that Table 2-6 lists.
Figure 2-28 New Latency Profile Screen - Throughput Tab
Table 2-7 Throughput Attributes
Attribute | Description |
---|---|
|
Specifies that you want to monitor the average throughput of events flowing through the stage. |
|
Specify whether you want to monitor the throughput at the entry or exit of the stage |
|
Specifies the period of time for which the throughput is calculated. For example, if you specify a Specify the time unit as Second, Millisecond, or Microsecond. |
|
Specifies the interval for gathering the average throughput. For example, if you specify a Specify the time unit as Second, Millisecond, or Microsecond. |
Click Save.
A pop-up confirmation dialog appears in the lower-right corner of the panel.
The saved diagnostic profile appears in the left domain tree, under the stage from which you created it, as shown in Figure 2-29.
Figure 2-29 Left Domain Tree - Mydiagprofile
Note:
You can now restart a server or undeploy an application without losing the diagnostic profile you created.Click OK.
Add the diagnostic profile to the Oracle CEP Visualizer Dashboard:
Select the diagnostic profile in the left domain tree and click the Add to Dashboard button.
Click the Dashboard link at the top of Oracle CEP Visualizer and drag and drop the diagnostic profile you created from the domain tree in the left pane to the table at the bottom of the right pane.
Click the Dashboard link at the top of Oracle CEP Visualizer.
The Dashboard screen is displayed with the Management Events and Performance Monitoring panes as Figure 2-30 shows.
Click the name of the diagnostic profile in the table.
The latency and throughput information is displayed in the graphs in the middle of the dashboard as Figure 2-30 shows.
Figure 2-30 Oracle CEP Visualizer Dashboard With Diagnostic Profiles
To expand the performance monitoring graphs to fill the screen, click Expand Chart.
To restore the performance monitoring graphs to their original size, click Restore Chart.
The Management Events section at the top of the Dashboard displays alerts about the incoming monitoring events. The Oracle CEP monitoring feature defines a set of default EPL rules that specify when these alerts show up in the Management Events table. You can change the EPL rules to customize this behavior, as described in Section 2.5.4, "Changing the dataservices Application Event Filter Rule Using EPL."
Section 2.3.1, "Deploying an Application in a Standalone-Server Domain"
Section 2.3.2, "Deploying an Application in a Multi-Server Domain"
For more information, see Section 2.1.2, "Application Lifecycle".
Deploying an application refers to uploading to the server the JAR file that contains the application and then installing it, which makes it available to clients.
Oracle CEP internally deploys an application as a two step processes. The first step involves starting the application bundle inside the OSGi container. The second step involves starting and initializing the application. Because the second step is asynchronous in nature, Oracle CEP Visualizer does not wait for the completion of the second operation. As soon as the application has successfully started, Oracle CEP Visualizer's navigation tree will be updated automatically with the new deployment and a successful message will be send to the dashboard. However, if the application fails to start, you must check for errors on the server side because no messages/updates will occur on the Oracle CEP Visualizer.
This section describes how to deploy an application to a standalone-server domain. For information on deploying an application in a multi-server domain, see Section 2.3.2, "Deploying an Application in a Multi-Server Domain".
To deploy an application in a standalone-server domain:
In the left pane, navigate to and select the Deployment node.
The Deployed Applications table is displayed in the Deployment screen on the right pane.
Click the Install button.
The Install Application screen is displayed.
Click the Upload tab.
Click the ... button to open a file browsing window.
Browse to the local directory that contains the JAR file of the application you want to install and click Open.
Click Upload.
In the Install Application tab, the JAR file appears in the table of uploaded files, as shown in Figure 2-31.
Figure 2-31 The Install Application Screen: Standalone-Server Domain
If you want the application JAR file removed from the Oracle CEP server after deploying, check the Remove file after deploy check box.
In this case, you must upload the application JAR file again if you want to redeploy this application.
Select your application in the table and click Deploy.
The Review Deployment Information screen is displayed, as shown in Figure 2-32.
Figure 2-32 The Review Deployment Information Screen: Standalone-Server Domain
Click OK.
Your application is deployed and ready for use.
Deploying an application refers to uploading to the server the JAR file that contains the application and then installing it, which makes it available to clients.
Oracle CEP internally deploys an application as a two step processes. The first step involves starting the application bundle inside the OSGi container. The second step involves starting and initializing the application. Because the second step is asynchronous in nature, Oracle CEP Visualizer does not wait for the completion of the second operation. As soon as the application has successfully started, Oracle CEP Visualizer's navigation tree will be updated automatically with the new deployment and a successful message will be send to the dashboard. However, if the application fails to start, you must check for errors on the server side because no messages/updates will occur on the Oracle CEP Visualizer.
This section describes how to deploy an application to a multi-server domain. For information on deploying an application in a standalone-server domain, see Section 2.3.1, "Deploying an Application in a Standalone-Server Domain".
For more information, see Section 3.8, "Managing Multi-Server Domains".
To deploy an application in a multi-server domain:
In the left pane, navigate to and select the Deployment node.
The Deployed Applications table is displayed in the Deployment screen on the right pane.
Click the Install button.
The Install Application screen is displayed.
Click the Upload tab.
Click the ... button to open a file browsing window.
Browse to the local directory that contains the JAR file of the application you want to install and click Open.
Click Upload.
In the Install Application tab, the JAR file appears in the table of uploaded files, as shown in Figure 2-33.
Figure 2-33 The Install Application Screen: Multi-Server Domain
Configure the Select Target Group to Deploy field.
The group name appears in the Target Group to Deploy field.
To unselect this selection, click the Clear Group button.
Select your application in the table and click Deploy.
The Review Deployment Information screen is displayed, as shown in Figure 2-34.
Figure 2-34 The Review Deployment Information Screen: Multi-Server Domain
Click OK.
Oracle CEP Visualizer deploys your application to all servers in the selected target group as Figure 2-35 shows.
Figure 2-35 HelloWorld Application Deployed to All the Servers in Group testgroup
You can temporarily suspend an application from running and resume the operation using the Suspend and Resume operations in the Deployment screen.
To suspend or resume an application:
In the left pane, navigate to Deployment node. The Deployed Applications table is displayed in the Deployment screen on the right pane.
Select the application you want to suspend or resume by checking the box to the left of its name.
Click Suspend to suspend the application or Resume to resume a suspended application.
You can update your currently existing application with your latest application using the Update operation in the Deployment screen.
To update an application:
In the left pane, navigate to Deployment node. The Deployed Applications table is displayed in the Deployment screen on the right pane.
Select the application you want to update by checking the box to the left of its name.
Click Update. The Update application screen is displayed.
Click the Upload tab.
Click on the "..." button to invoke a file browsing window, browse to the directory that contains the JAR file of application, and click Open.
Click Upload. In the Update Application tab, the JAR file appears in the table of uploaded files.
Select your application in the table and click OK.
The existing application is updated with the latest application.
When you uninstall an application, you completely remove it from the server so that you can no longer access it.
To uninstall an application:
In the left pane, navigate to Deployment node. The Deployed Applications table is displayed in the Deployment screen on the right pane.
Select the application you want to uninstall by checking the box to the left of its name.
Click Uninstall.
You have undeployed the application successfully.
This section describes:
Section 2.4.1, "Creating a Rule in an Oracle CQL Processor Using the Query Wizard"
Section 2.4.2, "Modifying a Rule in an Oracle CQL Processor Using the Query Wizard"
Section 2.4.4, "Replacing a Rule in an Oracle CQL Processor"
Section 2.4.6, "Configuring Query Wizard Oracle CQL Constructs"
Section 2.4.7, "Creating an Oracle CQL Template for the Query Wizard"
Section 2.4.9, "Viewing a Query Plan for an Oracle CQL Processor"
For more information, see:
"Oracle Continuous Query Language (CQL) Example" in the Oracle CEP Getting Started
Oracle CEP Visualizer provides a sophisticated Query Wizard to simplify Oracle CQL view and query construction. You can drag and drop Oracle CQL elements to construct a view or query or you can drag and drop a complete Oracle CQL view or query template and customize it to suit your needs. The Oracle CQL Query Wizard is designed to allow business users to efficiently create syntactically correct Oracle CQL views and queries and apply them immediately to a deployed Oracle CEP application.
Using the Query Wizard, you can create Oracle CQL views and query. You cannot create Oracle CQL streams and relations. Your deployed Oracle CEP application must provide the streams and relations. For more information, see Oracle CEP IDE Developer's Guide for Eclipse.
Alternatively, you can modify an existing Oracle CQL view or query; see Section 2.4.2, "Modifying a Rule in an Oracle CQL Processor Using the Query Wizard".
To create a rule in an Oracle CQL processor using the Query Wizard:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Select appname, where appname is the name of the application you want to use.
Select the Oracle CQL processor you wish to use:
To use the EPN diagram:
Click the Event Processing Network tab.
Double-click the Oracle CQL processor you wish to use.
To use the domain tree:
Expand the appname > Stages node, where appname is the name of the application you want to use.
Click the Oracle CQL processor you wish to use.
In the right pane, click the General tab
The Processor panel is displayed as Figure 2-36 shows.
Click the Query Wizard tab.
The Query Wizard tab appears as Figure 2-104 shows.
For information on the various tools along the top of the Query Wizard canvas, see Section 2.4.8, "Managing the Query Wizard Diagram".
Decide how you want to create the Oracle CQL statement:
To construct the query based on an existing Oracle CEP server template:
Click the Templates tab.
Select a template and drag and drop it into the canvas.
To construct the query based on an existing user-defined template:
Click the User defined templates tab.
Select a template and drag and drop it into the canvas.
Note:
For more information about adding user-defined Oracle CQL statement templates, see Section 2.4.7, "Creating an Oracle CQL Template for the Query Wizard".To construct the query one operator at a time or to add additional operators to a template-based Oracle CQL statement:
Click the CQL Constructs tab.
Select a construct and drag and drop it into the canvas.
Repeat until you have added the required constructs to the canvas.
Configure the connections between constructs:
To connect constructs, click on a source construct and drag to a destination construct.
Oracle CEP Visualizer only allows interconnections that conform to Oracle CQL syntax.
Figure 2-38 shows a valid interconnection.
Figure 2-39 shows an invalid interconnection.
For more information about valid Oracle CQL syntax, see "Oracle CQL Statements" in the Oracle CEP CQL Language Reference.
To abandon a connection attempt, click the Esc key on your keyboard.
To delete an existing connection, click on the connection to select it and then click the Delete key on your keyboard.
Configure each construct by double-clicking the construct and using the editor dialog that appears.
A construct icon without a green check mark is not configured.
A construct icon with a green check mark is configured.
For more information, see:
To save your Oracle CQL statement at any time, click the Save Query button.
The All Saved Queries dialog appears as Figure 2-40 shows.
The All Saved Queries dialog lists any saved queries for the processor you are configuring.
Figure 2-40 All Saved Queries Dialog: Saving
Enter a query name in the Query Id field and click Save.
A confirmation dialog appears as Figure 2-41 shows.
Click OK.
Your query is saved to the local disk of the computer you are currently using. To reload your query, you must access the Oracle CEP Visualizer from the same local host.
To reload your Oracle CQL statement after saving, click the Open Query button.
The All Saved Queries dialog appears as Figure 2-42 shows.
Figure 2-42 All Saved Queries Dialog: Loading
Select your query and click Load CQL.
The Oracle CQL statement is loaded to the canvas.
To inject your Oracle CQL statement into the Oracle CQL processor, edit the Output CQL construct and click Inject Rule.
The rule now appears on the CQL Rules tab.
For more information, see Section 2.4.6.15, "Configuring an Output CQL Construct".
After you create a query, update the selector for the outbound channel (the channel down-stream from the Oracle CQL processor you created your query on). This will only work with pre-existing event types.
For more information, see Section 2.2.2.2, "Channel Properties: Outbound Channel".
Oracle CEP Visualizer provides a sophisticated Query Wizard to simplify Oracle CQL query construction. You can select an existing query on the CQL Query tab and edit the query in the Query Wizard. The Oracle CQL Query Wizard is designed to allow business users to efficiently create syntactically correct Oracle CQL queries and apply them to a deployed Oracle CEP application.
Query Wizard will import a given rule and display it graphically as a set of Oracle CQL operators. You can go into an individual operator and make changes (for example, to change the select expression) without affecting other parts of the Oracle CQL statement.
You can edit existing Oracle CQL queries and views. You cannot edit Oracle CQL streams and relations. Your deployed Oracle CEP application must provide the streams and relations. For more information, see Oracle CEP IDE Developer's Guide for Eclipse.
To modify a rule in an Oracle CQL processor using the Query Wizard:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Select appname, where appname is the name of the application you want to use.
Select the Oracle CQL processor you wish to use:
To use the EPN diagram:
Click the Event Processing Network tab.
Double-click the Oracle CQL processor you wish to use.
To use the domain tree:
Expand the appname > Stages node, where appname is the name of the application you want to use.
Click the Oracle CQL processor you wish to use.
In the right pane, click the General tab
The Processor panel is displayed as Figure 2-36 shows.
Click the CQL Rules tab.
The CQL Rules tab appears as Figure 2-54 shows.
Select the rule you want to edit and click the Query Wizard button.
The Query Wizard opens with the selected rule on the canvas as Figure 2-45 shows.
Figure 2-45 Query Wizard: With Existing Rule
For information on the various tools along the top of the Query Wizard canvas, see Section 2.4.8, "Managing the Query Wizard Diagram".
To view the Oracle CQL statements associated with any operator:
Ensure that the Hover check box is checked.
Hover the mouse pointer over an operator.
The Oracle CQL statement appears as Figure 2-46 shows.
Figure 2-46 Hovering Over an Oracle CQL Operator
To modify the Oracle CQL statements associated with any operator, double click the operator.
The corresponding editor dialog appears.
Figure 2-47 shows the editor dialog after double clicking the Join operator.
Figure 2-47 Editor Dialog for Oracle CQL Join Operator
Use the editor dialog to modify the operator.
For information on configuring all the Query Wizard editor dialogs, see Section 2.4.6, "Configuring Query Wizard Oracle CQL Constructs".
Click the Add Join button to apply your changes to the generated Oracle CQL statement.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save to save your changes.
Your query is saved in memory.
Double click your query's Output operator.
Click Replace Rule.
The Oracle CQL rule is now changed and the new version appears in the CQL Rules tab.
Close the Output construct.
You can delete an existing Oracle CQL view or query or delete all Oracle CQL views or queries in an Oracle CQL processor.
To delete a rule in an Oracle CQL processor:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Select appname, where appname is the name of the application you want to use.
Select the Oracle CQL processor you wish to use:
To use the EPN diagram:
Click the Event Processing Network tab.
Double-click the Oracle CQL processor you wish to use.
To use the domain tree:
Expand the appname > Stages node, where appname is the name of the application you want to use.
Click the Oracle CQL processor you wish to use.
In the right pane, click the General tab
The Processor panel is displayed as Figure 2-48 shows.
Click the CQL Rules tab.
The CQL Rules tab appears as Figure 2-54 shows.
Filter the list of rules to show only the type of rule you want to delete:
Select View to see only view rules.
Select Query to see only query views.
Note:
You cannot add, delete, or modify a single rule if you select All Rules. You must select a particular view or query to add, delete, or modify a single rule. To make changes to either views or queries, you must select View or Query. The All Rules page is a read-only panel.Also note that you can turn off a query dynamically using the Enable radio buttons.
The Delete All Views or Delete All Queries button is active as Figure 2-50 shows.
Decide what rules you want to delete:
To delete a single rule:
Select the rule you want to delete.
Click Delete View or Delete Query.
A confirmation dialog appears as Figure 2-108 shows.
To delete all rules:
Click Cancel to unselect any rules that may be currently selected.
Click Delete All Views or Delete All Queries.
A confirmation dialog appears as Figure 2-108 shows.
Click OK.
Using Oracle CEP Visualizer, you can replace an existing view or query by either editing the Oracle CQL statement directly or using the Query Wizard.
To replace a rule in an Oracle CQL processor:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Select appname, where appname is the name of the application you want to use.
Select the Oracle CQL processor you wish to use:
To use the EPN diagram:
Click the Event Processing Network tab.
Double-click the Oracle CQL processor you wish to use.
To use the domain tree:
Expand the appname > Stages node, where appname is the name of the application you want to use.
Click the Oracle CQL processor you wish to use.
In the right pane, click the General tab
The Processor panel is displayed as Figure 2-53 shows.
Click the CQL Rules tab.
The CQL Rules tab appears as Figure 2-54 shows.
Filter the list of rules to show only the type of rule you want to replace:
Select View to see only view rules.
Select Query to see only query views.
Select the rule you wish to replace.
The View or Query field is now editable and the Replace Rule button is active as Figure 2-55 shows.
Edit the Oracle CQL statement by doing one of the following:
Directly edit the Oracle CQL statement in the View or Query field.
Click the Query Wizard button to edit the rule in the Query Wizard.
For more information, see Section 2.4.2, "Modifying a Rule in an Oracle CQL Processor Using the Query Wizard".
Commit your changes:
If you directly edited the Oracle CQL statement in the View or Query field, click Replace View or Replace Query.
If you edited the Oracle CQL statement using the Query Wizard, you commit your changes in the Query Wizard.
For more information, see Section 2.4.2, "Modifying a Rule in an Oracle CQL Processor Using the Query Wizard".
Using Oracle CEP Visualizer, you can view the existing rules defined on an Oracle CQL processor.
To view a rule in an Oracle CQL processor:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Select appname, where appname is the name of the application you want to use.
Select the Oracle CQL processor you wish to use:
To use the EPN diagram:
Click the Event Processing Network tab.
Double-click the Oracle CQL processor you wish to use.
To use the domain tree:
Expand the appname > Stages node, where appname is the name of the application you want to use.
Click the Oracle CQL processor you wish to use.
In the right pane, click the General tab
The Processor panel is displayed as Figure 2-36 shows.
Click the CQL Rules tab.
The CQL Rules tab appears as Figure 2-54 shows.
This section describes how to configure the various Oracle CQL constructs that the Query Wizard provides, including:
The RSource Oracle CQL construct represents an Oracle CQL relation that your Oracle CEP application provides or a relation type of view that you create. To create a stream type of source, an SSource, see Section 2.4.6.2, "Configuring an SSource CQL Construct".
For more information and detailed syntax, see:
"Streams and Relations" in the Oracle CEP CQL Language Reference
"Queries, Views, and Joins" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure an RSource CQL construct:
Double click the RSource icon as Figure 2-58 shows.
The RSource editor dialog appears as Figure 2-59 shows.
Figure 2-59 Query Wizard RSource Editor Dialog
Edit the dialog as Table 2-8 describes.
Table 2-8 Query Wizard RSource Editor Attributes
Attribute | Description |
---|---|
|
Select the type of source:
|
|
Select the relation or view to use as the source of events. |
|
Optionally specify an alias for this source. |
|
Read-only list of the properties of the event offered by this source. |
|
Read-only Oracle CQL fragment associated with this CQL Construct. |
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The RSource icon displays a green check mark to indicate that it is configured.
The SSource Oracle CQL construct represents an Oracle CQL stream that your Oracle CEP application provides or a stream type of view you create. To create a relation type of source, an RSource, see Section 2.4.6.1, "Configuring an RSource CQL Construct".
For more information and detailed syntax, see:
"Streams and Relations" in the Oracle CEP CQL Language Reference
"Queries, Views, and Joins" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure an SSource CQL construct:
Double click the SSource icon as Figure 2-58 shows.
The SSource editor dialog appears as Figure 2-59 shows.
Figure 2-61 Query Wizard Source Editor Dialog
Edit the dialog as Table 2-8 describes.
Table 2-9 Query Wizard Source Editor Attributes
Attribute | Description |
---|---|
|
Select the type of source:
|
|
Select the stream or view to use as the source of events. |
|
Optionally specify an alias for this source. |
|
Read-only list of the properties of the event offered by this source. |
|
Read-only Oracle CQL fragment associated with this CQL Construct. |
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The Source icon displays a green check mark to indicate that it is configured.
The Cache-Table CQL construct represents an external relation, usually a pull data source, that a cache or relational database table provides. The only operation that is allowed on the Cache-Table CQL construct is a join with another stream source using the Now
window.
For more information, see:
"Configuring Access to a Relational Database" in the Oracle CEP Administrator's Guide
"Configuring an Oracle CQL Processor Table Source" in the Oracle CEP IDE Developer's Guide for Eclipse
"Configuring Caching" in the Oracle CEP IDE Developer's Guide for Eclipse
"Configuring an Oracle CQL Processor Cache Source" in the Oracle CEP IDE Developer's Guide for Eclipse
"Oracle Continuous Query Language (CQL) Example" in the Oracle CEP Getting Started
To configure a Cache-Table CQL construct:
Double click the Cache-Table icon as Figure 2-62 shows.
The Cache-Table editor dialog appears as Figure 2-63 shows.
Figure 2-63 Query Wizard Cache-Table Editor Dialog
Edit the dialog as Table 2-10 describes.
Table 2-10 Query Wizard Cache-Table Editor Attributes
Attribute | Description |
---|---|
|
Select the cache to use as the source of events. |
|
Optionally specify an alias for this source. |
|
Read-only list of the properties of the event offered by this source. |
|
Read-only Oracle CQL fragment associated with this CQL Construct. |
Click Save.
The Cache-Table icon displays a green check mark to indicate that it is configured.
The Pattern Oracle CQL construct represents the Oracle CQL MATCH_RECOGNIZE
condition. The MATCH_RECOGNIZE
condition is the principle means of performing complex event processing. Using its various clauses, you can succinctly express complex conditions among stream elements to perform advanced comparisons optimized for data streams.
The Pattern Oracle CQL construct editor provides a tab for each of the following MATCH_RECOGNIZE
sub-clauses:
PATTERN
: Use this clause to specify quantifiers that constrain and control when conditions in the DEFINE
clause match.
See Figure 2-65, "Query Wizard Pattern Editor Dialog: Pattern Tab".
DEFINE
: Use this clause to specify one or more conditions. Specify one or more patterns made up of a pattern identifier, the AS
operator, and a condition. The condition can use any stream elements in the schema of the stream, view, or sliding window specified by the identifier you used in your query or view select statement.
See Figure 2-66, "Query Wizard Pattern Editor Dialog: Define Tab".
SUBSET
: Using this clause, you can bind a name to the stream elements that one or more patterns select. You can use this named subset in the MEASURE
and DEFINE
clauses.
See Figure 2-67, "Query Wizard Pattern Editor Dialog: Subset Tab".
MEASURE
: Use this clause to define expressions in a MATCH_RECOGNIZE
condition and to bind stream elements that match conditions in the DEFINE
clause to arguments that you can include in the select statement of a query. You can use any of the Oracle CQL built-in or user-defined functions.
See Figure 2-68, "Query Wizard Pattern Editor Dialog: Measure Tab".
For more information and detailed syntax, see:
"MATCH_RECOGNIZE
Condition" in the Oracle CEP CQL Language Reference
"PATTERN
Clause" in the Oracle CEP CQL Language Reference
"DEFINE
Clause" in the Oracle CEP CQL Language Reference
"SUBSET
Clause" in the Oracle CEP CQL Language Reference
"MEASURES
Clause" in the Oracle CEP CQL Language Reference
"Functions" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure a Pattern CQL construct:
Double click the Pattern icon as Figure 2-64 shows.
The Pattern editor dialog appears as Figure 2-65 shows.
Figure 2-65 Query Wizard Pattern Editor Dialog: Pattern Tab
Edit the Pattern tab as Table 2-11 describes.
Table 2-11 Query Wizard Pattern Editor Attributes: Pattern Tab
Attribute | Description |
---|---|
|
Use this clause to specify quantifiers that constrain and control when conditions in the (A B* C) Table 2-12 lists the pattern quantifiers Oracle CQL supports. Use the pattern quantifiers to specify the allowed range of pattern matches. The one-character pattern quantifiers are maximal or "greedy"; they will attempt to match the biggest quantity first. The two-character pattern quantifiers are minimal or "reluctant"; they will attempt to match the smallest quantity first. For more information, see " |
|
By default, Oracle CEP updates the output relation at the time it recognizes a pattern match. Enter a duration value to specify a time delay between when Oracle CEP recognizes a pattern match and when it updates the output relation. You can use either of the following:
For more information, see " |
|
Use this optional clause to specify the stream elements by which a To add a stream element to the partition by list, select a stream element from the pull-down menu and click the Add button. To remove a stream element from the partition by list, click the Undo button. For more information, see " |
|
Specifies the Specifying a pattern alias of <query id="detectPerish"><![CDATA[ select its.itemId as badItem from ItemTempStream MATCH_RECOGNIZE ( PARTITION BY ... MEASURES ... PATTERN ... DEFINE ... ) as its ]]></query> For more information, see "Aliases in the |
|
Check this option to configure Oracle CEP to match overlapping patterns. Uncheck this option to configure Oracle CEP to match only one pattern. For more information, see " |
|
Editable Oracle CQL fragment associated with this CQL Construct. |
Table 2-12 Pattern Quantifiers
Maximal | Minimal | Description |
---|---|---|
0 or more times |
||
1 or more times. |
||
0 or 1 time. |
For more information, see "PATTERN
Clause" in the Oracle CEP CQL Language Reference.
Click the Define tab.
The Define tab appears as Figure 2-66 shows.
Figure 2-66 Query Wizard Pattern Editor Dialog: Define Tab
Edit the Define tab as Table 2-12 describes.
Table 2-13 Query Wizard Pattern Editor Attributes: Define Tab
Attribute | Description |
---|---|
|
Enter an object name as you specified in the Pattern Expression attribute of the Pattern tab (see Table 2-11). For example, if the pattern expression is: (A B* C) Then create a definition for each of |
|
Define an expression by clicking the Expression Builder button. For example: A AS (A.temp >= 25) B AS ((B.temp >= 25) and (B.element_time - A.element_time < INTERVAL "0 00:00:05:00" DAY TO SECOND)) C AS (C.element_time - A.element_time >= INTERVAL "0 00:00:05:00" DAY TO SECOND) For more information, see Section 2.4.6.16, "Configuring an Expression Using the Expression Builder". |
|
A list of the definitions you specify. To add a definition to the Object List, click the Add button. To remove a definition from the Object List, click the Delete button. |
|
Read-only Oracle CQL fragment associated with this CQL Construct. |
For more information, see "DEFINE
Clause" in the Oracle CEP CQL Language Reference.
Click the Subset tab.
The Subset tab appears as Figure 2-67 shows.
Figure 2-67 Query Wizard Pattern Editor Dialog: Subset Tab
Edit the Subset tab as Table 2-14 describes.
Table 2-14 Query Wizard Pattern Editor Attributes: Subset Tab
Attribute | Description |
---|---|
|
Enter a name for the subset. |
|
Enter a list of the object names as you specified in the Pattern Expression attribute of the Pattern tab (see Table 2-11). For example, given the following pattern: (A W+ X+ Y+ Z+) You could define subsets such as: S1 AS (Z) S2 AS (A) S3 AS (A,W,Y) |
|
A list of the subsets you specify. To add a subset to the Subset List, click the Add button. To remove a subset from the Subset List, click the Delete button. |
|
Read-only Oracle CQL fragment associated with this CQL Construct. |
For more information, see "SUBSET
Clause" in the Oracle CEP CQL Language Reference.
Click the Measure tab.
The Measure tab appears as Figure 2-68 shows.
Figure 2-68 Query Wizard Pattern Editor Dialog: Measure Tab
Edit the Measure tab as Table 2-15 describes.
Table 2-15 Query Wizard Pattern Editor Attributes: Measure Tab
Attribute | Description |
---|---|
|
Enter an object name as you specified in the Pattern Expression attribute of the Pattern tab (see Table 2-11) or Subset name attribute of the Subset tab (see Figure 2-67). For example, if the pattern expression is: (A B* C) Then you could create a measure for any of If you define subsets: S1 AS (Z) S2 AS (A) S3 AS (A,W,Y) Then you could create a measure for any of |
|
Define an expression by clicking the Expression Builder button. For example: sumDecrArm as sum(S3.c2) For more information, see Section 2.4.6.16, "Configuring an Expression Using the Expression Builder". |
|
A list of the measures you specify. To add a measure to the Properties list, click the Add button. To remove a measure from the Properties list, click the Delete button. |
|
Read-only Oracle CQL fragment associated with this CQL Construct. |
For more information, see "MEASURES
Clause" in the Oracle CEP CQL Language Reference.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The Pattern icon displays a green check mark to indicate that it is configured.
The Select Oracle CQL construct represents the Oracle CQL SELECT
clause. For information on representing the WHERE
clause, see Section 2.4.6.8, "Configuring a Filter CQL Construct".
The Select Oracle CQL construct editor provides a tab for each of the following sub-clauses:
select_clause
: Use this clause to specify the stream elements to select from the stream or view you specify.
See Figure 2-70, "Query Wizard Select Editor Dialog: Project Tab".
opt_group_by_clause
: Use this clause to specify optional grouping conditions your query applies to its results.
See Figure 2-71, "Query Wizard Select Editor Dialog: Group Tab".
opt_having_clause
:Use this clause to restrict the groups of returned stream elements to those groups for which the specified condition
is TRUE
. If you omit this clause, then Oracle CEP returns summary results for all groups.
See Figure 2-72, "Query Wizard Select Editor Dialog: Condition Tab".
order_by_clause
: Use this clause to specify optional ordering conditions your query applies to its results.
See Figure 2-73, "Query Wizard Select Editor Dialog: Order Tab".
For more information, see:
"Select, From, Where Block" in the Oracle CEP CQL Language Reference
"select_clause" in the Oracle CEP CQL Language Reference
"opt_group_by_clause" in the Oracle CEP CQL Language Reference
"opt_having_clause" in the Oracle CEP CQL Language Reference
"order_by_clause" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure a Select CQL construct:
Double click the Select icon as Figure 2-69 shows.
The Select editor dialog appears as Figure 2-70 shows.
Figure 2-70 Query Wizard Select Editor Dialog: Project Tab
Edit the Project tab as Table 2-16 describes.
The general procedure is:
Select a Source.
Select a Target event type.
Double click a property in the Properties list to add the property to the Project expression field.
Click the Expression Builder button and create a Project expression.
In the AS field, enter an alias for the project expression result or select one of the Target event type attributes.
Click the Add button.
To remove a project expression, select it in the Project predicates list and click Delete.
Optionally, check Distinct.
Table 2-16 Query Wizard Select Editor Attributes: Project Tab
Attribute | Description |
---|---|
|
Check this option if you want Oracle CEP to return only one copy of each set of duplicate tuples selected. Uncheck this option if you want Oracle CEP to return all tuples selected, including duplicates. Duplicate tuples are those with matching values for each expression in the select list. Oracle CEP does not support nested aggregations. |
|
Select or input the name of the event expected by the down-stream channel you connected to this Oracle CQL processor. For more information, see "Event Types" in the Oracle CEP IDE Developer's Guide for Eclipse |
|
Select the name of the stream, relation, or view Source CQL Construct that you connected to this Project CQL construct. For more information, see Section 2.4.6.1, "Configuring an RSource CQL Construct". |
|
Read-only list of the properties of the event offered by this source. For more information, see Section 2.4.6.1, "Configuring an RSource CQL Construct". |
|
A list of the project expressions you define. To add a project expression to the Project Predicates list, click the Add button. To remove a project expression from the Project Predicates list, select the project expression in the Project Predicates list and click the Delete button. |
|
Define an expression by clicking the Expression Builder button. For example: LENGTH( FxQuoteStream.symbol < 100 ) For more information, see Section 2.4.6.16, "Configuring an Expression Using the Expression Builder". |
|
Enter an alias for the project expression result or select one of the Target event type attributes. |
|
Read-only Oracle CQL fragment associated with this CQL Construct. |
For more information, see "select_clause" in the Oracle CEP CQL Language Reference.
Click the Group tab.
The Group tab editor dialog appears as Figure 2-70 shows.
Figure 2-71 Query Wizard Select Editor Dialog: Group Tab
Edit the Group tab as Table 2-17 describes.
The general procedure is:
Select a source from the pull down menu.
Select a property in the Properties list.
To add the selected property to the Grouping properties list, click the Add button.
To remove a property from the Grouping properties list, select the property in the Grouping properties list and click the Delete button.
Table 2-17 Query Wizard Select Editor Attributes: Group Tab
Attribute | Description |
---|---|
|
Select a source from the pull-down menu. |
|
The properties of the event offered by the selected source. |
|
A list of the grouping properties you define. To add the selected property to the Grouping properties list, click the Add button. To remove a property from the Grouping properties list, select the property in the Grouping properties list and click the Delete button. |
|
Editable Oracle CQL fragment associated with this CQL Construct. |
For more information, see "opt_group_by_clause" in the Oracle CEP CQL Language Reference.
Click the Condition tab.
The Condition tab editor dialog appears as Figure 2-70 shows.
Figure 2-72 Query Wizard Select Editor Dialog: Condition Tab
Edit the Condition tab as Table 2-18 describes.
Table 2-18 Query Wizard Select Editor Attributes: Condition Tab
Attribute | Description |
---|---|
Having Predicate |
Define an expression by entering a having predicate directly or clicking the Expression Builder button. For example: lastPrice > 500 For more information, see Section 2.4.6.16, "Configuring an Expression Using the Expression Builder". To add a condition expression to the generated CQL statement, click the Add button. To remove the condition expression from the generated CQL statement, click the Delete button. |
|
Editable Oracle CQL fragment associated with this CQL Construct. |
For more information, see "opt_having_clause" in the Oracle CEP CQL Language Reference.
Click the Order tab.
The Order tab editor dialog appears as Figure 2-70 shows.
Figure 2-73 Query Wizard Select Editor Dialog: Order Tab
Edit the Order tab as Table 2-19 describes.
The general procedure is:
Select a source from the pull down menu.
Select a property in the Properties list.
To add the selected property to the Ordering properties list, click the Add button.
To remove a property from the Ordering properties list, select the property in the Ordering properties list and click the Delete button.
Table 2-19 Query Wizard Select Editor Attributes: Order Tab
Attribute | Description |
---|---|
|
Select a source from the pull-down menu. |
|
The properties of the event offered by the selected source. |
|
A list of the ordering properties you define. To add the selected property to the Ordering properties list, click the Add button. To remove a property from the Ordering properties list, select the property in the Ordering properties list and click the Delete button. |
|
Editable Oracle CQL fragment associated with this CQL Construct. |
For more information, see "order_by_clause" in the Oracle CEP CQL Language Reference.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The Select icon displays a green check mark to indicate that it is configured.
The Join Oracle CQL construct represents an Oracle CQL join between two or more sources. You can create inner joins and left and right outer joins.
For more information, see:
"Joins" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure a Join CQL construct:
Double click the Join icon as Figure 2-74 shows.
The Join editor dialog appears as Figure 2-75 shows.
Figure 2-75 Query Wizard Join Editor Dialog
Edit the dialog as Table 2-20 describes.
Table 2-20 Query Wizard Join Editor Attributes
Attribute | Description |
---|---|
|
Select the first source to join. |
|
Read-only list of properties of Source 1. |
|
Select the second source to join. |
|
Read-only list of properties of Source 2. |
|
Select the type of join:
|
|
Create the Join Predicate by doing either of the following:
|
|
Editable Oracle CQL fragment associated with this CQL Construct. |
Select a source from the Source 1 pull-down menu.
Select a source from the Source 2 pull-down menu.
Select a property in the Source 1 Properties list to join on.
Select a property in the Source 2 Properties list to join on.
Choose the Join Type.
Create the Join Predicate by doing either of the following:
Click the Plus Sign button to create the join predicate using the Source 1 and Source 2 properties you select.
Click the Expression Builder button to create the join predicate using any of the Source 1 and Source 2 properties and Oracle CQL functions and operators.
To add the join predicate to the generated CQL statement, click the Add Join button.
To remove the join predicate from the generated CQL statement, click the Undo Join button.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The Join icon displays a green check mark to indicate that it is configured.
The Window Oracle CQL construct represents an Oracle CQL stream-to-relation operator.
For more information, see:
"Stream-to-Relation Operators (Windows)" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure a Window CQL construct:
Double click the Window icon as Figure 2-76 shows.
The Window editor dialog appears as Figure 2-77 shows.
Figure 2-77 Query Wizard Window Editor Dialog
Edit the dialog as Table 2-21 describes.
Table 2-21 Query Wizard Window Editor Attributes
Attribute | Description |
---|---|
|
Select one or more stream elements to add to the partition list if you want to create a partitioned window. To remove stream elements from the Partition List, click and drag to select the values in the Partition List and press the Delete key on your keyboard. |
|
The type of window to create: Now: Select this option to create a time-based range window that defines its output relation such that, when Time: Select this option to create a time-based range window that defines its output relation over time by sliding an interval of size Row: Select this option to create a tuple-based window that defines its output relation over time by sliding a window of the last Partition: Select this option to create any of the following partitioned windows:
The Partition type is inactive unless you add one or more stream elements to the Partition List. Optionally, specify a time-based slide for this window using the Slide attribute. Unbounded: Select this option to create a time-based range window defines its output relation such that, when |
|
Specify a sliding window: Row Based: Select this option to create any of the following row-based sliding windows:
Time Based: Select this option to create any of the following time-based sliding windows:
|
|
Editable Oracle CQL fragment associated with this CQL Construct. |
If you want a partitioned window, select the stream elements you want in the Partition List.
To remove stream elements from the Partition List, click and drag to select the values in the Partition List and press the Delete key on your keyboard.
Select the Type.
The Partition type is inactive unless you add one or more stream elements to the Partition List.
Select Row Based or Time Based for the selected type.
Enter the size of the window:
For a Row Based type, enter a number of rows (tuples or stream elements).
For a Time Based type, enter a number of time units and select the time unit.
Select a Slide:
For a Row Based type, enter a number of rows (tuples or stream elements).
For a Time Based type, enter a number of time units and select the time unit.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
To add the window to the generated CQL statement, click the Add Window button.
Click Save.
The Window icon displays a green check mark to indicate that it is configured.
The Filter Oracle CQL construct represents an Oracle CQL WHERE
clause. For information on representing the SELECT
and FROM
clauses, see Section 2.4.6.5, "Configuring a Select CQL Construct".
For more information, see:
"opt_where_clause" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure a Filter CQL construct:
Double click the Filter icon as Figure 2-78 shows.
The Filter editor dialog appears as Figure 2-79 shows.
Figure 2-79 Query Wizard Filter Editor Dialog
Edit the dialog as Table 2-22 describes.
Table 2-22 Query Wizard Filter Editor Attributes
Attribute | Description |
---|---|
|
Define an expression by entering a filter predicate directly or clicking the Expression Builder button. For example: SUM( FxQuoteStream.lastPrice < 5000 ) For more information, see Section 2.4.6.16, "Configuring an Expression Using the Expression Builder". To add the filter predicate to the generated CQL statement, click the Add Filter button. To remove the filter predicate from the generated CQL statement, click the Delete Filter button. |
|
Editable Oracle CQL fragment associated with this CQL Construct. |
Define the filter predicate by doing one of the following:
Enter the filter predicate directly.
Click the Expression Builder button.
For more information, see Section 2.4.6.16, "Configuring an Expression Using the Expression Builder".
To add a condition expression to the generated CQL statement, click the Add Filter button.
To remove the condition expression from the generated CQL statement, click the Delete Filter button.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The Source icon displays a green check mark to indicate that it is configured.
The Union Oracle CQL construct represents an Oracle CQL UNION
or UNION ALL
clause. You can perform a union between two relations; relation can be emitted either from a view or a channel. You can perform a union between two relations or two streams. You cannot perform a union between a relation and a stream.
For more information, see:
"binary" in the Oracle CEP CQL Language Reference
"BINARY Example: UNION and UNION ALL" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure a Union CQL construct:
Double click the Union icon as Figure 2-80 shows.
The Union editor dialog appears as Figure 2-81 shows.
Figure 2-81 Query Wizard Union Editor Dialog
Edit the dialog as Table 2-23 describes.
Table 2-23 Query Wizard Union Editor Attributes
Attribute | Description |
---|---|
|
Select the first source to union. |
|
Read-only list of properties of Source 1. |
|
Select the second source to union. |
|
Read-only list of properties of Source 2. |
|
Select the type of union:
For more information, see "BINARY Example: UNION and UNION ALL" in the Oracle CEP CQL Language Reference. |
|
Editable Oracle CQL fragment associated with this CQL Construct. |
Select a source from the Source 1 pull-down menu.
Select a source from the Source 2 pull-down menu.
Choose the Union Type.
To add the union clause to the generated CQL statement, click the Add Union button.
To remove the union clause from the generated CQL statement, click the Undo Union button.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The Union icon displays a green check mark to indicate that it is configured.
The Intersect Oracle CQL construct represents an Oracle CQL INTERSECT
clause. You can perform an intersect between two relations. You cannot perform an intersect between a relation and a stream or between two streams.
For more information, see:
"binary" in the Oracle CEP CQL Language Reference
"BINARY Example: INTERSECT" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure an Intersect CQL construct:
Double click the Intersect icon as Figure 2-82 shows.
The Intersect editor dialog appears as Figure 2-83 shows.
Figure 2-83 Query Wizard Intersect Editor Dialog
Edit the dialog as Table 2-24 describes.
Table 2-24 Query Wizard Intersect Editor Attributes
Attribute | Description |
---|---|
|
Select the first source to intersect. |
|
Read-only list of properties of Source 1. |
|
Select the second source to intersect. |
|
Read-only list of properties of Source 2. |
|
Editable Oracle CQL fragment associated with this CQL Construct. |
To add the intersect clause to the generated CQL statement, click the Add Intersect button.
To remove the intersect clause from the generated CQL statement, click the Undo Intersect button.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The Intersect icon displays a green check mark to indicate that it is configured.
The Minus Oracle CQL construct represents an Oracle CQL MINUS
clause. You can perform a minus between two relations. You cannot perform a minus between a relation and a stream or between two streams.
For more information, see:
"binary" in the Oracle CEP CQL Language Reference
"BINARY Example: MINUS" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure a Minus CQL construct:
Double click the Intersect icon as Figure 2-84 shows.
The Minus editor dialog appears as Figure 2-85 shows.
Figure 2-85 Query Wizard Minus Editor Dialog
Edit the dialog as Table 2-25 describes.
Table 2-25 Query Wizard Minus Editor Attributes
Attribute | Description |
---|---|
|
Select the first source to minus. |
|
Read-only list of properties of Source 1. |
|
Select the second source to minus. |
|
Read-only list of properties of Source 2. |
|
Editable Oracle CQL fragment associated with this CQL Construct. |
To add the minus clause to the generated CQL statement, click the Add Minus button.
To remove the minus clause from the generated CQL statement, click the Undo Minus button.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The Minus icon displays a green check mark to indicate that it is configured.
The IStream Oracle CQL construct represents an Oracle CQL IStream relation-to-stream operator. Istream
(for "Insert stream") applied to a relation R
contains (s,t)
whenever tuple s
is in R(t) - R(t-1)
, that is, whenever s
is inserted into R
at time t
. If a tuple happens to be both inserted and deleted with the same timestamp then IStream
does not output the insertion.
For more information, see:
"IStream Relation-to-Stream Operator" in the Oracle CEP CQL Language Reference
"Streams and Relations" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure an IStream CQL construct:
Double click the IStream icon as Figure 2-86 shows.
The IStream editor dialog appears as Figure 2-87 shows.
Figure 2-87 Query Wizard IStream Editor Dialog
Edit the dialog as Table 2-26 describes.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The IStream icon displays a green check mark to indicate that it is configured.
The DStream Oracle CQL construct represents an Oracle CQL DStream relation-to-stream operator. Dstream
(for "Delete stream") applied to a relation R
contains (s,t)
whenever tuple s
is in R(t-1) - R(t)
, that is, whenever s
is deleted from R
at time t
.
For more information, see:
"DStream Relation-to-Stream Operator" in the Oracle CEP CQL Language Reference
"Streams and Relations" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure a DStream CQL construct:
Double click the DStream icon as Figure 2-88 shows.
The DStream editor dialog appears as Figure 2-89 shows.
Figure 2-89 Query Wizard DStream Editor Dialog
Edit the dialog as Table 2-27 describes.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The Dstream icon displays a green check mark to indicate that it is configured.
The RStream Oracle CQL construct represents an Oracle CQL RStream relation-to-stream operator. The RStream
operator maintains the entire current state of its input relation and outputs all of the tuples as insertions at each time step. Since Rstream
outputs the entire state of the relation at every instant of time, it can be expensive if the relation set is not very small.
For more information, see:
"RStream Relation-to-Stream Operator" in the Oracle CEP CQL Language Reference
"Streams and Relations" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure an RStream CQL construct:
Double click the RStream icon as Figure 2-90 shows.
The RStream editor dialog appears as Figure 2-91 shows.
Figure 2-91 Query Wizard RStream Editor Dialog
Edit the dialog as Table 2-28 describes.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The RStream icon displays a green check mark to indicate that it is configured.
The Output Oracle CQL construct represents the complete Oracle CQL query or view. Using the Output CQL construct, you can:
Review and edit the complete Oracle CQL statement.
Create a copy of the Oracle CQL statement and inject it into the Oracle CQL processor under a different name. This is a convenient way of duplicating and modifying an existing statement when you need to create multiple statements that share a common structure.
Convert between a view and query.
For more information, see:
"Queries, Views, and Joins" in the Oracle CEP CQL Language Reference
"Oracle CQL Statements" in the Oracle CEP CQL Language Reference
To configure an Output CQL construct:
Double click the Output icon as Figure 2-92 shows.
The Output editor dialog appears as Figure 2-93 shows.
Figure 2-93 Query Wizard Output Editor Dialog
Edit the dialog as Table 2-29 describes.
Table 2-29 Query Wizard Output Editor Attributes
Attribute | Description |
---|---|
|
The type of rule:
For more information, see "Queries, Views, and Joins" in the Oracle CEP CQL Language Reference. |
|
The name of the query. |
|
Set this option to true to run the rule immediately after saving. Set this option to false to not run the rule after saving. A view cannot be enabled or disabled. If the query that uses a view is enabled, then the view is also enabled. If the query that uses a view is disabled, then the view is effectively disabled. |
|
The name of the view. |
|
Editable list of the properties you specify in the If you edit the generated CQL statement to add or remove properties from the |
|
Read-only list of the properties you specify in the |
|
Editable Oracle CQL fragment associated with this CQL Construct. |
To inject a new instance of the entire Oracle CQL rule into the Oracle CQL processor:
If you are creating a new rule, Click Inject Rule.
A new instance of the Oracle CQL rule is now visible on the Oracle Rules tab.
If you are modifying an existing rule:
Click in the Query Name or View Name field and change the query or view name.
Click Inject Rule.
A new instance of the Oracle CQL rule is now visible on the Oracle Rules tab with the new name.
To replace an existing instance of the entire Oracle CQL rule in the Oracle CQL processor, click Replace Rule.
The existing instance of the Oracle CQL rule is updated on the Oracle Rules tab with the existing name.
Click the Validate button to ensure that your changes are syntactically correct.
Correct any errors before proceeding.
Click Save.
The Output icon displays a green check mark to indicate that it is configured.
You can use the Query Wizard Expression Builder to construct an expression using various Oracle CQL operators, expressions, built-in single-row and aggregate functions, and user-defined functions.
For more information, see:
"Arithmetic Operators" in the Oracle CEP CQL Language Reference
"Concatenation Operator" in the Oracle CEP CQL Language Reference
"Expressions" in the Oracle CEP CQL Language Reference
"Functions" in the Oracle CEP CQL Language Reference
To configure an expression using the Expression Builder:
Click the Expression Builder button on the CQl construct editor dialog.
The Expression Builder dialog appears. Figure 2-94 shows the Expression Builder after clicking the Expression Builder button in the Pattern construct editor.
Figure 2-94 Query Wizard Expression Builder
Edit the dialog as Table 2-29 describes.
Table 2-30 Query Wizard Expression Builder Attributes
Attribute | Description |
---|---|
|
Editable field that contains the expression. |
|
Select a source from the Variables pull-down menu to list the properties it provides in the Properties list. Double-click a property to select it and add it to the Expression Builder at the current insertion point. |
|
Select a function category from the Functions pull-down menu to list the functions it provides in the Functions list. Select a function to see its syntax in the Function Description field. Double-click a function to select it and add it to the Expression Builder at the current insertion point. |
|
Double-click an operand to select it and add it to the Expression Builder at the current insertion point. |
|
Read-only field that shows the syntax for the currently selected function. |
Select a source from the Variables pull-down menu.
Select a function category from the Functions pull-down menu.
Double-click a function to select it and add it to the Expression Builder.
Double-click a property to select it and make it the argument of the function.
Use your mouse to position the insertion bar after the closing bracket of the function.
Double click an operand to select it and add it to the Expression Builder.
Double-click another property or type in a literal value in the Expression Builder.
To undo an operation, click the Undo button.
To redo an operation, click the Redo button.
To clear the Expression Builder, click the Erase button.
Click Save to save the expression and return to the CQL construct editor dialog.
Oracle CEP Visualizer provides a sophisticated Query Wizard to simplify Oracle CQL view and query construction. You can drag and drop a complete Oracle CQL view or query template and customize it to suit your needs. This procedure describes how to create your own templates and add them to the Query Wizard Templates palette.
An Oracle CQL template is based on the wlevs_queryconstructor_config.xsd
from Appendix A, "Oracle CQL Query Wizard Template Schema Reference". However, a user-defined template may contain only the following:
select-block
from-block
where-block
Operator
element and attributes ID
and type
Operator
element inputs
child element
For more information on using templates to create an Oracle CQL rule, see Section 2.4.1, "Creating a Rule in an Oracle CQL Processor Using the Query Wizard".
To create an Oracle CQL template for the Query Wizard:
Using your favorite editor, create an XML file and add the header shown in Example 2-5.
Create a Rule
element as Example 2-6 shows.
Add Operator
elements to your template as Example 2-7 shows.
Configure each Operator
with a unique ID
and specify the type
attribute.
Configure the Rule
element root
attribute with the ID
of the operator that is the root (or ending point) of your rule. In Example 2-7, the Operator
of type Output
with the ID
10 is the root of the rule.
Example 2-7 Rule Element: Operators
<?xml version="1.0" encoding="UTF-8"?> <Rule root="10"> <select-block> <Operator ID="10" type="Output"> </Operator> <Operator ID="9" type="IStream"> </Operator> <Operator ID="7" type="Select"> </Operator> </select-block> <from-block> <Operator ID="1" type="SSource"> </Operator> <Operator ID="2" type="Window"> </Operator> <Operator ID="3" type="SSource"> </Operator> <Operator ID="4" type="Window"> </Operator> </from-block> <where-block> <Operator ID="5" type="Join"> </Operator> </where-block> </Rule>
Connect your operators together by adding inputs
elements as Example 2-8 shows.
Example 2-8 Rule Element: Connect Operators
<?xml version="1.0" encoding="UTF-8"?> <Rule root="9"> <select-block> <Operator ID="10" type="Output"> <inputs> <input>9</input> </inputs> </Operator> <Operator ID="9" type="IStream"> <inputs> <input>8</input> </inputs> </Operator> <Operator ID="7" type="Select"> <inputs> <input>5</input> </inputs> </Operator> </select-block> <from-block> <Operator ID="1" type="SSource"> </Operator> <Operator ID="2" type="Window"> <inputs> <input>1</input> </inputs> </Operator> <Operator ID="3" type="SSource"> </Operator> <Operator ID="4" type="Window"> <inputs> <input>3</input> </inputs> </Operator> </from-block> <where-block> <Operator ID="5" type="Join"> <inputs> <input>2</input> <input>4</input> </inputs> </Operator> </where-block> </Rule>
Save and close your template XML file.
Note:
If you enter double-byte characters in your template XML file, ensure that you save the file using UTF-8 encoding. For more information, see Section 1.5.1, "Configuration File Encoding: UTF-8".Copy your template XML file to the ORACLE_CEP_HOME
/user_projects/domains/
DOMAIN_DIR
/
servername
/cqltemplate
directory of your Oracle CEP server, where ORACLE_CEP_HOME
refers to the Oracle CEP installation directory such as d:\oracle_cep
, DOMAIN_DIR
refers to the name of your domain directory, and servername
refers to the name of your server. For example: d:\oracle_cep_home\user_projects\domains\mydomain\myserver1\cqltemplate
.
Add the name of your template XML file to the ORACLE_CEP_HOME
/user_projects/domains/
DOMAIN_DIR
/
servername
/cqltemplate
/registry.xml
file.
Example 2-9 shows how to register the template XML file example.xml
.
Example 2-9 Oracle CEP registry.xml File
<?xml version="1.0" encoding="UTF-8"?> <templates> <template> <name>example</name> <filename>example.xml</filename> <description>This is an example user-defined cql statement</description> </template> </templates>
The template
element name
child element determines the title that the Query Wizard displays in the User-defined templates tab for this template.
Exit out of the Oracle CEP Visualizer and log back in.
For more information, see Section 1.2, "Starting the Oracle CEP Visualizer".
Open the Oracle CQL Query Wizard and locate your template in the User-defined templates tab as Figure 2-95 shows.
Figure 2-95 Query Wizard User-defined templates Tab
For more information, see Section 2.4.1, "Creating a Rule in an Oracle CQL Processor Using the Query Wizard".
This section describes the various tools along the top of the Query Wizard canvas as Figure 2-96 shows.
You use these tools to manage the Query Wizard diagram of your Oracle CQL statement.
Use the Choose Layout pull-down menu to select alternate ways of distributing CQL constructs and showing their dependencies. You can choose any of:
Left-Right
Bottom-Top
Right-Left
Top-Bottom
Click the Clear Canvas button to erase the current Oracle CQL statement and its diagram from the Query Wizard canvas.
Click the Save Query button at any time (even if you have not yet completed your Oracle CQL statement) to save your work to your local disk instead of the host.
Check the Hover option to display the Oracle CQL statement fragment associated with a given stage when you hover your mouse pointer over that stage.
Uncheck the Hover option to disable this feature.
Click the Zoom In and Zoom Out buttons to change the zoom level. This is an alternative to using the Zoom slider (see Section 2.4.8.9, "Zoom").
Click the Fit Content button to adjust the zoom level automatically to make all of the diagram visible in the current browser window.
Click the Toggle Constructs button to alternately hide and show the CQL Constructs and Templates gallery.
Use the Zoom slider to increase or decrease the zoom level. This is an alternative to using the Zoom In and Zoom Out buttons (see Section 2.4.8.6, "Zoom In and Zoom Out").
Oracle CEP Visualizer provides a sophisticated Query Plan facility to simplify Oracle CQL query optimization.
Using the Query Plan facility, you can decompose a given Oracle CQL processor into its internal operators, states, and synopsis and you can gather various statistics on these operators such as incoming and outgoing number of messages. The Query Plan facility generates one query plan per Oracle CQL processor and applies to all the queries and views you define on that Oracle CQL processor.
The Oracle CQL Query Plan facility is designed to allow system administrators to efficiently diagnose and optimize Oracle CQL query performance.
Note:
Before Oracle CEP Visualizer can generate a query plan, there must be at least one running Oracle CQL query (with the Running attribute set totrue
) on the Oracle CQL processor. For more information, see Section 2.4.5, "Viewing a Rule in an Oracle CQL Processor".To view a query plan for an Oracle CQL processor:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Select appname, where appname is the name of the application you want to use.
Select the Oracle CQL processor you wish to use:
To use the EPN diagram:
Click the Event Processing Network tab.
Double-click the Oracle CQL processor you wish to use.
To use the domain tree:
Expand the appname > Stages node, where appname is the name of the application you want to use.
Click the Oracle CQL processor you wish to use.
In the right pane, click the General tab
The Processor panel is displayed as Figure 2-36 shows.
Click the Query Plan tab.
The Query Plan tab appears as Figure 2-98 shows.
For information on the various tools along the top of the Query Plan canvas, see Section 2.4.10, "Managing the Query Plan Diagram".
To view properties and values in the Property table for any stage, do either of the following:
Click the stage icon in the query plan diagram on the right.
The corresponding row in the Data table on the left is also selected.
Click the row in the Data table on the left that corresponds to the stage.
The corresponding stage icon in the query plan diagram is also selected.
To configure the query plan, click the Query Plan Preference button.
The Query Plan Preference dialog appears as Figure 2-99 shows.
Edit the dialog as Table 2-31 describes.
Table 2-31 Query Plan Preference Attributes
Attribute | Description |
---|---|
|
Check this option to have Oracle CEP display store and states in the query plan diagram. |
|
Check the statistics you want to see in the Data table on the Query Plan tab. To configure the statistics displayed in the table, select:
To configure the statistics displayed in the graph, select:
Note: The Threshold value applies to the statistic you select here |
|
The maximum value for the Displayed Operator Stats Field in Graph statistic. If a stage exceeds this threshold, the value is colored on the query plan diagram using the color you specify for Alert Color. Default: 500. |
|
Choose the color used to highlight stages that violate their threshold in the query plan display. If you do not want to show violations in color, select white as the alert color. Default: red. |
|
Specify the frequency at which Oracle CEP collects statistics (in seconds). Default: 5. |
To start gathering statistics, click the Get Stats button.
The Get Stats button turns into a Stop Stats button.
The Data table columns display the current statistics (according to your Displayed Operator Stats Fields in Table preference configuration) and threshold violations (according to your Displayed Operator Stats Field in Graph and Threshold preference configuration) are shown in the query plan diagram in red as Figure 2-100 shows.
Figure 2-100 Query Plan While Getting Statistics
To stop getting statistics, click the Stop Stats button.
To drill-down into a stage to determine rate determining steps, do either of the following:
Click the stage icon in the query plan diagram on the right that shows a threshold violation.
The corresponding row in the Data table on the left is also selected and
Click the row in the Data table on the left that corresponds to the stage.
The corresponding stage icon in the query plan diagram is also selected.
To view dependencies amongst stages, click on an Output row in the Data table.
All the dependent stages are selected in the query plan diagram as Figure 2-101 shows.
Figure 2-101 Query Plan Showing Dependencies
This section describes the various tools along the top of the Query Wizard canvas as Figure 2-102 shows.
You use these tools to manage the Query Wizard diagram of your Oracle CQL statement.
Use the Choose Layout pull-down menu to select alternate ways of distributing CQL constructs and showing their dependencies. You can choose any of:
Left-Right
Bottom-Top
Right-Left
Top-Bottom
Use the Collapse All and Expand All buttons to collapse or expand the entries in the Data table.
Use the Get Statistics button to instruct Oracle CEP to begin collecting statistics for the stages of the query plan.
When you click on the Get Statistics button, it turns into a Stop Statistics button. Click the Stop Statistics button to stop collecting statistics.
Use the Show Legend check box to show (checked) or hide (unchecked) the CQL Constructs Legend.
Use the Preferences button to open the Query Plan pre-Renaissance dialog as Figure 2-99 shows.
Click the Fit Content button to adjust the zoom level automatically to make all of the diagram visible in the current browser window.
This section describes:
For more information, see:
Note:
Oracle CQL replaces Event Processing Language (EPL) in Oracle CEP Release 11gR1 (11.1.1). Oracle CEP supports EPL for backwards compatibility. For more information, see Section 2.4, "Managing Oracle CQL Rules".You can create a new rule in an existing Oracle CEP application that uses one or more EPL processors.
To create a rule in an EPL processor:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Expand the appname > Stages node to see a list of the EPN stages in the domain tree, where appname is the name of the application.
Click the EPL processor in which you want to create an EPL rule.
The Processor panel is displayed as Figure 2-103 shows.
In the right pane, click the Rules tab.
The Rules tab appears as Figure 2-104 shows.
Click in the Rule ID field and enter the name of the rule you want to create.
Click in the Rule field and enter the EPL query string.
Click Create Rule.
A confirmation dialog appears as Figure 2-105 shows.
Click OK.
You can delete an existing rule in an existing Oracle CEP application that uses one or more EPL processors.
To delete a rule in an EPL processor:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Expand the appname > Stages node to see a list of the EPN stages in the domain tree, where appname is the name of the application.
Click the EPL processor in which you want to create an EPL rule.
The Processor panel is displayed as Figure 2-103 shows.
In the right pane, click the Rules tab.
The Rules tab appears as Figure 2-107 shows.
Decide what rules you want to delete:
To delete a single rule:
Select the rule you want to delete.
Click Delete Rule
A confirmation dialog appears as Figure 2-108 shows.
To delete all rules:
Click Cancel to unselect any rules that may be currently selected.
Click Delete All Rules.
A confirmation dialog appears as Figure 2-108 shows.
Click OK.
You can use the replace rule feature of Oracle CEP Visualizer to modify an existing rule. However, you should use this feature with extreme caution; this is because, internally, Oracle CEP Visualizer first deletes the rule and then adds it back again with the replaced text. The deletion of the rule causes all states to be lost before the rule is added again. For this reason, you should replace only stateless rules.
To replace a rule associated with an EPL processor:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Expand the appname > Stages node to see a list of the EPN stages in the domain tree, where appname is the name of the application.
Click the EPL processor in which you want to create an EPL rule.
The Processor panel is displayed as Figure 2-103 shows.
In the right pane, click the Rules tab.
The Rules tab appears as Figure 2-107 shows.
Select the rule you want to replace.
Click in the Rule field and enter the new EPL query string.
Click Replace Rule.
A confirmation dialog appears as Figure 2-105 shows.
Click OK.
The com.bea.wlevs.dataservices
application includes the MonitorProcessor
which in turn is associated with a default rule used to filter the events that are outputted to the diagnostic Dashboard. You can change this rule, or add new ones, if you want to customize this filtering.
You can only change the dataservices application event filter rule using EPL rules.
The event type used in an EPL rule is com.bea.wlev.dataservice.cep.DSMonitorEvent
; it has the following properties:
profile
—Name of the diagnostic profile.
date
—Date and timestamp.
metric
—Metric number.
start
—Start stage name.
end
—End stage name.
type
—The type of metric; valid values are avg-latency
, avg-throughput
or max-latency
.
application
—Application name
For example, if you want to filter the monitoring events by type and metric, you might change the EPL rules to the following:
SELECT * FROM DSMonitorEvent RETAIN 1 EVENT WHERE metric < 300 AND type = 'avg-latency' SELECT * FROM DSMonitorEvent RETAIN 1 EVENT WHERE metric < 300 AND type = 'avg-throughput' SELECT * FROM DSMonitorEvent RETAIN 1 EVENT WHERE metric < 300 AND type = 'max-latency'
If you want to continuously view three events where the number of metrics is less than 300 and group the events by type, try this EPL rule:
SELECT *, COUNT(metric) FROM DSMonitorEvent RETAIN BATCH OF 3 EVENTS PARTITION BY type WHERE metric < 300 HAVING COUNT(metric) = 3 OUTPUT LAST 1 EVERY 3 EVENTS
If you want to continuously view three events where the average number of metrics is less than 300 and group the events by type, try this EPL rule:
SELECT *, AVG(metric) FROM DSMonitorEvent RETAIN BATCH OF 3 EVENTS PARTITION BY type HAVING AVERAGE(metric) < 300 OUTPUT LAST 1 EVERY 3 EVENTS
For more information, see Oracle CEP EPL Language Reference.
To change the dataservices application event filter rule using EPL:
In the left pane, click Domain > Server > Applications > com.bea.wlevs.dataservices > Stages > MonitorProcessor, where Domain
is the name of your domain and Server
is the name of your server.
In the right pane, click the Rules tab.
The Rules tab appears as Figure 2-113 shows.
To create a new Rule, enter a the name of the rule in the Rule ID field, enter the EPL query string in the Rule field, then click Create Rule.
For more information, see Section 2.5.1, "Creating a Rule in an EPL Processor".
To delete an existing rule, select a rule in the table and click Delete Rule.
For more information, see Section 2.5.2, "Deleting a Rule From an EPL Processor".
To change the default rule, click its name in the Rules table, make the change in the Rule field in the Working Area, and click Replace Rule.
For more information, see Section 2.5.3, "Replacing a Rule in an EPL Processor".