final NamedWindowProcessorInstance processorInstance = processor.getProcessorInstance(getDefaultAgentInstanceContext(statementContext));
EPStatementStopMethod stopMethod;
if (processor.isVirtualDataWindow()) {
final VirtualDWView virtualDWView = processorInstance.getRootViewInstance().getVirtualDataWindow();
virtualDWView.handleStartIndex(spec);
stopMethod = new EPStatementStopMethod() {
public void stop() {
virtualDWView.handleStopIndex(spec);
}
};