if (scheduleAudit != null) {
schedulingService = new SchedulingServiceAudit(engineServices.getEngineURI(), statementName, schedulingService);
}
StatementAIResourceRegistry statementAgentInstanceRegistry = null;
ContextDescriptor contextDescriptor = null;
String optionalContextName = statementSpecRaw.getOptionalContextName();
if (optionalContextName != null) {
contextDescriptor = engineServices.getContextManagementService().getContextDescriptor(optionalContextName);
// allocate a per-instance registry of aggregations and prev/prior/subselect
if (contextDescriptor != null) {
statementAgentInstanceRegistry = contextDescriptor.getAiResourceRegistryFactory().make();
}
}
boolean countSubexpressions = engineServices.getConfigSnapshot().getEngineDefaults().getPatterns().getMaxSubexpressions() != null;
PatternSubexpressionPoolStmtSvc patternSubexpressionPoolStmtSvc = null;