flowable/flowable-engine · error · FlowableException
Error while reading {ATTRIBUTE_ELEMENT_NAME} extension eleme
Error message
Error while reading {ATTRIBUTE_ELEMENT_NAME} extension element What it means
Flowable wraps any failure while reading the text content of a <extensionElements> child's element name (the 'elementName' attribute element) into this FlowableException. It is a low-level XML parsing wrapper: the original cause (usually an XMLStreamException from the underlying StAX reader) is attached as the cause. It means the CMMN XML is malformed at that position or the stream is in an unexpected state.
Source
Thrown at modules/flowable-cmmn-converter/src/main/java/org/flowable/cmmn/converter/ExtensionElementsXMLConverter.java:492
} catch (Exception e) {
LOGGER.warn("Error parsing collection child elements", e);
}
}
}
protected void readElementName(XMLStreamReader xtr, ConversionHelper conversionHelper) {
CmmnElement currentCmmnElement = conversionHelper.getCurrentCmmnElement();
if (currentCmmnElement instanceof CaseElement) {
try {
String elementName = xtr.getElementText();
if (StringUtils.isNotEmpty(elementName)) {
((CaseElement) currentCmmnElement).setName(elementName.trim());
}
} catch (Exception e) {
throw new FlowableException("Error while reading " + ATTRIBUTE_ELEMENT_NAME + " extension element", e);
}
}
}
protected void readCommonXmlInfo(BaseElement baseElement, XMLStreamReader xtr) {
baseElement.setId(xtr.getAttributeValue(null, CmmnXmlConstants.ATTRIBUTE_ID));
Location location = xtr.getLocation();
baseElement.setXmlRowNumber(location.getLineNumber());
baseElement.setXmlRowNumber(location.getColumnNumber());
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Validate the CMMN XML with an XML schema/validator and fix malformed extension elements near the reported location.
- Check the exception cause (e.getCause()) to identify the exact XMLStreamException and offset.
- Ensure extension elements use the correct Flowable extension namespace (e.g. http://flowable.org/cmmn).
- Re-export the model from the original modeling tool instead of hand-editing the XML.
Example fix
// before <extensionElements> <flowable:name </extensionElements> // after <extensionElements> <flowable:name>myName</flowable:name> </extensionElements>
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate XML before conversion javax.xml.XMLConstants / javax.xml.validation.Validator.validate(new StreamSource(cmmnXmlFile)); // throws if malformed // Or quick well-formedness check: new XMLInputFactoryImpl().createXMLStreamReader(new FileInputStream(cmmnXmlFile)); // throws XMLStreamException early
Try / catch
try {
CmmnModel model = cmmnXmlConverter.convertToCmmnModel(inputStream);
} catch (FlowableException e) {
Throwable cause = e.getCause(); // XMLStreamException with line/column
throw new IllegalArgumentException("Invalid CMMN extension element: " + (cause != null ? cause.getMessage() : e.getMessage()), e);
} Prevention
- Always schema-validate CMMN XML before conversion
- Never hand-edit CMMN XML; use the modeler
- Log e.getCause() to get precise line/column info
When it happens
Trigger: Converting a CMMN model whose extension element (element identified by ATTRIBUTE_ELEMENT_NAME) has malformed or unreadable text content; the StAX reader throws XMLStreamException on xtr.getElementText(); also thrown when the current CMMN element cannot accept the name.
Common situations: Hand-edited or tool-generated CMMN XML with a truncated/empty extension element; wrong namespace declarations; corrupted XML files; incompatible converter version vs XML features.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Error converting process reference expression
- Error converting standard event
- Error converting text annotation
- Error converting timer expression
- Error processing BPMN document
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/8febb077fd5a1cc2.
Report an issue: GitHub.