Querying Stored Events Overview of Configuring Event Record and Playback

13-6 Oracle Complex Event Processing Developers Guide This section describes the main steps to configure a component to record events. For simplicity, it is assumed in the procedure that you are configuring an adapter to record events and that you have already created its component configuration file. See Section B.2, Component Configuration Schema wlevs_application_config.xsd for the complete XSD Schema that describes the event recording configuration file elements. Using your favorite XML editor, open the component configuration XML file and add a record-parameters child element to the component you want to configure to record events. For example, to configure an adapter called simpleEventSource: ?xml version=1.0 encoding=UTF-8? n1:config xmlns:n1=http:www.bea.comnswlevsconfigapplication xmlns:xsi=http:www.w3.org2001XMLSchema-instance adapter namesimpleEventSourcename record-parameters ... record-parameters ... adapter ... n1:config Add child elements to record-parameters to specify the name of the event store provider, the events that are stored, the start and stop time for recording, and so on. For example: adapter namesimpleEventSourcename record-parameters dataset-namerecplay_sampledataset-name event-type-list event-typeSimpleEventevent-type event-type-list batch-size1batch-size batch-time-out10batch-time-out record-parameters adapter Table 13–2 lists the child elements of record-parameters that you can specify. Only dataset-name is required. Table 13–2 Child Elements of record-parameters Child Element Description dataset-name Specifies the group of data that the user wants to group together. In the case of BDB provider, the dataset name will be used as the database environment in Berkeley database. In the case of the Oracle RDBMS-based provider, it specifies the database area, or schema, in which the tables that store the recorded events are created. When configuring the Oracle RDBMS-based provider, you are required to specify this element. Configuring Event Record and Playback 13-7 event-type-list Specifies the event types that are recorded to the event store. If this element is not specified, then Oracle CEP records all event types that flow out of the component. Use the event-type child component to list one or more events, such as: event-type-list event-typeEventOneevent-type event-typeEventTwoevent-type event-type-list When configuring the Oracle RDBMS-based provider, you are required to specify this element. time-range Specifies the time period during which recording should take place using a start and end time. The time period is configured by using a start child element to specify a start time and an end child element to specify the end time. Express the start and end time as XML Schema dateTime values of the form: yyyy-mm-ddThh:mm:ss For example, to specify that recording should start on January 20, 2010, at 5:00am and end on January 20, 2010, at 6:00 pm, enter the following: time-range start2010-01-20T05:00:00start end2010-01-20T18:00:00end time-range For complete details of the XML Schema dateTime format, see http:www.w3.orgTRxmlschema-2dateTime-lexical-re presentation . If you do not specify a time period, then no events are recorded when the application is deployed and recording will only happen after you explicitly start it using Oracle CEP Visualizer or wlevs.Admin. You can specify time-range or time-range-offset, but not both. time-range-offset Specifies the time period during which recording should take place, using a start time and a duration. The time period is configured by using a start child element to specify a start time and duration child element to specify the amount of time after the start time that recording should stop. Express the start time as an XML Schema dateTime value of the form: yyyy-mm-ddThh:mm:ss Express the duration in the form: hh:mm:ss For example, to specify that recording should start on January 20, 2010, at 5:00am and continue for 3 hours, enter the following time-range-offset start2010-01-20T05:00:00start duration03:00:00duration time-range-offset For complete details of the XML Schema dateTime format, see http:www.w3.orgTRxmlschema-2dateTime-lexical-re presentation . If you do not specify a time period, then no events are recorded when the application is deployed and recording will only happen after you explicitly start it using Oracle CEP Visualizer or wlevs.Admin. You can specify time-range or time-range-offset, but not both. Table 13–2 Cont. Child Elements of record-parameters Child Element Description