This documentation is for WSO2 Complex Event Processor 4.0.0. View documentation for the latest release.
WSO2 Complex Event Processor is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
from arrivals_stream#window.time(2 minutes)
select *
insert expired events into overdue_deliveries_stream;

from every arrivalEvent = arrivals_stream ->
deliveryEvent = deliveries_stream[arrivalEvent.trackingId == trackingId] 
    or overdue_delivery = overdue_deliveries_stream[arrivalEvent.trackingId == trackingId]
select arrivalEvent.trackingId as trackingId, arrivalEvent.customerName as customerName, arrivalEvent.telephoneNo as telephoneNo, deliveryEvent.trackingId as deliveryId 
insert into filter_stream;

from filter_stream [ isNull(deliveryId is null)]  
select trackingId, customerName, telephoneNo
insert into alert_stream;  


To detect whether the delivery event is null, we use the third query isNullquery (deliveryId is null) where the deliveryId will be null if the delivery event is null.