use of org.openforis.collect.datacleansing.DataCleansingChainExecutorJob in project collect by openforis.
the class DataCleansingChainController method run.
@RequestMapping(value = "{chainId}/run.json", method = RequestMethod.POST)
@ResponseBody
public Response run(@PathVariable int chainId, @RequestParam Step recordStep) {
CollectSurvey survey = sessionManager.getActiveSurvey();
DataCleansingChain chain = itemManager.loadById(survey, chainId);
DataCleansingChainExecutorJob job = collectJobManager.createJob(DataCleansingChainExecutorJob.class);
job.setChain(chain);
job.setRecordStep(recordStep);
collectJobManager.startSurveyJob(job);
Response response = new Response();
return response;
}
use of org.openforis.collect.datacleansing.DataCleansingChainExecutorJob 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