use of com.axelor.apps.base.service.ABCAnalysisServiceImpl in project axelor-open-suite by axelor.
the class ABCAnalysisController method runAnalysis.
@SuppressWarnings("unchecked")
public void runAnalysis(ActionRequest request, ActionResponse response) {
ABCAnalysis abcAnalysis = request.getContext().asType(ABCAnalysis.class);
try {
Class<? extends ABCAnalysisServiceImpl> clazz = (Class<? extends ABCAnalysisServiceImpl>) Class.forName(abcAnalysis.getTypeSelect());
Beans.get(clazz).runAnalysis(Beans.get(ABCAnalysisRepository.class).find(abcAnalysis.getId()));
response.setReload(true);
} catch (ClassNotFoundException | AxelorException e) {
TraceBackService.trace(response, e, ResponseMessageType.ERROR);
}
}
Aggregations