else
{
ResultSetProcessor[] processors = new ResultSetProcessor[splitDesc.getProcessorFactories().length];
for (int i = 0; i < processors.length; i++) {
ResultSetProcessorFactoryDesc factory = splitDesc.getProcessorFactories()[i];
ResultSetProcessor processor = factory.getResultSetProcessorFactory().instantiate(null, null, agentInstanceContext);
processors[i] = processor;
}
OnTriggerSplitStreamDesc desc = (OnTriggerSplitStreamDesc) statementSpec.getOnTriggerDesc();
onExprView = new RouteResultView(desc.isFirst(), activatorResultEventType, statementContext.getEpStatementHandle(), services.getInternalEventRouter(), splitDesc.getNamedWindowInsert(), processors, splitDesc.getWhereClauses(), statementContext);
}
// attach stream to view
final ViewableActivationResult activationResult = activator.activate(agentInstanceContext);
activationResult.getViewable().addView(onExprView);
stopCallbacks.add(activationResult.getStopCallback());
// start subselects
subselectStrategies = EPStatementStartMethodHelperSubselect.startSubselects(services, subSelectStrategyCollection, agentInstanceContext, stopCallbacks);
// attach view to output: for on-delete, create an output processor that passes on as a wildcard the underlying event
if ((statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_DELETE) ||
(statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_SET) ||
(statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_UPDATE) ||
(statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_MERGE))
{
ResultSetProcessor outputResultSetProcessor = outputResultSetProcessorPrototype.getResultSetProcessorFactory().instantiate(null, null, agentInstanceContext);
// Attach output view
View outputView = outputProcessViewFactory.makeView(outputResultSetProcessor, agentInstanceContext);
onExprView.addView(outputView);
onExprView = outputView;