Siddhi logical pattern AND only works for a pair of events <p>I have been doing some tests using WSO2 Siddhi language and I came across something that I did no fully understand. It seems like a bug/limitation but I would like to hear your opinion/recommendations.</p> <ol> <li><p>Creating a chain of events using logical pattern. I tried to create a chain of 3 events connected by AND operator. Below is a very simple query I created:</p> <pre><code>from ea=event_a[ea.status == 1] and eb=event_b[eb.status == 2] and ec=event_c[ec.status == 3] select 'And_Test' as ID insert into outputStream; </code></pre></li> </ol> <p>When I try to test it using Siddhi Try it, it shows the following error message:</p> <blockquote> <p>You have an error in your SiddhiQL at line 10:1, extraneous input 'and' expecting {'[', '->', '#', SELECT, INSERT, DELETE, UPDATE, RETURN, OUTPUT, WITHIN}</p> </blockquote> <p>However, if I remove the third event from my query, it works fine. Below is the query that works fine:</p> <pre><code>from ea=event_a[ea.status == 1] and eb=event_b[eb.status == 2] select 'And_Test' as ID insert into outputStream; </code></pre> <p>It seems that I can only use AND for a pair of events. As I mentioned before, it seems like a bug/limitation. I tested it on both WSO2 CEP 4.1.0 and WSO2 CEP 4.2.0.</p>