Streams and Channels Oracle CEP represents a stream as a channel as

1-6 Oracle Complex Event Processing CQL Language Reference wlevs:channel id=priceStream event-type=PriceEvent wlevs:listener ref=filterFanoutProcessor wlevs:channel wlevs:processor id=filterFanoutProcessor provider=cql wlevs:listener ref=filteredStream wlevs:processor ...

1.1.1.1.3 Querying a Channel Once the event source, channel, and processor are

connected as Figure 1–2 shows, you can write Oracle CQL statements that make use of the stream. Example 1–4 shows the component configuration file that defines the Oracle CQL statements for the filterFanoutProcessr. Example 1–4 filterFanoutProcessor Oracle CQL Query Using priceStream processor namefilterFanoutProcessorname rules query id=Yr3Sector[CDATA[ select cusip, bid, srcId, bidQty, ask, askQty, seq from priceStream where sector=3_YEAR ]]query query id=Yr2Sector[CDATA[ select cusip, bid, srcId, bidQty, ask, askQty, seq from priceStream where sector=2_YEAR ]]query query id=Yr1Sector[CDATA[ select cusip, bid, srcId, bidQty, ask, askQty, seq from priceStream where sector=1_YEAR ]]query rules processor

1.1.1.1.4 Controlling Which Queries Output to a Downstream Channel If you specify more

than one query for a processor as Example 1–4 shows, then all query results are output to the processor’s out-bound channel filteredStream in Figure 1–2 . Optionally, in the component configuration file, you can use the channel element selector attribute to control which query’s results are output as Example 1–5 shows. In this example, query results for query Yr3Sector and Yr2Sector are output to filteredStream but not query results for query Yr1Sector. For more information, see Channel Component Configuration in the Oracle Complex Event Processing Developers Guide for Eclipse. Example 1–5 Using channel Element selector Child Element to Control Which Query Results are Output to a Channel channel namefilteredStreamname selectorYr3Sector Yr2Sectorselector channel You may configure a channel element with a selector before creating the queries in the upstream processor. In this case, you must specify query names that match the names in the selector. For more information, see Controlling Which Queries Output to a Downstream Channel in the Oracle Complex Event Processing Developers Guide for Eclipse.