{"record":{"id":"1c6e5abccd6ab6d5","repo":"flowable/flowable-engine","slug":"error-processing-cmmn-xml-document","errorCode":null,"errorMessage":"Error processing CMMN XML document","messagePattern":"Error processing CMMN XML document","errorType":"exception","errorClass":"CmmnXMLException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-converter/src/main/java/org/flowable/cmmn/converter/CmmnXmlConverter.java","lineNumber":242,"sourceCode":"                    if (elementConverters.containsKey(currentXmlElement)) {\n                        elementConverters.get(currentXmlElement).convertToCmmnModel(xtr, conversionHelper);\n                    }\n\n                } else if (xtr.isEndElement()) {\n                    currentXmlElement = null;\n                    if (elementConverters.containsKey(xtr.getLocalName())) {\n                        elementConverters.get(xtr.getLocalName()).elementEnd(xtr, conversionHelper);\n                    }\n\n                }\n            }\n\n        } catch (CmmnXMLException e) {\n            throw e;\n\n        } catch (Exception e) {\n            LOGGER.error(\"Error processing CMMN XML document\", e);\n            throw new CmmnXMLException(\"Error processing CMMN XML document\", e);\n        }\n\n        // Post process all elements: add instances where a reference is used\n        processCmmnElements(conversionHelper);\n        return conversionHelper.getCmmnModel();\n    }\n\n    public void validateModel(InputStreamProvider inputStreamProvider) throws Exception {\n        Schema schema = createSchema();\n\n        Validator validator = schema.newValidator();\n        validator.validate(new StreamSource(inputStreamProvider.getInputStream()));\n    }\n\n    public void validateModel(XMLStreamReader xmlStreamReader) throws Exception {\n        Schema schema = createSchema();\n\n        Validator validator = schema.newValidator();","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-converter/src/main/java/org/flowable/cmmn/converter/CmmnXmlConverter.java#L224-L260","documentation":"Any unexpected exception during CMMN XML model conversion (other than CmmnXMLException, which is rethrown unchanged) is caught, logged at error level, and rethrown as CmmnXMLException(\"Error processing CMMN XML document\"). It is a catch-all indicating an internal failure while building the CmmnModel from the parsed XML.","triggerScenarios":"An element converter (elementConverters.get(...).convertToCmmnModel) throwing a RuntimeException, e.g. ClassCastException from an unexpected element value, NumberFormatException from a malformed attribute, or NPE in a converter due to a missing parent element.","commonSituations":"Hand-edited CMMN XML with attribute values of unexpected type/format (e.g. non-numeric attributes parsed as numbers), CMMN produced by other tools using extensions Flowable's converters do not expect, or Flowable version mismatches where converters changed.","solutions":["Read the chained cause and the LOGGER.error stack trace to identify which element/attribute failed","Fix the offending attribute/element in the CMMN XML (check numeric/date-typed values)","Validate the document against the CMMN 1.1 XSD before deploying","Upgrade/downgrade Flowable to match the tool that generated the CMMN file"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);\nSchema xsd = sf.newSchema(getClass().getResource(\"/org/flowable/cmmn/schema/CMMN11.xsd\"));\nxsd.newValidator().validate(new StreamSource(cmmnInputStream)); // throws if invalid","typeGuard":null,"tryCatchPattern":"try {\n    cmmnModel = converter.convertToCmmnModel(provider);\n} catch (CmmnXMLException e) {\n    log.error(\"CMMN conversion failed: \" + e.getCause(), e.getCause());\n    throw new DeploymentException(\"Case definition could not be processed\", e);\n}","preventionTips":["XSD-validate all CMMN files in CI before deployment","Avoid non-standard extensions/attributes from other modeling tools","Keep Flowable versions aligned with the tooling that generates the XML"],"tags":["java","cmmn","xml","conversion"],"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-14T05:17:10.506Z"}