I'm just starting testing WSO2 CEP. I'm using version 3.1.0.
I've done a first successful test with a single attribute event and a very simple query. But no, I've tried to make the test a bit more realistic, and added more attributes to my events, and a more complex query. The Execution Plan XML file copy is at the end of my message.
I don't understand why the "insert into so" statement in the query produces an error message, stating that the output stream is defined twice. Indeed, the stream is exported.
When I delete the "insert into so", the plan is deployed, but no event ever gets out...
Any idea of what I don't do as expected ?
Thanks for your help.
Regards.
The XML file :
<?xml version="1.0" encoding="UTF-8"?>
<executionPlan name="Fifi_Test_Execution_Plan_1" statistics="enable"
trace="enable" xmlns="http://wso2.org/carbon/eventprocessor">
<description/>
<siddhiConfiguration>
<property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>
<property name="siddhi.enable.distributed.processing">false</property>
</siddhiConfiguration>
<importedStreams>
<stream as="si" name="Fifi_Test_Event_Stream_1" version="1.0.0"/>
</importedStreams>
<queryExpressions><![CDATA[
from si#window.timeBatch(10 sec)
select code, count(code) as number, sum(value) as total
group by code
insert into so;
]]></queryExpressions>
<exportedStreams>
<stream name="Fifi_Test_Event_Stream_2" valueOf="so" version="1.0.0"/>
</exportedStreams>
</executionPlan>
The error message :
Exception: Invalid query specified, Stream so is already defined as StreamDefinition{streamId='so', attributeList=[Attribute{name='code', type=STRING}, Attribute{name='number', type=LONG}, Attribute{name='total', type=INT}]}, hence cannot define StreamDefinition{streamId='so', attributeList=[Attribute{name='code', type=STRING}, Attribute{name='number', type=LONG}, Attribute{name='total', type=LONG}]}