This content has been marked as final. Show 9 replies
Just to add to this - there is a related thread on this forum
Re: Examples of programatic creation of EPN elements
It has the following statement "There is nothing stopping you writing an event bean that manages its own "channels" (written by you)"
How can I write a event bean that manages channels - I am taking that manages here means "creating" channels. Please let me know
To pre-create a channel, shouldn't we know what kind of events the channel will contain? One does not know the event-type of the query output beforehand and it may not map into existing event-types. Because of 1:1 mapping between channel and event, we cannot create any anticipatory channels before hand.
Please confirm as this is a crucial requirement for us.
You can't create channels dynamically within an application, however you can dynamically deploy new applications that provide new channels to a processor of another application.
For example, say you have a processor called helloworldProcessor in an application named helloworld.
You can deploy a new application that has the following EPN:
<wlevs:channel id="newHelloworldOutputChannel" event-type="HelloWorldEvent" advertise="true">
Hope this helps,
Thanks for the reply. Even if we can dynamically spin off a new channel in a new application, your explanation is assuming that the event-type is still known beforehand. What if my dynamic query does NOT output HelloWorldEvent but outputs data that is not known before hand? We need to think in terms of some generic data - something like a map of name, value pairs. How does CEP handle this use case? From the information I collected so far, it sounds like this is not supported.
I guess we need channels that can support a concept of a generic event type.
It does not need to be for every query, but only for those queries that output a different structure, which in all likelihood, would also mean you need a different Java class handling the event downstream anyway.
But, perhaps if it is the case that you have a generic Java sink, then the option to go for is indeed that of the EventBuilder route (i.e. generic event-type).
Hope this helps,
Can you please show me an example how you visualize configuring a generic event-type (using EventBuilder) to a new channel in the new application (for a new query with a new output)? The event builder API will basically return an event of type Object. (createEvent() in com.bea.wlevs.ede.api.EventBuilder )