String profileName = req.getParameter("profile");
String preprocessingData = req.getParameter("pp");
String uuid = Utils.getUUID(req);
IDiagramProfile profile = _profileService.findProfile(req, profileName);
BPMN2SyntaxChecker checker = new BPMN2SyntaxChecker(json, preprocessingData, profile, uuid);
checker.checkSyntax();
resp.setCharacterEncoding("UTF-8");
resp.setContentType("application/json");
if(checker.errorsFound()) {
resp.getWriter().write(checker.getErrorsAsJson().toString());
}
}