Can we have conditional statements like below in wso2 cep execution plan.
from stream1
select distinct attr1
insert into newStream1;
from stream2
select distinct attr2
insert into newStream2;
if
count(attr1) == count(attr2)
then
-- do something
else
-- do something else
Use case explained:
Let's say I have execution plan which takes data from 3 different streams. Stream 1 gives data from device 1, stream 2 from device 2, ... so on.
I have a table stored in database already which stores total number of devices. In this case it stores 3 devices.
Now in the execution plan I get the data for a window of 5 minutes. And within this 5 minutes, only when I get data from all 3 streams, then only it should process the data. Else it should not.
If within 5 minutes window I get data from only 2 streams, then execution plan should discard it.