use of org.openforis.collect.datacleansing.DataCleansingChain in project collect by openforis.
the class DataCleansingStepController method run.
@RequestMapping(value = "run.json", method = RequestMethod.POST)
@ResponseBody
public DataCleangingChainExecutorJobView run(@RequestParam int cleansingStepId, @RequestParam Step recordStep) {
CollectSurvey survey = sessionManager.getActiveSurvey();
DataCleansingStep cleansingStep = dataCleansingStepManager.loadById(survey, cleansingStepId);
DataCleansingChain chain = new DataCleansingChain(survey);
chain.addStep(cleansingStep);
DataCleansingChainExecutorJob job = collectJobManager.createJob(DataCleansingChainExecutorJob.class);
job.setSurvey(survey);
job.setChain(chain);
job.setRecordStep(recordStep);
collectJobManager.startSurveyJob(job);
return new DataCleangingChainExecutorJobView(job);
}
Aggregations