use of org.kie.api.logger.KieRuntimeLogger in project opennms by OpenNMS.
the class CorrelationExample method main.
/**
* <p>main</p>
*
* @param args an array of {@link java.lang.String} objects.
* @throws java.lang.Exception if any.
*/
public static void main(final String[] args) throws Exception {
final KieSession session = new KieHelper().addResource(new ClassPathResource("CorrelationExample.drl")).build().newKieSession();
KieRuntimeLogger logger = KieServices.Factory.get().getLoggers().newFileLogger(session, "log/correlation");
try (InputStream in = CorrelationExample.class.getResourceAsStream("simulation")) {
final Simulation simulation = new Simulation();
System.out.println("Loading Simulation");
simulation.load(in);
System.out.println("Executing Simulation");
simulation.simulate(session);
}
logger.close();
}
Aggregations