protected void process(StateEvent stateEvent, ComplexEventChunk complexEventChunk) {
        switch (type) {
            case AND:
                boolean process = false;
                if (partnerPreStateProcessor instanceof AbsentLogicalPreStateProcessor) {
                    process = ((AbsentLogicalPreStateProcessor) partnerPreStateProcessor).partnerCanProceed(stateEvent);
                } else if (stateEvent.getStreamEvent(partnerPreStateProcessor.getStateId()) != null) {
                    // Event received from a present processor
                    process = true;
                }

                if (process) {
                    super.process(stateEvent, complexEventChunk);
                } else {
                    thisStatePreProcessor.stateChanged();
                }
                break;
            case OR:
                super.process(stateEvent, complexEventChunk);
                if (partnerPostStateProcessor.nextProcessor != null && thisStatePreProcessor.thisLastProcessor ==
                        partnerPostStateProcessor) {
                    // 'from A or B select' scenario require this
                    partnerPostStateProcessor.isEventReturned = true;
                }
                break;
            default:
                break;
        }
    }
//     * Process the handed StreamEvent
//     *
//     * @param complexEventChunk event chunk to be processed
//
modules/siddhi-core/src/main/java/io/siddhi/core/query/input/stream/state/LogicalPostStateProcessor.java