How to Inject a Simple Event on an Event Inspector Service Dynamic Channel

Managing the Event Processing Network 4-35 Figure 4–36 The Inject Event Tab: Start

6. Click Start.

An alert dialog appears as Figure 4–31 shows. Figure 4–37 Inject Event Start Confirmation Dialog

7. Click OK.

The Status field reads ON. The Channel Name field shows the dynamic channel on which events passing through this stage are injected. The Event Inspector service HTTP pub-sub channel is named: SERVERNAMEAPPLICATIONNAMESTAGENAMEinput Where: ■ SERVERNAME : the name of the Oracle CEP server on which the application and stage you want to trace are executing. ■ APPLICATIONNAME : the name of the Oracle CEP application that owns the stage you want to trace. ■ STAGENAME : the name of the the Oracle CEP application stage you want to trace. For example: NonClusteredServercqlorderCSVAdapterinput.

8. In the top pane, click ViewStream.

The Stream Visualizer panel appears as Figure 4–38 shows. 4-36 Oracle Complex Event Processing Visualizer Users Guide Figure 4–38 Stream Visualizer ViewStream: Publishing Simple Events

9. In the PubSub Server Name pull down menu, select the name of the HTTP

pub-sub server to use to trace events.

10. Click Initialize Client.

11. Select the Publish tab.

12. Click Refresh.

The Publish tab is refreshed to show the dynamic channel for your stage. 13. Click the radio button next to the name of the channel to which the Oracle CEP server will inject messages. For example: NonClusteredServercqlorderCSVAdapteroutput.

14. From the Input Method radio button group, select Form Based Event.

15. From the Event Type pull down menu, select an event type.

The View Stream panel updates to list the attributes of the event type you select. For example, Figure 4–38 shows the attributes for the DataStockTick event, which include: ■ Price ■ Symbol Managing the Event Processing Network 4-37 ■ PercChange ■ Volume ■ LastPrice 16. Configure the attributes for the event type you selected. Hover your mouse over an attribute field to display a tool tip that indicates the data type for the attribute.

17. Click Publish.

Oracle CEP Visualizer publishes the event on the Event Inspector service dynamic channel and it is received and processed by the stage that the channel identifies. 18. To stop event injection, select the stage you configured for event injection: a. To use the EPN diagram: – Right-click the stage for which you wish to inject an event and select Inject Event . b. To use the domain tree: – Expand the appname Stages node, where appname is the name of the application in which you want to trace and inject events. – Click the stage for which you wish to inject an event. – In the right pane, click the Inject Event tab The Inject Event panel appears as shown in Figure 4–39 . Note: The View Stream Event Type pull down menu lists all the events defined in the event type repository that meet the restrictions that Section 4.4.2, How to Inject a Simple Event on an Event Inspector Service Dynamic Channel describes. To inject a more complex events, see Section 4.4.3, How to Inject an Event as a JSON String on an Event Inspector Service Dynamic Channel . 4-38 Oracle Complex Event Processing Visualizer Users Guide Figure 4–39 The Inject Event Tab: Stop

19. Click Stop.

An alert dialog appears as Figure 4–31 shows. Figure 4–40 Inject Event Stop Confirmation Dialog

20. Click OK.

The Status field reads OFF. The Channel Name field is blank.

4.4.3 How to Inject an Event as a JSON String on an Event Inspector Service Dynamic Channel

You can inject a single event directly to the HTTP pub-sub channel as a JSON-formatted character string. You can use any event property that JSON can represent. For details on the Event Inspector service JSON event structure and mandatory attributes, see Event Inspector Event Types in the Oracle Complex Event Processing Developers Guide for Eclipse. Alternatively, you can inject a simple, pre-existing event. For more information, see Section 4.4.2, How to Inject a Simple Event on an Event Inspector Service Dynamic Channel . Managing the Event Processing Network 4-39 To inject an event as a JSON string on an Event Inspector service 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. Figure 4–41 Event Processing Network Panel

5. Select the stage for which you wish to inject events:

a. To use the EPN diagram:

– Right-click the stage for which you wish to inject an event and select Inject Event .

b. To use the domain tree:

– Expand the appname Stages node, where appname is the name of the application in which you want to trace and inject events. – Click the stage for which you wish to inject an event. Note: The Event Inspector service is not for use on a production Oracle CEP server. It is for use only during development. 4-40 Oracle Complex Event Processing Visualizer Users Guide – In the right pane, click the Inject Event tab The Inject Event panel appears as shown in Figure 4–30 . Figure 4–42 The Inject Event Tab: Start

6. Click Start.

An alert dialog appears as Figure 4–31 shows. Figure 4–43 Inject Event Start Confirmation Dialog

7. Click OK.

The Status field reads ON. The Channel Name field shows the dynamic channel on which events passing through this stage are injected. The Event Inspector service HTTP pub-sub channel is named: SERVERNAMEAPPLICATIONNAMESTAGENAMEinput Where: ■ SERVERNAME : the name of the Oracle CEP server on which the application and stage you want to trace are executing. ■ APPLICATIONNAME : the name of the Oracle CEP application that owns the stage you want to trace. ■ STAGENAME : the name of the the Oracle CEP application stage you want to trace.