use of com.axelor.apps.bpm.db.WkfModel in project axelor-open-suite by axelor.
the class WkfModelController method getDataList.
private List<Map<String, Object>> getDataList(ActionRequest request, String type) {
if (request.getData().get("id") == null) {
return new ArrayList<>();
}
Long wkfModelId = Long.valueOf(request.getData().get("id").toString());
WkfModel wkfModel = Beans.get(WkfModelRepository.class).find(wkfModelId);
switch(type) {
case PROCESS_PER_STATUS:
return Beans.get(WkfModelService.class).getProcessPerStatus(wkfModel);
case PROCESS_PER_USER:
return Beans.get(WkfModelService.class).getProcessPerUser(wkfModel);
default:
return new ArrayList<>();
}
}
use of com.axelor.apps.bpm.db.WkfModel in project axelor-open-suite by axelor.
the class WkfModelController method terminate.
public void terminate(ActionRequest request, ActionResponse response) {
WkfModel wkfModel = request.getContext().asType(WkfModel.class);
wkfModel = wkfModelRepository.find(wkfModel.getId());
wkfModelService.terminate(wkfModel);
response.setReload(true);
}
Aggregations