public synchronized void process(Map<String, StreamEvent> groupedByEvents) {
        for (Map.Entry<String, StreamEvent> eventEntry : groupedByEvents.entrySet()) {
            synchronized (this) {
                SiddhiAppContext.startGroupByFlow(eventEntry.getKey() + "-" +
                        eventEntry.getValue().getTimestamp());
                ValueState state = valueStateHolder.getState();
                try {
                    boolean shouldUpdate = true;
                    if (shouldUpdateTimestamp != null) {
                        shouldUpdate = shouldUpdate(shouldUpdateTimestamp.execute(eventEntry.getValue()), state);
                    }
                    for (int i = 0; i < expressionExecutors.size(); i++) { // keeping timestamp value location as null
                        ExpressionExecutor expressionExecutor = expressionExecutors.get(i);
                        if (shouldUpdate) {
                            state.setValue(expressionExecutor.execute(eventEntry.getValue()), i + 1);
                        } else if (!(expressionExecutor instanceof VariableExpressionExecutor)) {
                            state.setValue(expressionExecutor.execute(eventEntry.getValue()), i + 1);
                        }
                    }
                    setProcessed(true);
                } finally {
                    valueStateHolder.returnState(state);
                    SiddhiAppContext.stopGroupByFlow();
                }
            }
        }
    }
Store for maintaining the base values related to incremental aggregation. (e.g. for average,
the base incremental values would be sum and count. The timestamp too is stored here.
modules/siddhi-core/src/main/java/io/siddhi/core/aggregation/BaseIncrementalValueStore.java