An event builder converts different input event formats such as WSO2Event, XML, Map (Key-value pairs), JSON into a uniform format that is supported by the CEP or any other event consumer. It handles input mappings for the CEP.
To create an event builder via the management console UI, you must have an event stream definition and an input event adapter added before hand.
For an event builder to be active, the stream to which that builder is publishing must be defined. Also, for WSO2 events, the incoming stream definition also must be defined. If an event builder is in inactive state then there will be a short message specifying the reason why the event builder is inactive ( in inactive event builders section in management console) . Usually a similar message will be printed to console as well.
This section covers different types of event builders that CEP supports and how to configure them:
A default event builder is created every time you create a stream definition (or if a stream definition is created by a client sending events). This event builder will be a WSO2Event Event Builder with custom mapping disabled. The name will be automatically generated according to the name of the stream as <stream_name>_<version>. e.g. if the stream is named org.wso2.mediation.stats, with the version 1.0.0, the event builder name will be org.wso2.mediation.stats_1.0.0
Event builder exports a looks for a stream definition based on the mapping specified (when custom mapping is enabled). When specifying the attribute to which a particular incoming event is matched, the following convention is used to distinguish between meta, correlation and payload attributes.
The name attribute in the <to> tag in a mapping will be used to identify the attribute type.