use of org.flowable.editor.language.json.converter.BpmnJsonConverter in project plumdo-work by wengwh.
the class ModelValidationResource method validate.
@RequestMapping(value = "/models/validate", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
public List<ValidationError> validate(@RequestBody JsonNode body) {
BpmnModel bpmnModel = new BpmnJsonConverter().convertToBpmnModel(body);
ProcessValidator validator = new ProcessValidatorFactory().createDefaultProcessValidator();
List<ValidationError> errors = validator.validate(bpmnModel);
return errors;
}
Aggregations