// create root viewables
eventStreamParentViewable = new Viewable[numStreams];
patternRoots = new EvalRootState[numStreams];
for (int stream = 0; stream < eventStreamParentViewableActivators.length; stream++) {
ViewableActivationResult activationResult = eventStreamParentViewableActivators[stream].activate(agentInstanceContext, false, isRecoveringResilient);
viewableActivationResult[stream] = activationResult;
stopCallbacks.add(activationResult.getStopCallback());
suppressSameEventMatches = activationResult.isSuppressSameEventMatches();
discardPartialsOnMatch = activationResult.isDiscardPartialsOnMatch();
eventStreamParentViewable[stream] = activationResult.getViewable();
patternRoots[stream] = activationResult.getOptionalPatternRoot();
if (activationResult.getOptionalLock() != null) {
agentInstanceContext.getEpStatementAgentInstanceHandle().setStatementAgentInstanceLock(activationResult.getOptionalLock());
statementContext.setDefaultAgentInstanceLock(activationResult.getOptionalLock());
}
}
// compile view factories adding "prior" as necessary
List<ViewFactory>[] viewFactoryChains = new List[numStreams];