Table Nested Stages Components of the Oracle CEP Event Processing Network

Overview of Creating Oracle CEP Applications 1-5 wlevs:adapter wlevs:channel id=helloworldInputChannel event-type=HelloWorldEvent wlevs:listener ref=helloworldProcessor wlevs:source ref=helloworldAdapter wlevs:channel wlevs:processor id=helloworldProcessor wlevs:channel id=helloworldOutput event-type=HelloWorldEvent advertise=true wlevs:listener bean class=com.bea.wlevs.example.helloworld.HelloWorldBean wlevs:listener wlevs:source ref=helloworldProcessor wlevs:channel Alternatively, you can define this EPN so that all nodes are nested as Example 1–2 shows. The helloworldAdapter, the outermost parent stage, is the only stage accessible to other stages in the EPN. Example 1–2 EPN Assembly File With all Nodes Nested wlevs:adapter id=helloworldAdapter class=com.bea.wlevs.adapter.example.helloworld.HelloWorldAdapter wlevs:instance-property name=message value=HelloWorld - the current time is: wlevs:listener wlevs: id=helloworldInput event-type=HelloWorldEvent wlevs:listener wlevs:processor id=helloworldProcessor wlevs:listener wlevs: id=helloworldOutput event-type=HelloWorldEvent wlevs:listener bean class=com.bea.wlevs.example.helloworld.HelloWorldBean wlevs:listener wlevs: wlevs:listener wlevs:processor wlevs:listener wlevs: wlevs:listener wlevs:adapter For more information, see Section 6.2.9, Nested Stages .

1.1.1.9 Foreign Stages

You can refer to a stage simply by its id attribute when you define both the source and target stage in the same application. To refer to a stage you define in a different application, you use the following syntax: FOREIGN-APPLICATION-NAME :FOREIGN-STAGE-ID Where FOREIGN-APPLICATION-NAME is the name of the application in which you defined the foreign stage and FOREIGN-STAGE-ID is the id attribute of the foreign stage. Example 1–3 shows how the reference in application1 to the foreign stage HelloWorldBeanSource that you define in application application2. Example 1–3 Application 1 Referencing Foreign Stage in Application 2 wlevs:stream id=helloworldInstream wlevs:listener ref=helloworldProcessor wlevs:source ref=application2:HelloWorldBeanSource 1-6 Oracle Complex Event Processing Developers Guide wlevs:stream Example 1–4 Foreign Stage in Application 2 wlevs:event-bean id=HelloWorldBeanSource class=com.bea.wlevs.example.helloworld.HelloWorldBeanSource advertise=true The following stages cannot be foregin stages: ■ Cache When creating Oracle CEP applications with foreign stages, you must consider foreign stage dependencies when assembling, deploying, and redeploying your application. For more information, see Section 24.2.3, Assembling Applications With Foreign Stages