flowable/flowable-engine · error · FlowableException
Error converting text annotation
Error message
Error converting text annotation
What it means
Thrown when the text content of a <text> child of a TextAnnotation cannot be read from the XML stream during CMMN conversion. The converter sets the text on the TextAnnotation; XMLStreamException is wrapped into this FlowableException.
Source
Thrown at modules/flowable-cmmn-converter/src/main/java/org/flowable/cmmn/converter/TextXmlConverter.java:45
@Override
public String getXMLElementName() {
return CmmnXmlConstants.ELEMENT_TEXT;
}
@Override
public boolean hasChildElements() {
return false;
}
@Override
protected CmmnElement convert(XMLStreamReader xtr, ConversionHelper conversionHelper) {
CmmnElement currentCmmnElement = conversionHelper.getCurrentCmmnElement();
try {
if (currentCmmnElement instanceof TextAnnotation textAnnotation) {
textAnnotation.setText(xtr.getElementText());
}
} catch (XMLStreamException e) {
throw new FlowableException("Error converting text annotation", e);
}
return null;
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Validate the XML and fix the <text> element inside the text annotation.
- Remove or escape illegal XML characters (e.g. control characters) in the annotation text.
- Check the cause exception for line/column of the failure.
- Re-create the annotation in the modeler.
Example fix
// before <text>some notes </text> // after <text>some notes</text>
Defensive patterns
Strategy: try-catch
Validate before calling
// Strip illegal XML control chars from annotation text before writing XML
text.replaceAll("[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F]", ""); Try / catch
try {
CmmnModel model = converter.convertToCmmnModel(in);
} catch (FlowableException e) {
throw new IllegalStateException("Cannot read text annotation: " + e.getCause(), e);
} Prevention
- Escape/strip control characters from annotation text
- Schema-validate the CMMN XML before conversion
- Avoid pasting text from rich editors directly into XML
When it happens
Trigger: Converting CMMN XML containing an artifact/text annotation whose <text> element is malformed, unclosed, or contains invalid characters.
Common situations: Hand-edited text annotations; copy-pasted text with illegal XML characters (control chars); truncated files; encoding mismatches.
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 while reading {ATTRIBUTE_ELEMENT_NAME} extension eleme
- Error converting process reference expression
- Error converting standard event
- Error converting timer expression
- '${andChildren}' is not valid boolean in mapException with e
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/55330c3fb327fe97.
Report an issue: GitHub.