I'm trying to understand the scenario

for the pattern
 Colombo -> Kandy -> Colombo

use

from every e1 = inputstream ->
e2 = inputstream[(e2.address != e1.address) and (e2.cardNum == e1.cardNum)]
->
e3 = inputstream[(e3.address == e1.address) and (e3.cardNum == e1.cardNum)]
 within 10000
select e1.cardNum, e1.address as add1, e2.address as add2
insert into outputStream


for the pattern
 Colombo -> Kandy -> Matara (!= Kandy)

use

from every e1 = inputstream ->
e2 = inputstream[(e2.address != *prev*.address) and (e2.cardNum ==
e1.cardNum)]*<2:>*
 within 10000
select e1.cardNum, e1.address as add1, *e2[last]*.address as add2
insert into outputStream

for the pattern
 Colombo -> Kandy -> Matara (!= Kandy && != Colombo)

use

from every e1 = inputstream ->
e2 = inputstream[(e2.address != e1.address) and (e2.cardNum == e1.cardNum)]
->
e3 = inputstream[(e3.address != e1.address) and (e3.address !=
e2.address)  and (e3.cardNum == e1.cardNum)]
 within 10000
select e1.cardNum, e1.address as add1, e2.address as add2,  e3.address as
add2
insert into outputStream

Please check and let me know if that works

Regards
Suho


On Fri, Oct 31, 2014 at 7:31 AM, Supun Muthutantrige <[email protected]>
wrote:

> We also used some similar workarounds, Yes, there are several limitations
> of such methods. For the moment we'll move on with it. We'll try with your
> workaround as well.
>
> Thank you for the input
>
> Thank you
> Regards
>
> *Supun Rasitha Muthutantrige*
> Software Engineer | Intern
> WSO2 Inc: http://wso2.com
> lean.enterprise.middleware
> Mobile: 0758374608
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*S. Suhothayan*
Technical Lead & Team Lead of WSO2 Complex Event Processor
 *WSO2 Inc. *http://wso2.com
* <http://wso2.com/>*
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
<http://suhothayan.blogspot.com/>twitter: http://twitter.com/suhothayan
<http://twitter.com/suhothayan> | linked-in:
http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to