{"record":{"id":"772b9d3ee9b7f81a","repo":"flowable/flowable-engine","slug":"case-should-be-validated-but-no-case-validator-is","errorCode":null,"errorMessage":"Case should be validated, but no case validator is configured on the case engine configuration!","messagePattern":"Case should be validated, but no case validator is configured on the case engine configuration!","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/parser/CmmnParserImpl.java","lineNumber":90,"sourceCode":"            } else if (e instanceof CmmnXMLException) {\n                throw (CmmnXMLException) e;\n            } else {\n                throw new FlowableException(\"Error parsing XML\", e);\n            }\n        }\n    }\n\n    protected CmmnModel convertToCmmnModel(CmmnParseContext context, StreamSource cmmnSource) {\n        boolean enableSafeBpmnXml = context.enableSafeXml();\n        String encoding = context.xmlEncoding();\n        boolean validateCmmnXml = context.validateXml();\n\n        return new CmmnXmlConverter().convertToCmmnModel(cmmnSource, validateCmmnXml, enableSafeBpmnXml, encoding);\n    }\n\n    protected void validateCmmnModel(CaseValidator caseValidator, CmmnModel cmmnModel) {\n        if (caseValidator == null) {\n            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);","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/parser/CmmnParserImpl.java#L72-L108","documentation":"CmmnParserImpl.validateCmmnModel runs the configured CaseValidator against the parsed CmmnModel before deployment. If engine configuration has validation enabled (or is expected to validate) but caseValidator is null, the parser logs this warning and skips validation entirely, so an invalid case model can be deployed. Flowable logs it because deploying unvalidated models usually surfaces errors later at runtime.","triggerScenarios":"Calling CmmnParserImpl.parse when the CaseValidator injected via the engine configuration (e.g. CmmnEngineConfiguration's caseValidator field) is null — typically because the validator was never set on the configuration, or a custom configuration replaced the default CaseValidatorFactory output with null.","commonSituations":"Building a CmmnEngineConfiguration programmatically without setting the case validator; using a stripped-down/custom configuration class that omits CaseValidatorFactory; upgrading Flowable and a custom config no longer wires the validator.","solutions":["Ensure the engine configuration creates/sets a validator: cmmnEngineConfiguration.setCaseValidatorFactory(new CmmnCaseValidatorFactory()) or use the standard FlowableCmmnEngineConfiguration which wires it by default","Explicitly set caseValidator on the configuration before deploying if constructing CmmnParserImpl manually","If validation is intentionally skipped, silence is expected but consider running a manual validation pass on models before deploy","Verify the Spring/spring-boot starter auto-configuration is in play so the default validator bean is registered"],"exampleFix":"// before: validator never configured\nFlowableCmmnEngineConfiguration config = new FlowableCmmnEngineConfiguration();\n// after: ensure validator is configured\nconfig.setCaseValidatorFactory(new CmmnCaseValidatorFactory());","handlingStrategy":"validation","validationCode":"if (cmmnEngineConfiguration.getCaseValidator() == null) {\n    throw new IllegalStateException(\"CaseValidator must be configured before deploying CMMN models\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the standard FlowableCmmnEngineConfiguration/starter so the validator is auto-wired","Assert configuration completeness in a startup health check","Never replace CaseValidatorFactory with a null-producing custom factory"],"tags":["cmmn","validation","configuration"],"backgroundTag":"missing-required-config","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"}