This is what my input XML data looks like:
<property>
<name>stringName</name>
<value>stringValue</value>
</property>
Actual data:
<events>
<event>
<payloadData>
<property>
<name>event_GUID</name>
<value>0ca0dfbe-087f-11e5-b174-00215e2f4ade</value>
</property>
<property>
<name>event_Value_1</name>
<value>0</value>
</property>
....
</event>
</events>
How do I map the data into WSO2CEP streams? ie: what does the eventreceiver, eventstream and executionplan supposed to look like? I can get the first name/value but I cannot get subsequent values.
First, create an event stream. With the attribute names and types which you will map the XML data.
Since your actual data different from our default XML sturcture as below
, you will have to use the custom xml option. You can activate custom mapping by clicking on the "advanced" option on the bottom of the page when you create event receiver as follows
. Then, what you have to do is, give the XPath of the XML data attribute value you need to map to the created event stream attribute. You don't need to have any execution plans to do the mapping.
You need execution plans only after you receive events from the receiver and pumped it to the event streams to do the processing.
Best Regards, Ramindu.