How to Playback Events

Managing the Event Processing Network 4-25 ■ 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.

5. 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 4–3 shows. Example 4–3 recplay Application Configuration File config.xml: stream Element stream nameeventStreamname playback-parameters dataset-namerecplay_sampledataset-name event-type-list event-typeSimpleEventevent-type event-type-list provider-nametest-rdbms-providerprovider-name playback-parameters max-size10000max-size max-threads2max-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 4–4 shows. When using the default Berkeley database provider, select default provider . Example 4–4 recplay Oracle CEP Server Configuration File config.xml: data-source and rdbms-event-store-provider Elements data-source namederby1name connection-pool-params initial-capacity15initial-capacity max-capacity50max-capacity connection-pool-params driver-params urljdbc:derby:dbtest1;create=trueurl driver-nameorg.apache.derby.jdbc.EmbeddedDriverdriver-name driver-params data-source rdbms-event-store-provider nametest-rdbms-providername 4-26 Oracle Complex Event Processing Visualizer Users Guide data-source-namederby1data-source-name rdbms-event-store-provider For more information, see Chapter 13, Managing Data Sources .

6. 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 Chapter 16, Managing the Event Type Repository . 7. Decide what you want to do:

a. To add a new playback schedule entry, click Add.

b. To modify an existing playback filter entry, select the entry in the Playback

Filter Entry table and click Edit. c. To modify an existing playback schedule entry, select the entry in the Playback Schedule Entry table and click Edit. d. To delete an existing playback filter or schedule entry, select the entry in the appropriate table and click Delete. 8. Decide when you want playback to start and end: a. 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 4–26 shows. Figure 4–26 Playback Schedule Confirmation Dialog – Click OK.

b. 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 4–27 shows. Managing the Event Processing Network 4-27 Figure 4–27 Playback Schedule Confirmation Dialog – Click OK.

c. If you want to playback events immediately:

– Click Save. An alert dialog appears as Figure 4–22 shows. Figure 4–28 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. 9. Decide when you want to stop playback: a. If you scheduled a stop time, event playback will stop at that time.

b. If you want to stop event playback immediately, click Stop.

4.4 Tracing and Injecting Events in the EPN

Using the Event Inspector service and the stream visualizer, you can: ■ Trace events on any HTTP pub-sub server channel. ■ Trace events on any stage in the EPN on the Event Inspector service dynamic HTTP pub-sub server channel. ■ Inject events to any HTTP pub-sub server channel ■ Inject events into any stage in the EPN using the Event Inspector service dynamic HTTP pub-sub server channel. This section describes: Note: The Event Inspector service is not for use on a production Oracle CEP server. It is for use only during development. 4-28 Oracle Complex Event Processing Visualizer Users Guide ■ Section 4.4.1, How to Trace Events on a Dynamic Channel ■ Section 4.4.2, How to Inject a Simple Event on an Event Inspector Service Dynamic Channel ■ Section 4.4.3, How to Inject an Event as a JSON String on an Event Inspector Service Dynamic Channel For more information, see: ■ Chapter 15, Managing the Event Inspector Service ■ Chapter 14, Managing HTTP Publish-Subscribe Servers ■ Section 4.5, Monitoring a Channel Stage in the EPN ■ Testing Applications With the Event Inspector in the Oracle Complex Event Processing Developers Guide for Eclipse Alternatively, you can record and playback events as Section 4.3, Recording and Playing Back Events in the EPN describes.

4.4.1 How to Trace Events on a Dynamic Channel

You can use Oracle CEP Visualizer to view the messages that are currently being published to a static channel. For more information, see Section 9.5, HTTP Publish-Subscribe Server Management . To trace events on a dynamic channel: 1. Optionally, configure the HTTP pub-sub server to use to trace events. See Chapter 15, Managing the Event Inspector Service .

2. In the left pane, navigate to and expand the Applications node of the Oracle CEP

instance to which the application is deployed.

3. Select appname, where appname is the name of the application in which you want

to trace and inject events.

4. In the right pane, click the Event Processing Network tab.

The Event Processor Network panel is displayed as Figure 4–24 shows.