@Override
    protected StateFactory init(MetaStreamEvent metaStreamEvent,
                                AbstractDefinition inputDefinition,
                                ExpressionExecutor[] attributeExpressionExecutors,
                                ConfigReader configReader, StreamEventClonerHolder streamEventClonerHolder,
                                boolean outputExpectsExpiredEvents, boolean findToBeExecuted,
                                SiddhiQueryContext siddhiQueryContext) {
        if (attributeExpressionExecutors[0] instanceof ConstantExpressionExecutor) {
            expressionString = (String) ((ConstantExpressionExecutor)
                    attributeExpressionExecutors[0]).getValue();
            constructExpression(metaStreamEvent, siddhiQueryContext);
        } else {
            for (Attribute attribute : inputDefinition.getAttributeList()) {
                metaStreamEvent.addData(attribute);
            }
            expressionStringExecutor = attributeExpressionExecutors[0];
        }
        if (attributeExpressionExecutors.length > 1) {
            if (attributeExpressionExecutors[1] instanceof ConstantExpressionExecutor) {
                includeTriggeringEvent = (Boolean) ((ConstantExpressionExecutor)
                        attributeExpressionExecutors[1]).getValue();
            } else {
                includeTriggeringEventExecutor = attributeExpressionExecutors[1];
            }
            if (attributeExpressionExecutors.length > 2 &&
                    attributeExpressionExecutors[2] instanceof ConstantExpressionExecutor) {
                streamInputEvents = (Boolean) ((ConstantExpressionExecutor)
                        attributeExpressionExecutors[2]).getValue();
            }
        }
        return () -> new WindowState();
    }
Implementation of {@link WindowProcessor} which represent a Window operating based on a expression.
modules/siddhi-core/src/main/java/io/siddhi/core/query/processor/stream/window/ExpressionBatchWindowProcessor.java