use of org.drools.workbench.models.testscenarios.backend.populators.FactPopulator in project drools by kiegroup.
the class ScenarioRunner method run.
public void run(final Scenario scenario) throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException, InvalidClockTypeException {
final Map<String, Object> populatedData = new HashMap<String, Object>();
final Map<String, Object> globalData = new HashMap<String, Object>();
// This looks safe!
final KieBase kieBase = ksession.getKieBase();
final ClassLoader classloader2 = ((InternalKnowledgeBase) kieBase).getRootClassLoader();
final ClassTypeResolver resolver = new ClassTypeResolver(getImports(scenario), classloader2);
this.workingMemoryWrapper = new TestScenarioKSessionWrapper(ksession, resolver, populatedData, globalData, scenarioUsesTimeWalk(scenario));
this.factPopulatorFactory = new FactPopulatorFactory(populatedData, globalData, resolver);
this.factPopulator = new FactPopulator(ksession, populatedData);
MVEL.COMPILER_OPT_ALLOW_NAKED_METH_CALL = true;
scenario.setLastRunResult(new Date());
populateGlobals(scenario.getGlobals());
applyFixtures(scenario.getFixtures(), createScenarioSettings(scenario));
}
Aggregations