flowable/flowable-engine · error · FlowableException
Error converting timer expression
Error message
Error converting timer expression
What it means
Thrown when the StAX reader cannot read the text of a <timerExpression> element while converting a CMMN timer event listener. The expression would be set via setTimerExpression on the TimerEventListener; an XMLStreamException is wrapped in this FlowableException.
Source
Thrown at modules/flowable-cmmn-converter/src/main/java/org/flowable/cmmn/converter/TimerExpressionXmlConverter.java:46
@Override
public String getXMLElementName() {
return CmmnXmlConstants.ELEMENT_TIMER_EXPRESSION;
}
@Override
public boolean hasChildElements() {
return false;
}
@Override
protected CmmnElement convert(XMLStreamReader xtr, ConversionHelper conversionHelper) {
try {
String expression = xtr.getElementText();
if (StringUtils.isNotEmpty(expression) && conversionHelper.getCurrentCmmnElement() instanceof TimerEventListener timerEventListener) {
timerEventListener.setTimerExpression(expression);
}
} catch (XMLStreamException e) {
throw new FlowableException("Error converting timer expression", e);
}
return null;
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Validate and repair the <timerExpression> element in the CMMN XML.
- Inspect the cause XMLStreamException for the exact offset.
- Ensure the element is well-formed, e.g. <timerExpression>PT1H</timerExpression>.
- Re-export the model from the modeling tool.
Example fix
// before <timerExpression>PT1 // after <timerExpression>PT1H</timerExpression>
Defensive patterns
Strategy: try-catch
Validate before calling
javax.xml.validation.Validator v = schema.newValidator(); v.validate(new StreamSource(cmmnXml));
Try / catch
try {
CmmnModel model = converter.convertToCmmnModel(in);
} catch (FlowableException e) {
throw new IllegalStateException("Invalid <timerExpression> element: " + e.getCause(), e);
} Prevention
- Schema-validate CMMN XML files
- Use valid ISO-8601 durations for timer expressions
- Keep XML files intact — detect truncation via validation
When it happens
Trigger: Parsing CMMN XML with a timer event listener whose <timerExpression> element is malformed or unreadable (unclosed tags, invalid chars, encoding problems).
Common situations: Hand-edited timer expressions; ISO duration strings containing invalid characters; truncated XML files.
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 text annotation
- Timer expression '${timerEventListener.getTimerExpression()}
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/13e5bfe5401b0cfd.
Report an issue: GitHub.