use of org.drools.verifier.core.main.Reporter in project drools-wb by kiegroup.
the class Receiver method init.
private void init(final DrlInitialize initialize) {
try {
final AnalyzerBuilder analyzerBuilder = new AnalyzerBuilder().with(initialize).with(checkRunner).with(new Reporter() {
@Override
public void sendReport(final Set<Issue> issues) {
latestReport = new Issues(initialize.getUuid(), issues);
poster.post(latestReport);
}
@Override
public void sendStatus(final Status status) {
poster.post(status);
}
});
analyzer = analyzerBuilder.buildAnalyzer();
index = analyzerBuilder.getIndex();
configuration = analyzerBuilder.getConfiguration();
analyzer.resetChecks();
analyzer.analyze();
} catch (final Exception e) {
poster.post(new WebWorkerException("Initialization failed: " + e.getMessage()));
}
}
Aggregations