use of org.smartdata.server.rule.parser.TranslationContext in project SSM by Intel-bigdata.
the class RuleContainer method doLaunchExecutor.
private RuleQueryExecutor doLaunchExecutor(RuleManager ruleManager) throws IOException {
RuleState state = ruleInfo.getState();
if (state == RuleState.ACTIVE || state == RuleState.DRYRUN) {
if (executor != null && !executor.isExited()) {
return null;
}
ExecutionContext ctx = new ExecutionContext();
ctx.setProperty(ExecutionContext.RULE_ID, ruleInfo.getId());
TranslationContext transCtx = new TranslationContext(ruleInfo.getId(), ruleInfo.getSubmitTime());
TranslateResult tr = executor != null ? executor.getTranslateResult() : ruleManager.doCheckRule(ruleInfo.getRuleText(), transCtx);
executor = new RuleQueryExecutor(ruleManager, ctx, tr, ruleManager.getDbAdapter());
return executor;
}
return null;
}
Aggregations