{"record":{"id":"6c6088bd2c6bc858","repo":"flowable/flowable-engine","slug":"errors-while-parsing","errorCode":null,"errorMessage":"Errors while parsing:\n","messagePattern":"Errors while parsing:\n","errorType":"validation","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/parser/CmmnParserImpl.java","lineNumber":108,"sourceCode":"            logger.warn(\"Case should be validated, but no case validator is configured on the case engine configuration!\");\n        } else {\n            List<ValidationEntry> validationEntries = caseValidator.validate(cmmnModel);\n            if (validationEntries != null && !validationEntries.isEmpty()) {\n\n                StringBuilder warningBuilder = new StringBuilder();\n                StringBuilder errorBuilder = new StringBuilder();\n\n                for (ValidationEntry entry : validationEntries) {\n                    if (entry.getLevel() == ValidationEntry.Level.Warning) {\n                        warningBuilder.append(entry).append(\"\\n\");\n                    } else {\n                        errorBuilder.append(entry).append(\"\\n\");\n                    }\n                }\n\n                // Throw exception if there is any error\n                if (errorBuilder.length() > 0) {\n                    throw new FlowableException(\"Errors while parsing:\\n\" + errorBuilder);\n                }\n\n                // Write out warnings (if any)\n                if (warningBuilder.length() > 0) {\n                    logger.warn(\"Following warnings encountered during case validation: {}\", warningBuilder);\n                }\n\n            }\n        }\n    }\n\n    public void processCmmnElements(CmmnModel cmmnModel, CmmnParseResult parseResult) {\n        for (Case caze : cmmnModel.getCases()) {\n            cmmnParseHandlers.parseElement(this, parseResult, caze);\n        }\n    }\n\n    public void processDI(CmmnModel cmmnModel, List<CaseDefinitionEntity> caseDefinitions) {","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/parser/CmmnParserImpl.java#L90-L126","documentation":"After XML conversion, CmmnParserImpl.validateCmmnModel runs semantic validation of the CMMN model. All collected validation errors are concatenated and thrown as a single FlowableException \"Errors while parsing:\\n...\" listing each problem on its own line.","triggerScenarios":"Parsing a syntactically valid CMMN document that violates model rules (e.g. missing required attributes/references, invalid plan item structure) such that the validator's error list is non-empty.","commonSituations":"Case models referencing non-existent plan items/stages; missing sentry/entry criteria references; hand-written CMMN missing required elements; exports from modeling tools with unsupported constructs.","solutions":["Read the exception message — it enumerates every validation error with its location.","Fix each listed element (missing ids, dangling references, invalid structure) in the .cmmn file.","Validate the model in a CMMN-compliant modeler before deploying.","Run repository deployment validation earlier in CI to catch invalid definitions before runtime parse."],"exampleFix":"// before\n<planItem id=\"pi1\" definitionRef=\"missingTask\"/> <!-- definitionRef not defined -->\n// after\n<planItem id=\"pi1\" definitionRef=\"task1\"/>\n<task id=\"task1\" name=\"Task\"/>","handlingStrategy":"try-catch","validationCode":"// Deploy-time pre-validation via repository service or CMMN validator before runtime parse","typeGuard":null,"tryCatchPattern":"try { parser.parse(...); } catch (FlowableException e) { if (e.getMessage().startsWith(\"Errors while parsing:\")) { for (String line : e.getMessage().split(\"\\n\")) log.warn(line); } throw e; }","preventionTips":["Read the multi-line message; it lists each validation error individually.","Validate models in a CMMN modeler before committing.","Keep definitionRef/sentryRef references consistent in case models.","Add deployment validation to CI pipelines."],"tags":["cmmn","validation","parsing","model"],"backgroundTag":"schema-validation-failed","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}