public void setNext(ComplexEvent stateEvent) {
        next = (StateEvent) stateEvent;
    }
Implementation of StateEvent to be used when executing join/pattern queries
modules/siddhi-core/src/main/java/io/siddhi/core/event/state/StateEvent.java